Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
ci: use psycopg 3 for the PostgreSQL database tests
SQLAlchemy 2.1.0 (released 2026-09-24) changed the default driver for
bare postgresql:// URLs from psycopg2 to psycopg (v3). The Database
Unit Tests job used a bare URL but only installed psycopg2-binary, so
create_engine failed with "No module named 'psycopg'" on every run:
https://github.com/slackapi/python-slack-sdk/actions/runs/36079341012

Install psycopg[binary] in place of psycopg2-binary and name the driver
explicitly in TEST_DATABASE_URL, the form SQLAlchemy's 2.1 migration
guide recommends, so the job no longer depends on SQLAlchemy's default.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
  • Loading branch information
WilliamBergamin and Claude committed Sep 25, 2026
commit 9ab7f2fe210593a93d86e0755ad7068dd80a5e3e
2 changes: 1 addition & 1 deletion .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ jobs:
pip install -r requirements/databases.txt
- name: Run sync tests (PostgreSQL)
env:
TEST_DATABASE_URL: postgresql://test_user:password@localhost/test
TEST_DATABASE_URL: postgresql+psycopg://test_user:password@localhost/test
run: |
PYTHONPATH=$PWD:$PYTHONPATH pytest -s tests/slack_sdk/oauth/installation_store/test_sqlalchemy.py
PYTHONPATH=$PWD:$PYTHONPATH pytest -s tests/slack_sdk/oauth/state_store/test_sqlalchemy.py
Expand Down
4 changes: 2 additions & 2 deletions requirements/databases.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# pip install -r requirements/databases.txt
# Database drivers for CI testing.

# psycopg2-binary
# psycopg
# Note: postgreSQL driver (sync).
psycopg2-binary>=2.9.12,<3
psycopg[binary]>=3.3.6,<4

# asyncpg
# Note: postgreSQL driver (async).
Expand Down
Loading