8000 Bugfix: Fix SQLAlchemy V2 Support by ADR-007 · Pull Request #293 · sqlalchemy-redshift/sqlalchemy-redshift · GitHub
[go: up one dir, main page]

Skip to content

Bugfix: Fix SQLAlchemy V2 Support #293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
0.8.15 (unreleased)
-------------------

- Nothing changed yet.
- Fix SQLAlchemy V2 support (https://github.com/sqlalchemy-redshift/sqlalchemy-redshift/pull/293)


0.8.14 (2023-04-07)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
install_requires=[
# requires sqlalchemy.sql.base.DialectKWArgs.dialect_options, new in
# version 0.9.2
'SQLAlchemy>=0.9.2,<2.0.0',
'SQLAlchemy>=0.9.2,<3.0.0',
'packaging',
],
classifiers=[
Expand Down
3 changes: 1 addition & 2 deletions sqlalchemy_redshift/dialect.py
Original file line number Diff line number Diff line change
Expand Up @@ -1368,9 +1368,8 @@ def on_connect(self):
fns = []

def on_connect(conn):
from sqlalchemy import util
from sqlalchemy.sql.elements import quoted_name
conn.py_types[quoted_name] = conn.py_types[util.text_type]
conn.py_types[quoted_name] = conn.py_types[str]

fns.append(on_connect)

Expand Down
2 changes: 2 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ envlist =
py39-pg28-sa14
py310-pg28-sa13
py310-pg28-sa14
py310-pg28-sa20
lint
docs

Expand All @@ -13,6 +14,7 @@ passenv = PGPASSWORD,REDSHIFT_USERNAME,REDSHIFT_HOST,REDSHIFT_PORT,REDSHIFT_DATA
deps =
sa13: sqlalchemy==1.3.24
sa14: sqlalchemy==1.4.15
sa20: sqlalchemy==2.0.23
pg28: psycopg2==2.8.6
pg29: psycopg2==2.9.5
alembic==1.9.2
Expand Down
0