Skip to content

Commit 195e04c

Browse files
tanbroclaude
andcommitted
docs: clarify Oracle testing status and simplify driver documentation
- Add prominent warning that Oracle is NOT tested in CI or integration tests - Simplify Database Drivers section by removing redundant driver list, keeping only SQLAlchemy documentation link - Add Notes section with MSSQL ODBC driver installation requirement - Document Oracle Database Free limitation across all relevant files: - README.md - CLAUDE.md - .github/workflows/python-package.yml - db.docker-compose.yml - scripts/run-test.sh Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5d22e4d commit 195e04c

5 files changed

Lines changed: 37 additions & 35 deletions

File tree

.github/workflows/python-package.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,15 @@ jobs:
140140
enable-cache: true
141141
python-version: ${{ matrix.python-version }}
142142

143-
# NOTE: Oracle testing skipped in CI
143+
# NOTE: Oracle testing requires full Oracle Database installation
144144
# Oracle Database Free (23c/23ai) does NOT support DBMS_LOCK.REQUEST
145145
# which is required for distributed lock functionality. This is a known
146-
# limitation of the Free/Express edition. Oracle testing should be done
147-
# locally using a full Oracle Database installation.
146+
# limitation of the Free/Express edition. CI cannot test Oracle; use
147+
# local testing with a full Oracle Database installation.
148148
#
149-
# For local testing, use:
149+
# For local Oracle testing:
150150
# docker compose -f db.docker-compose.yml up
151+
# OR use a self-hosted runner with access to Oracle Enterprise/Standard
151152
#
152153
# Reference: https://github.com/gvenzl/oci-oracle-free
153154
# The "slim" and "full" flavors of gvenzl/oracle-free both lack

CLAUDE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ cd tests
3838
docker compose up --abort-on-container-exit
3939
```
4040

41+
> **Note:** Oracle testing requires **Oracle Database Enterprise/Standard Edition**. Oracle Database Free (23c/23ai) does NOT support `DBMS_LOCK.REQUEST` which is required for distributed lock functionality. This is a fundamental limitation of the Free/Express edition, not related to the container image flavor.
42+
43+
For local Oracle testing, ensure you have a full Oracle Database installation or use the official Oracle image:
44+
```bash
45+
docker compose -f db.docker-compose.yml up
46+
```
47+
4148
### Pre-commit Hooks
4249
```bash
4350
# Install pre-commit hooks

README.md

Lines changed: 13 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ sqlalchemy-dlock provides distributed locking capabilities using your existing d
1717
| MySQL | [Named Lock](https://dev.mysql.com/doc/refman/en/locking-functions.html) (`GET_LOCK` / `RELEASE_LOCK`) |
1818
| MariaDB | [Named Lock](https://mariadb.com/kb/en/get_lock/) (compatible with MySQL) |
1919
| MSSQL | [Application Lock](https://learn.microsoft.com/sql/relational-databases/system-stored-procedures/sp-getapplock-transact-sql) (`sp_getapplock`) |
20-
| Oracle | [User Lock](https://docs.oracle.com/en/database/oracle/oracle-database/19/arpls/DBMS_LOCK.html) (`DBMS_LOCK`) |
21-
| PostgreSQL | [Advisory Lock](https://www.postgresql.org/docs/current/explicit-locking.html#ADVISORY-LOCKS) |
20+
| Oracle | [User Lock](https://docs.oracle.com/en/database/oracle/oracle-database/19/arpls/DBMS_LOCK.html) (`DBMS_LOCK`) |
21+
| PostgreSQL | [Advisory Lock](https://www.postgresql.org/docs/current/explicit-locking.html#ADVISORY-LOCKS) |
22+
23+
> ⚠️ **Oracle Not Tested:**
24+
> Oracle Database Free (23c/23ai) does NOT support `DBMS_LOCK.REQUEST`. We do NOT test Oracle in CI or integration tests. Use with Oracle Enterprise/Standard Edition at your own risk.
2225
2326
---
2427

@@ -59,34 +62,15 @@ pip install sqlalchemy-dlock
5962

6063
### Database Drivers
6164

62-
This library requires a database driver to be installed separately. Since you're already using SQLAlchemy, you likely have the appropriate driver installed.
63-
64-
**MySQL / MariaDB:**
65-
- `mysqlclient` - Recommended C extension (synchronous)
66-
- `pymysql` - Pure Python (synchronous)
67-
- `aiomysql` - Async I/O
68-
69-
**PostgreSQL:**
70-
- `psycopg2` or `psycopg2-binary` - v2 (synchronous)
71-
- `psycopg` - v3 (synchronous and asynchronous)
72-
- `asyncpg` - Async I/O
73-
74-
**MSSQL:**
75-
- `pyodbc` - ODBC driver (synchronous, recommended)
76-
- `pymssql` - FreeTDS driver (synchronous)
77-
- `aioodbc` - Async wrapper for pyodbc
65+
This library requires a database driver to be installed separately. Since you're already using SQLAlchemy, you likely have the appropriate driver installed. For a complete list of SQLAlchemy-supported drivers, see the [SQLAlchemy Dialects documentation](https://docs.sqlalchemy.org/en/latest/dialects/).
7866

79-
**Oracle:**
80-
- `oracledb` - Official driver (synchronous & asynchronous, recommended)
81-
- `cx_Oracle` - Legacy driver (synchronous)
82-
83-
> ℹ️ **Note:** \
84-
> The drivers listed above are commonly used options. In general, any driver supported by SQLAlchemy for your target database should work with sqlalchemy-dlock. For a complete list of SQLAlchemy-supported drivers, see the [SQLAlchemy Dialects documentation](https://docs.sqlalchemy.org/en/latest/dialects/).
85-
86-
Example installation:
87-
```bash
88-
pip install sqlalchemy-dlock mysqlclient psycopg2-binary pyodbc oracledb
89-
```
67+
> ℹ️ **Notes**:
68+
> - **MSSQL**: The `pyodbc` driver requires the Microsoft ODBC driver to be installed on your system. On Ubuntu/Debian:
69+
> ```bash
70+
> sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18
71+
> ```
72+
> - **Oracle**:
73+
> Oracle Database Free (23c/23ai) does NOT support `DBMS_LOCK.REQUEST` which is required for distributed lock functionality. For production use with Oracle, a full Oracle Database (Enterprise/Standard Edition) installation is required.
9074
9175
### Basic Usage
9276

db.docker-compose.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,12 @@ services:
3838
environment:
3939
ORACLE_PASSWORD: "YourStrong@Passw0rd"
4040
# Note: Oracle Free container requires at least 2GB RAM to run properly
41+
#
42+
# IMPORTANT: Oracle Database Free (23c/23ai) does NOT support DBMS_LOCK.REQUEST
43+
# which is required for distributed lock functionality. This is a known
44+
# limitation of the Free/Express edition.
45+
#
46+
# For production use, a full Oracle Database (Enterprise/Standard Edition)
47+
# is required. Use a self-hosted runner or cloud database service.
48+
#
4149
# Connection string: oracle+oracledb://sys:YourStrong@Passw0rd@127.0.0.1:1521/?service_name=FREEPDB1

scripts/run-test.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
set -eu
22

33
export TEST_URLS="mysql://$MYSQL_USER:$MYSQL_PASSWORD@mysql/$MYSQL_DATABASE postgresql://postgres:$POSTGRES_PASSWORD@postgres/ mssql+pyodbc://sa:$MSSQL_SA_PASSWORD@mssql:1433/master?driver=ODBC+Driver+18+for+SQL+Server&TrustServerCertificate=yes"
4+
45
export TEST_ASYNC_URLS="mysql+aiomysql://$MYSQL_USER:$MYSQL_PASSWORD@mysql/$MYSQL_DATABASE postgresql+asyncpg://postgres:$POSTGRES_PASSWORD@postgres/ mssql+aioodbc://sa:$MSSQL_SA_PASSWORD@mssql:1433/master?driver=ODBC+Driver+18+for+SQL+Server&TrustServerCertificate=yes"
56

67
# Note: Database health is ensured by docker-compose healthcheck + depends_on condition
8+
# Note: Oracle testing skipped - Oracle Database Free does NOT support DBMS_LOCK.REQUEST
79

810
export SETUPTOOLS_SCM_PRETEND_VERSION=0
911
export PIP_DISABLE_PIP_VERSION_CHECK=1
1012
export PIP_ROOT_USER_ACTION=ignore
1113
export PIP_NO_WARN_SCRIPT_LOCATION=1
1214

13-
PYTHON_LIST=(python3.9 python3.10 python3.11 python3.12 python3.13 python3.14)
15+
export PYTHON_LIST=(python3.9 python3.10 python3.11 python3.12 python3.13 python3.14)
16+
1417
REQUIRES_LIST=("SQLAlchemy[asyncio]>=1.4.3,<2" "SQLAlchemy[asyncio]>=2,<3")
1518

1619
trap 'rm -rf /tmp/sqlalchemy-dlock-test-*' EXIT
@@ -23,7 +26,6 @@ do
2326
echo "---------------------------------------------------------------"
2427
echo "Begin of ${PYTHON} ${REQUIRES}"
2528
echo "---------------------------------------------------------------"
26-
echo
2729
TMPDIR=$(mktemp -d -t sqlalchemy-dlock-test-${PYTHON}-${REQUIRES//[^a-zA-Z0-9]/-})
2830
(
2931
set -e

0 commit comments

Comments
 (0)