Skip to content
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

Import broken by sqlalchemy 1.4.0 #505

Closed
NakulK48 opened this issue Mar 15, 2021 · 10 comments · Fixed by #506
Closed

Import broken by sqlalchemy 1.4.0 #505

NakulK48 opened this issue Mar 15, 2021 · 10 comments · Fixed by #506

Comments

@NakulK48
Copy link

[2021-03-15T18:09:18.021Z] ../../../miniconda/envs/jenkins-jca_multibranch-PR-52-1/lib/python3.8/site-packages/sqlalchemy_utils/functions/orm.py:14: in <module>

[2021-03-15T18:09:18.021Z]     from sqlalchemy.orm.query import _ColumnEntity

[2021-03-15T18:09:18.021Z] E   ImportError: cannot import name '_ColumnEntity' from 'sqlalchemy.orm.query' (/home/jcauser/miniconda/envs/jenkins-jca_multibranch-PR-52-1/lib/python3.8/site-packages/sqlalchemy/orm/query.py)
@bahamut45
Copy link

👍 same error

@aduggirala28
Copy link

aduggirala28 commented Mar 15, 2021

Same issue, error with importing '_ColumnEntity'

14:45:43 .tox/py37/lib/python3.7/site-packages/sqlalchemy_utils/functions/orm.py:14: in <module>
14:45:43     from sqlalchemy.orm.query import _ColumnEntity
14:45:43 E   ImportError: cannot import name '_ColumnEntity' from 'sqlalchemy.orm.query'
Name: SQLAlchemy
Version: 1.4.0
Summary: Database Abstraction Library
Home-page: http://www.sqlalchemy.org
Author: Mike Bayer
Author-email: [email protected]
License: MIT
Requires: greenlet
Required-by: SQLAlchemy-Utils, Flask-SQLAlchemy, alembic
Name: SQLAlchemy-Utils
Version: 0.36.8
Summary: Various utility functions for SQLAlchemy.
Home-page: https://github.com/kvesteri/sqlalchemy-utils
Author: Konsta Vesterinen, Ryan Leckey, Janne Vanhala, Vesa Uimonen
Author-email: [email protected]
License: BSD
Requires: six, SQLAlchemy
Required-by: 

@jbvsmo
Copy link

jbvsmo commented Mar 15, 2021

Can you guys make a quick fix by adding requirement version < 1.4.0? Otherwise if people start doing it they might get stuck with old sqlalchemy

@nsoranzo
Copy link
Contributor

Duplicate of #474

@NakulK48
Copy link
Author

Duplicate of #474

1.4 left beta yesterday, so I think this is more urgent now than it was.

yannickperrenet added a commit to orchest/orchest that referenced this issue Mar 16, 2021
The latest 1.4.0 release breaks sqlalchemy-utils.

See: kvesteri/sqlalchemy-utils#505
@sphuber
Copy link

sphuber commented Mar 16, 2021

There is another problem:

/opt/hostedtoolcache/Python/3.8.8/x64/lib/python3.8/site-packages/sqlalchemy_utils/expressions.py:4: in <module>
    from sqlalchemy.sql.expression import (
E   ImportError: cannot import name '_literal_as_text' from 'sqlalchemy.sql.expression' (/opt/hostedtoolcache/Python/3.8.8/x64/lib/python3.8/site-packages/sqlalchemy/sql/expression.py)

This is because of this commit in sqlalchemy.

techouse referenced this issue in techouse/sqlite3-to-mysql Mar 16, 2021
techouse referenced this issue in techouse/mysql-to-sqlite3 Mar 16, 2021
diegodelemos pushed a commit to diegodelemos/reana-db that referenced this issue Mar 17, 2021
diegodelemos pushed a commit to diegodelemos/reana-db that referenced this issue Mar 17, 2021
* Issue caused by an imcompatibility between sqlalchemy-utils
  and latest SQLAlchemy 1.4 (see more here
  kvesteri/sqlalchemy-utils#505).
diegodelemos pushed a commit to diegodelemos/reana-commons that referenced this issue Mar 17, 2021
* pytest-reana 0.7.1 depends on the latest REANA-DB 0.7.3
  which fixes an installation problem caused by
  kvesteri/sqlalchemy-utils#505.
@waghmareomkar
Copy link

[2021-03-15T18:09:18.021Z] ../../../miniconda/envs/jenkins-jca_multibranch-PR-52-1/lib/python3.8/site-packages/sqlalchemy_utils/functions/orm.py:14: in <module>

[2021-03-15T18:09:18.021Z]     from sqlalchemy.orm.query import _ColumnEntity

[2021-03-15T18:09:18.021Z] E   ImportError: cannot import name '_ColumnEntity' from 'sqlalchemy.orm.query' (/home/jcauser/miniconda/envs/jenkins-jca_multibranch-PR-52-1/lib/python3.8/site-packages/sqlalchemy/orm/query.py)

it worked for me when i installed using conda instead of pip. Hope it works for you aswell.

@mgrandi
Copy link

mgrandi commented Mar 18, 2021

you can temporarily fix this by changing the imports in sqlalchemy_utils\functions\orm.py:

from sqlalchemy.orm.query import _ColumnEntity

to

from sqlalchemy.orm.context import _ColumnEntity

@namelivia
Copy link

It seems that #506 is being in the works to fix this

@WolfgangFahl
Copy link

tiborsimko added a commit to tiborsimko/opendata.cern.ch that referenced this issue Jun 28, 2021
Pins SQLAlchemy to solve incompatibility of later versions with
sqlalchemy-utils. See
kvesteri/sqlalchemy-utils#505

Pins Flask-SQLAlchemy due to related apply_driver_hacks issues.
tiborsimko added a commit to tiborsimko/opendata.cern.ch that referenced this issue Jun 28, 2021
Pins SQLAlchemy to solve incompatibility of later versions with
sqlalchemy-utils. See
kvesteri/sqlalchemy-utils#505

Pins Flask-SQLAlchemy due to related apply_driver_hacks issues.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants