graphql-python / graphene-sqlalchemy

Graphene SQLAlchemy integration
http://docs.graphene-python.org/projects/sqlalchemy/en/latest/
MIT License
981 stars 228 forks source link

Support for python 3.12 #416

Open richin13 opened 8 hours ago

richin13 commented 8 hours ago

From the pkg_resources docs: setuptools.pypa.io/en/latest/pkg_resources.html

Use of pkg_resources is deprecated in favor of importlib.resources, importlib.metadata and their backports (importlib_resources, importlib_metadata). Some useful APIs are also provided by packaging (e.g. requirements and version parsing). Users should refrain from new usage of pkg_resources and should work to port to importlib-based solutions.

Python 3.12 has removed pkg_resources from the standard library: docs.python.org/3/whatsnew/3.12.html and this project makes use of it in the graphene_sqlalchemy/utils.py file:

https://github.com/graphql-python/graphene-sqlalchemy/blob/eb9c663cc0e314987397626573e3d2f940bea138/graphene_sqlalchemy/utils.py#L8

https://github.com/graphql-python/graphene-sqlalchemy/blob/eb9c663cc0e314987397626573e3d2f940bea138/graphene_sqlalchemy/utils.py#L23-L34

erikwrede commented 6 hours ago

Adding 3.12&3.13 support was still on my list for this library, thanks for the PR, will check it out this week!

richin13 commented 5 hours ago

@erikwrede thank you! looks like we'd need to drop support for 3.7 (which has reached EOL anyways). Could also drop 3.8 which is also EOL.

Any thoughts?