Closed zillionare closed 3 years ago
I add print(dir(schema))
before line 211, and got the output:
['BLANK_SCHEMA', 'CheckConstraint', 'ClauseElement', 'Column', 'ColumnClause', 'ColumnCollectionConstraint', 'ColumnCollectionMixin', 'ColumnDefault', 'ColumnElement', 'Computed', 'Constraint', 'DEFAULT_NAMING_CONVENTION', 'DedupeColumnCollection', 'DefaultClause', 'DefaultGenerator', 'DialectKWArgs', 'FetchedValue', 'ForeignKey', 'ForeignKeyConstraint', 'Identity', 'IdentityOptions', 'Index', 'InternalTraversal', 'MetaData', 'NULL_UNSPECIFIED', 'PrimaryKeyConstraint', 'RETAIN_SCHEMA', 'SchemaEventTarget', 'SchemaItem', 'Sequence', 'Table', 'TableClause', 'TextClause', 'ThreadLocalMetaData', 'UniqueConstraint', 'builtins', 'cached', 'doc', 'file', 'loader', 'name', 'package', 'spec', '_bind_or_error', '_copy_expression', '_document_text_coercion', '_get_table_key', 'absolute_import', 'coercions', 'collections', 'ddl', 'event', 'exc', 'inspection', 'quoted_name', 'roles', 'sqlalchemy', 'to_instance', 'type_api', 'util', 'visitors']
doesn't contains _schema_getter
after I enter into the container, and run pip3 freeze |grep 'SQLAlchemy`, it's surprise that the version is 1.4.1. After rollback the version to 1.3.23, the exception disappear.
install 1.4.1 again, the error appears.
so this is an issue of version.
Please have SQLAlchemy's version locked.
SQLAlchemy's version is defined to be <1.4 here https://github.com/python-gino/gino/blob/master/pyproject.toml#L28 The restriction has been there. I suspect your other dependency doesn't limit it.
A clean install shows below
$ pip install gino
Collecting gino
Using cached gino-1.0.1-py3-none-any.whl (49 kB)
Collecting asyncpg<1.0,>=0.18
Using cached asyncpg-0.22.0.tar.gz (770 kB)
Collecting SQLAlchemy<1.4,>=1.2.16
Using cached SQLAlchemy-1.3.23.tar.gz (6.3 MB)
Building wheels for collected packages: asyncpg, SQLAlchemy
Building wheel for asyncpg (setup.py) ... done
Created wheel for asyncpg: filename=asyncpg-0.22.0-cp39-cp39-macosx_11_0_x86_64.whl size=1242347 sha256=b785bce395a4ef8e26dec867855b7ff549839882f0ce9c481f55ced3c04c44c9
Stored in directory: /Users/tony/Library/Caches/pip/wheels/15/2a/b2/03c1c00e4194fda753056a3913f38300ee9992f286fb1d4240
Building wheel for SQLAlchemy (setup.py) ... done
Created wheel for SQLAlchemy: filename=SQLAlchemy-1.3.23-cp39-cp39-macosx_11_0_x86_64.whl size=1213378 sha256=9ad0ed44ade36ad96309f5e442a8432a49baa8058212489d4ba9ee43f928cfc8
Stored in directory: /Users/tony/Library/Caches/pip/wheels/01/dc/3d/de7017735f3161747b4dee9bdaff7dcaaf73abff49bb0c230f
Successfully built asyncpg SQLAlchemy
Installing collected packages: asyncpg, SQLAlchemy, gino
Successfully installed SQLAlchemy-1.3.23 asyncpg-0.22.0 gino-1.0.1
duplicate #765
closed this issue, since Gino has declare the right dependancy.
Thanks for the quick reponse, great confidence with Gino ^_^
Describe the bug when import gino, it throws exception:
To Reproduce I don't know what's exactly condition. It works before, just broken lately.
Environment (please complete the following information):
Additional context This is a service runs in a docker container, depends to postgres:10 images. the docker-compose file works days ago, don't know why it suddenly don't work. No change to my service executable, and I try to install them out of docker container, it works.