-
-
Notifications
You must be signed in to change notification settings - Fork 285
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
Removed usage of deprecated pkg_resources #541
Conversation
A few things:
|
Define version instead in polymorphic/__init__.py file.
Thanks @markgras for the hinter. I wasn't aware of attr directive. I have updated it accordingly. Furthermore, I added a version synonym for backwards compatibility, but if the maintainers decide this is not needed I am happy to remove it as well. |
Happy to help! The module attribute being accessed can have any name. In your new commit you could assign the version string to |
Just as an update. Python 3.12 removed pkg_resources, so it is not possible to use django-polymorphic anymore with Python 3.12. This PR fixes this as well. Great if it could get merged. |
ran into this in python 3.12 as well. thanks for fixing it. hope we can get a release soon. |
This way Python 3.12 will work as following PR was merged. jazzband/django-polymorphic#541
This way Python 3.12 will work as following PR was merged. jazzband/django-polymorphic#541
This is fixed in jazzband/django-polymorphic#541 , but there has not yet been a release.
The last release is from 2021: https://pypi.org/project/django-polymorphic/#history , but in this repository are many updates. Is djanog-polymorphic dead (on pypi)? |
Fixes #503
pkg_resources
is deprecated and should not be used anymore. We encountered this in our CI see django-json-api/django-rest-framework-json-api#1146The version is now defined in
polymorphic/__init__.py
andsetup.py
extracts it from there. This way, there is also no need for setuptools to be installed when using django polymorphic.