CHANGELOG¶
v0.8.0¶
📅 Date 2026-02-12
💔 Breaking Changes:
Removed database driver extras from
pyproject.tomlDatabase drivers (mysqlclient, psycopg2, pyodbc, oracledb, etc.) are no longer provided as optional dependencies
Users must install database drivers separately according to their needs
Rationale: SQLAlchemy users typically already have the appropriate drivers installed
Migration guide: Install drivers directly with pip, e.g.,
pip install sqlalchemy-dlock mysqlclient psycopg2 pyodbc oracledb
🆕 New Features:
Oracle Database Support:
Added support for Oracle Database using
DBMS_LOCKpackageSupports all 6 Oracle lock modes:
NL(Null),SS(Sub-Shared),SX(Sub-Exclusive),S(Shared),SSX(Shared Sub-Exclusive),X(Exclusive)Lock mode compatibility matrix for fine-grained concurrency control
Transaction-level locks via
release_on_commitparameterInteger lock IDs (0-1073741823) with automatic hash-based conversion for string keys (using blake2b)
Both synchronous and asynchronous lock implementations
MSSQL (Microsoft SQL Server) Support:
Added support for SQL Server application locks using
sp_getapplockMultiple lock modes: Exclusive, Shared, and Update
Both synchronous and asynchronous lock implementations
MariaDB Support:
Added explicit MariaDB registry entry (compatible with MySQL named locks)
🏗️ Refactor:
Refactored lock base classes to reduce code duplication between synchronous and asynchronous implementations
Extracted common lock state validation logic into base class methods
Introduced
do_acquireanddo_releaseabstract methods for concrete implementationsAdded
@finaldecorator toacquire,release, andclosemethods in base classes to prevent override while ensuring consistent behaviorImproved consistency between MySQL, PostgreSQL, MSSQL, and Oracle lock implementations
📚 Documentation:
Added comprehensive Oracle lock types documentation with examples
Added MSSQL lock types documentation with examples
Updated README with all supported databases and their lock mechanisms
Added connection string examples for Oracle and MSSQL
Documented Oracle testing limitation due to Oracle Free edition not supporting
DBMS_LOCK.REQUESTSimplified Database Drivers section, linking to SQLAlchemy documentation
v0.7.0¶
📅 Date 2025-10-12
🆕 New Features:
Supported Python 3.14
💔 Breaking Changes:
Drop support for Python 3.8
📦 Build:
Upgrade build backend to
setuptools>=80Remove all
requirements.txtfiles
v0.6.1.post2¶
📅 Date 2024-11-29
🐛 Bug-fix:
Issue #4: PostgreSQL xact lock in context manager produces warning #4
✅ Changes:
typing-extensionsrequired for Python earlier than 3.12
🖊️ Modifications:
Add some
overridedecorators
🎯 CI:
update pre-commit hooks
v0.6.1¶
📅 Date 2024-4-6
✅ Changes:
typing-extensionsrequired for Python earlier than 3.10
v0.6¶
📅 Date 2024-3-28
❎ Breaking Changes:
Remove
levelarguments of PostgreSQL lock class’ constructor.xactandsharedarguments were added.
🆕 New Features:
support
transactionandsharedadvisory lock for PostgreSQL.
🐛 Bug fix:
PostgreSQL transaction level advisory locks are held until the current transaction ends. Manual release for that is disabled, and a warning message will be printed.
🕐 Optimize
Reduce duplicated codes
Better unit tests
v0.5.3¶
📅 Date 2024-3-15
v0.5¶
Date: 2023-12-06
New:
contextual_timeoutparameter for “with” statementSupport Python 3.12
v0.4¶
Date: 2023-06-17
Remove:
remove
acquiredproperty, it’s alias oflockedremove setter of
lockedproperty
Optimize:
re-arrange package’s structure
Many optimizations
CI/Test:
GitHub action: Python 3.8~3.11 x SQLAlchemy 1.x/2.x matrix testing
Local compose: Python 3.7~3.11 x SQLAlchemy 1.x/2.x matrix testing
Doc: Update to Sphinx 7.x, and Furo theme
v0.3.1¶
Date: 2023-06-13
A hotfix for project’s dependencies setup error.
v0.3¶
Date: 2023-06-13
Remove:
Python 3.6 support
Tests:
New docker compose based tests, from python 3.7 to 3.11, both SQLAlchemy 1.x and 2.x
Docs:
Update to newer Sphinx docs
Build:
Move all project meta to pyproject.toml, remove setup.cfg and setup.py
v0.2.1¶
Date: 2023-02-25
New:
support SQLAlchemy 2.0
v0.2¶
Date: 2021-03-23
First v0.2.x version released.
v0.2b2/b3¶
Date: 2021-03-23
Add:
More unit tests
Optimized CI
v0.2b1¶
Date: 2021-03-16
Add:
New unit tests
CI by GitHub workflows
v0.2a3¶
Date: 2021-03-14
Change:
Drop Python 3.5 support.
Remove SQLAlchemy version requires earlier than 1.4 in setup, it’s not supported, actually.
Adjust PostgreSQL lock’s constructor arguments order
Add:
More test cases, and add test/deploy workflow in GitHub actions.
Add docker-compose test scripts
v0.2a2¶
Date: 2021-03-09
Change:
Rename a lot of function/class:
sadlock->create_sadlockasyncio.sadlock->asyncio.create_async_sadlock
and some other …
v0.2a1¶
Date: 2021-03-08
New:
Asynchronous IO Support by:
aiomysql for MySQL
Connection URL is like:
"mysql+aiomysql://user:password@host:3306/schema?charset=utf8mb4"asyncpg for PostgreSQL
Connection URL is like:
"PostgreSQL+asyncpg://user:password@host:5432/db"
Read https://docs.sqlalchemy.org/en/14/orm/extensions/asyncio.html for details
v0.1.2¶
Date: 2021-01-26
Still an early version, not for production.
Changes:
Arguments and it’s default value of
acquirenow similar to stdlib’smultiprossing.Lock, instead ofThreading.LockMySQL lock now accepts float-point value as
timeout
Adds
Several new test cases
Other
Many other small adjustment
v0.1.1¶
A very early version, maybe not stable enough.
Replace
black2bwith crc64-iso in PostgreSQL key convert functionOnly named arguments as extra parameters allowed in Lock’s implementation class