Skip to content

Commit

Permalink
Hooks: sqlachemy: Fix compatibility with 1.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
bwoodsend committed Mar 29, 2021
1 parent d71a9ff commit dded4ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions PyInstaller/hooks/hook-sqlalchemy.py
Expand Up @@ -24,6 +24,9 @@
# are not. We should explicitly include database backends.
hiddenimports = ['pysqlite2', 'MySQLdb', 'psycopg2', 'sqlalchemy.ext.baked']

if is_module_satisfies('sqlalchemy >= 1.4'):
hiddenimports.append("sqlalchemy.sql.default_comparator")

# In SQLAlchemy >= 0.6, the "sqlalchemy.dialects" package provides dialects.
if is_module_satisfies('sqlalchemy >= 0.6'):
dialects = exec_statement("import sqlalchemy.dialects;print(sqlalchemy.dialects.__all__)")
Expand Down
1 change: 1 addition & 0 deletions news/5679.hooks.rst
@@ -0,0 +1 @@
Update hook for ``sqlalchemy`` to support version 1.4.0 and above.

0 comments on commit dded4ea

Please sign in to comment.