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

pyproject: Use SQLAlchemy v2 mypy plugin #323

Closed
wants to merge 1 commit into from
Closed

Conversation

tony
Copy link
Member

@tony tony commented Dec 10, 2023

Copy link

codecov bot commented Dec 10, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3a2aec7) 69.87% compared to head (a25306c) 69.87%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #323   +/-   ##
=======================================
  Coverage   69.87%   69.87%           
=======================================
  Files           9        9           
  Lines         654      654           
  Branches       88       88           
=======================================
  Hits          457      457           
  Misses        191      191           
  Partials        6        6           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tony tony force-pushed the sqlalchemy-mypy branch 2 times, most recently from 9eb7963 to 884f602 Compare December 10, 2023 15:06
@tony
Copy link
Member Author

tony commented Dec 10, 2023

Deprecated

SQLAlchemy 1.4 introduced the first SQLAlchemy-native ORM typing support using a combination of sqlalchemy2-stubs and the Mypy Plugin. In SQLAlchemy 2.0, the Mypy plugin remains available, and has been updated to work with SQLAlchemy 2.0’s typing system. However, it should now be considered deprecated, as applications now have a straightforward path to adopting the new typing support that does not use plugins or stubs.

See: https://docs.sqlalchemy.org/en/20/changelog/whatsnew_20.html#whatsnew-20-orm-declarative-typing

Deprecated since version 2.0: The SQLAlchemy Mypy Plugin is DEPRECATED, and will be removed possibly as early as the SQLAlchemy 2.1 release. We would urge users to please migrate away from it ASAP.

This plugin cannot be maintained across constantly changing releases of mypy and its stability going forward CANNOT be guaranteed.

Modern SQLAlchemy now offers fully pep-484 compliant mapping syntaxes; see the linked section for migration details.

See also: https://docs.sqlalchemy.org/en/20/orm/extensions/mypy.html

@tony tony closed this Dec 10, 2023
@tony tony deleted the sqlalchemy-mypy branch December 10, 2023 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant