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

declarative_base available from sqlalchemy.orm in 1.4 #250

Open
philbudne opened this issue Oct 20, 2022 · 3 comments
Open

declarative_base available from sqlalchemy.orm in 1.4 #250

philbudne opened this issue Oct 20, 2022 · 3 comments

Comments

@philbudne
Copy link

https://docs.sqlalchemy.org/en/14/orm/extensions/declarative/

Changed in version 1.4: The vast majority of the Declarative extension is now integrated into the SQLAlchemy ORM and is importable from the sqlalchemy.orm namespace.

Using the old location (ext.declarative) gives a deprecation warning when SQLALCHEMY_WARN_20 enabled.

@Evan6998
Copy link

Evan6998 commented Nov 9, 2022

same, can not use from sqlalchemy.orm import declarative_base now, which throws error: Invalid base class "Base" [misc]

@astrojuanlu
Copy link

The last update of sqlalchemy.orm.__init__.pyi was 2 years ago, before SQLAlchemy 1.4.0 was released. Wondering if the authors would consider merging a pull request with a fix, although there seem to be a bunch of unanswered PRs.

@slifty
Copy link

slifty commented Jul 6, 2024

Following up here since I'm facing this for the as_declarative -- I get a deprecation warning, but when It ry to import from sqlalchemy.orm the type check fails.

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

No branches or pull requests

4 participants