Skip to content

Support for python 3.12 #416

Closed
Closed
@richin13

Description

@richin13

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions