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

Support for python 3.12 #416

Closed
richin13 opened this issue Nov 14, 2024 · 10 comments · Fixed by #417
Closed

Support for python 3.12 #416

richin13 opened this issue Nov 14, 2024 · 10 comments · Fixed by #417

Comments

@richin13
Copy link
Contributor

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:

def is_sqlalchemy_version_less_than(version_string):
"""Check the installed SQLAlchemy version"""
return pkg_resources.get_distribution(
"SQLAlchemy"
).parsed_version < pkg_resources.parse_version(version_string)
def is_graphene_version_less_than(version_string): # pragma: no cover
"""Check the installed graphene version"""
return pkg_resources.get_distribution(
"graphene"
).parsed_version < pkg_resources.parse_version(version_string)

richin13 added a commit to richin13/graphene-sqlalchemy that referenced this issue Nov 14, 2024
@erikwrede
Copy link
Member

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
Copy link
Contributor Author

@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?

@erikwrede
Copy link
Member

@richin13 sounds good to also drop 3.8, but I'd prefer doing that together with adding 3.13

@richin13
Copy link
Contributor Author

@richin13 sounds good to also drop 3.8, but I'd prefer doing that together with adding 3.13

@erikwrede good call, I've updated the PR accordingly.

As a side note, we should seriously consider upgrading dev dependencies here (adding a proper package manager, dropping SQLAchemy 1.2 and upgrading tox, to mention some)

@erikwrede
Copy link
Member

@richin13 also on the list. Sadly my time budget for open source (and also that of the other people with access on this project) has been a little tight this year. The idea was to switch Graphene & -sqlalchemy to Poetry

@richin13
Copy link
Contributor Author

@erikwrede gotchu! how's your time for PR reviews? I can help pushing the code updates if there's support/time to review the PRs

@Robert-van-Barlingen
Copy link

+1

@flash42
Copy link

flash42 commented Dec 3, 2024

It would be super nice if you could merge the fix 🙏 @erikwrede

@erikwrede
Copy link
Member

@richin13 there is time for reviews.Apart from me, you can also ping @jendrikjoe @sabard @PaulSchweizer for reviews, as we all have write access. Best to just use a list, but usually its fastest to ping me. Another option is to DM me on the Graphene Discord.

Thanks again, please keep the contribs coming!

@erikwrede
Copy link
Member

3.0.0rc2 😊

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

Successfully merging a pull request may close this issue.

4 participants