Skip to content

Commit

Permalink
Remove upper-binding for SQLAlchemy
Browse files Browse the repository at this point in the history
There was a problem with custom classes for SQLAlchemy that
prevented it to work on MySQL. This PR removes the SQLAlchemy
upper binding.

This has been added as an issue in:

sqlalchemy/sqlalchemy#7660

But apparently it's been fixed in one of the more recent SQLAlchemy
releases.
  • Loading branch information
potiuk committed Jul 4, 2022
1 parent 6621f68 commit ecdf53f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 1 addition & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,7 @@ install_requires =
rich>=12.4.4
rich-click>=1.3.1
setproctitle>=1.1.8
# SQL Alchemy 1.4.10 introduces a bug where for PyODBC driver UTCDateTime fields get wrongly converted
# as string and fail to be converted back to datetime. It was supposed to be fixed in
# https://github.com/sqlalchemy/sqlalchemy/issues/6366 (released in 1.4.12) but apparently our case
# is different. Opened https://github.com/sqlalchemy/sqlalchemy/issues/7660 to track it
sqlalchemy>=1.4,<1.4.10
sqlalchemy>=1.4
sqlalchemy_jsonfield>=1.0
tabulate>=0.7.5
tenacity>=6.2.0
Expand Down
3 changes: 3 additions & 0 deletions tests/utils/test_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ def test_database_schema_and_sqlalchemy_model_are_in_sync(self):
lambda t: (t[0] == 'remove_table' and t[1].name == 'spt_fallback_usg'),
lambda t: (t[0] == 'remove_table' and t[1].name == 'MSreplication_options'),
lambda t: (t[0] == 'remove_table' and t[1].name == 'spt_fallback_dev'),
# MSSQL foreign keys where CASCADE has been removed
lambda t: (t[0] == 'remove_fk' and t[1].name == 'task_reschedule_dr_fkey'),
lambda t: (t[0] == 'add_fk' and t[1].name == 'task_reschedule_dr_fkey'),
# Ignore flask-session table/index
lambda t: (t[0] == 'remove_table' and t[1].name == 'session'),
lambda t: (t[0] == 'remove_index' and t[1].name == 'session_id'),
Expand Down

0 comments on commit ecdf53f

Please sign in to comment.