Releases: rogerbinns/apsw
3.40.1.0
Implemented window functions (APSW issue 292)
Function flags can be specified to Connection.createscalarfunction() and Connection.createaggregatefunction(). Added apsw.mapping_function_flags. (APSW issue 384)
Added Connection.trace_v2() with apsw.mapping_trace_codes and apsw.mapping_statement_status (APSW issue 383)
Ensure all SQLite APIs are wrapped. Connection.system_errno, apsw.strlike(), apsw.strglob(), apsw.stricmp(), apsw.strnicmp(), Connection.filename_wal, Connection.filename_journal, Connection.table_exists(), Connection.column_metadata(), Error.error_offset, Connection.cacheflush(), Connection.release_memory(), apsw.hard_heap_limit(). Connection.drop_modules() (APSW issue 382)
When an unraisable exception happens, sqlite3_log is now called so you will have context within SQLite’s actions. sys.unraisablehook is now called first, and if it doesn’t exist then sys.excepthook as before. (APSW issue 385)
When the wrong type is given for a function argument, the error message now includes the parameter name and function signature. (APSW issue 358)
Let SQLite do size checking instead of APSW for strings and blobs. (APSW issue 387)
Added apsw.ext.log_sqlite() which installs a handler that forwards SQLite messages to the logging module.
Added set_default_vfs() and unregister_vfs() taking vfs names. The test suite also unregisters ZipVFS (APSW issue 394)
3.40.0.0
Fixed regression in statement cache update (version 3.38.1-r1) where trailing whitespace in queries would be incorrectly treated as incomplete execution (APSW issue 376)
Added Various interesting and useful bits of functionality (APSW issue 369)
Added more Pythonic attributes as an alternative to getters and setters, including Connection.in_transaction, Connection.exectrace, Connection.rowtrace, Cursor.exectrace, Cursor.rowtrace, Cursor.connection (APSW issue 371)
Completed: To the extent permitted by CPython APIs every item has the same docstring as this documentation. Every API can use named parameters. The type stubs cover everything including constants. The type stubs also include documentation for everything, which for example Visual Studio Code displays as you type or hover. There is a single source of documentation in the source code, which is then automatically extracted to make this documentation, docstrings, and docstrings in the type stubs.
Example/Tour updated and appearance improved (APSW issue 367).
3.39.4.0
Added Connection.cache_stats() to provide more information about the statement cache.
Cursor.execute() now uses sqlite_prepare_v3 which allows supplying flags.
Cursor.execute() has a new can_cache parameter to control whether the query can use the statement cache. One example use is with authorizers because they only run during prepare, which doesn’t happen with already cached statements.
(The Cursor.execute() additional parameters are keyword only and also present in Cursor.executemany(), and the corresponding Connection.execute() and Connection.executemany() methods.)
Added Cursor.is_readonly, Cursor.is_explain, and Cursor.expanded_sql.
Updated processing named bindings so that types registered with collections.abc.Mapping (such as collections.UserDict) will also be treated as dictionaries. (APSW issue 373)
3.39.3.0
Source ▪ Downloads ▪ Changelogs ▪ Documentation
Test no longer fails if APSW was compiled without SQLITE_ENABLE_COLUMN_METADATA but sqlite3 was separately compiled with it. APSW should be compiled with the same flags as sqlite3 to match functionality and APIs. (APSW issue 363)
–use-system-sqlite-config setup.py build_ext option added to allow Matching APSW and SQLite options. (APSW issue 364)
3.39.2.1
Source ▪ Downloads ▪ Changelogs ▪ Documentation
PyPI now includes Python 3.11 builds.
Instead of using scripts, you can now run several tools directly:
tests: python3 -m apsw.tests [options]
tracer: python3 -m apsw.trace [options]
speed tester: python3 -m apsw.speedtest [options]
shell: python3 -m apsw [options]
The shell class has moved from apsw.Shell to apsw.shell.Shell (APSW issue 356). You can still reference it via the old name (ie existing code will not break, except on Python 3.6).
Shell: On Windows the native console support for colour is now used (previously a third party module was supported).
You can use –definevalues in setup.py build_ext to provide compiler defines used for configuring SQLite. (APSW issue 357)
If SQLITE_ENABLE_COLUMN_METADATA is enabled then Cursor.description_full is available providing all the column metadata available. (APSW issue 354)
Connection.cursor_factory attribute is now present and is used when Connection.cursor() is called. Added Connection.execute() and Connection.executemany() which automatically obtain the underlying cursor. See customizing connections and cursors in the Tips. (APSW issue 361)
3.39.2.0
Source ▪ Downloads ▪ Changelogs ▪ Documentation
Version numbering scheme change: Instead of a -r1 style suffix, there is .0 style suffix (APSW issue 340)
Updated building for PyPI to include more compiled platforms, including aarch64 (Linux) and universal (MacOS). Windows binaries are no longer separately provided since PyPI has them.
When the amalgamation is included into APSW, SQLITE_MAX_ATTACHED is set to 125 if not defined, up from the default of 10.
Updated typing information stubs with more detail and include docstrings. This is still ongoing, but core functionality is well covered. (APSW issue 338) (APSW issue 381)
Corrected the tips log handler of extended result code (APSW issue 342)
Added Connection.db_names() (APSW issue 343)
3.38.5-r1
Source ▪ Downloads ▪ Changelogs ▪ Documentation
APSW is now on PyPI, so you can: pip install apsw
(Thanks to several people behind the scenes who helped with the various pieces to make this happen.)
Removed support for setup.py downloading the in-development (aka fossil) version of SQLite.
Shell exit for –version etc cleanly exits (APSW issue 210)
Python 3.11 (APSW issue 326) now works.
PyPy3 compiles and mostly works (APSW issue 323).
3.38.1-r1
Source ▪ Downloads ▪ Changelogs ▪ Documentation
ll items now have full docstrings including type information. (Previously just one line summaries). Note the C implemented functions and data (ie almost all of APSW) can't provide the same level of type information as regular Python code.
apsw.pyi file is included which does provide all the typing information in type stub format, and shown by most IDEs.
Removal of code, tests, and documentation only relevant to CPython before 3.7. (Python 3.6 does still work, but is end of life.)
Keyword arguments can be used everywhere.
The statement cache implementation changed from a dictionary to a list. This allows the cache to be used for the same query text multiple times. (The code is also a quarter of the size and simpler).
The default for setup.py's fetch command is to get the SQLite version corresponding to APSW's release. (Previously it got the latest release.)
Added constants:
- SQLITE_INDEX_CONSTRAINT_OFFSET, SQLITE_INDEX_CONSTRAINT_LIMIT
3.37.0-r1
Source ▪ Downloads ▪ Changelogs ▪ Documentation
Allow breaking of reference cycles between objects that contain a Connection or Cursor, and also use callbacks from that object (eg busy handler). (APSW issue #314)
This is the last release supporting Python 2 and Python 3 before 3.7. If you still use those Python versions then you should pin to this APSW version. (More information).
Windows Python 3.10 binaries are available to download. The .exe format is no longer available with this Python version.
Fixed custom VFS extension loading failure could leave the error message unterminated.
Updated size of mutex array used by the fork checker
Connections are opened with SQLITE_OPEN_EXRESCODE so open errors will also include extended result codes.
Connection.changes() and Connection.totalchanges() use the new SQLite APIs that return 64 bit values (ie can now return values greater than 2 billion).
Added Connection.autovacuum_pages().
Added constants:
SQLITE_CONSTRAINT_DATATYPE, SQLITE_OPEN_EXRESCODE
3.36.0-r1
Source ▪ Downloads ▪ Changelogs ▪ Documentation
Implemented Connection.serialize() and Connection.deserialize(). They turn a database into bytes, and bytes into a database respectively.
Allow any subclass of VFS to implement WAL, not just direct subclasses. (APSW issue 311)
Added constants:
- SQLITE_FCNTL_EXTERNAL_READER, SQLITE_FCNTL_CKSM_FILE