-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Replace types-SQLAlchemy requirement with SQLAlchemy in Flask-SQLAlchemy #8333
Conversation
This removes the types-SQLAlchemy requirement from Flask-SQLAlchemy because the user may instead be using sqlalchemy-provided stubs rather than third-party stubs.
Sounds like maybe this should be an issue instead :/ from the pre-commit results |
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
There's two things that don't make this possible yet, unfortunately:
|
It's currently not possible to depend on non-type packages from typeshed packages. Also, SQLAlchemy doesn't ship with a py.typed file at the moment, so its type annotation won't be used. SQLAlchemy 2 will include the py.typed file if I understand correctly. |
Ah, that's too bad. I was really hoping it'd be possible to use the sqlalchemy |
Thank you for the information though and sorry for the incorrect PR |
If there are useful types from |
No worries, thanks for the PR, even if it wasn't successful! :) |
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
This removes the types-SQLAlchemy requirement from Flask-SQLAlchemy because the user may instead be using sqlalchemy-provided stubs rather than third-party stubs.
If there is a way to instead make this conditional, this should be closed and that approach should be used instead to isolate the version appropriately.