-
Notifications
You must be signed in to change notification settings - Fork 54
Replace pkg_resources with importlib_resources #91
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
base: master
Are you sure you want to change the base?
Conversation
|
Is there anything I can do to get this merged? |
|
As python 3.12 is now the new stable python version and raise a deprecated warning on using pkg_resources api, this merge is really needed |
|
Was about to look into fixing this. Thanks @tvuotila for taking care of it. |
|
Hoping to see this merged soon ... |
|
I'm joining to the crowd waiting this PR merged soon... |
|
Bump |
|
Throw us a Christmas gift @lukasgraf Pretty please :-) |
|
Hoping to see this merged too... |
2 similar comments
|
Hoping to see this merged too... |
|
Hoping to see this merged too... |
|
Same. Maybe @buchi can help? |
|
+1 |
|
@buchi Save us please, deprecation warnings are ugly. |
|
can you tell me if this update will be included in the master branch? |
|
Hoping to see this merged too... |
|
bump |
|
Can this fix be merged and released soon? |
|
@lukasgraf is this on your radar? Dependants on docxtpl are currently getting this warning: Any help with this issue will be much appreciated by many! Best to you 😎 |
|
Hey @acanalis and everyone else, |
|
hi |
|
If people at 4teamwork are not interested in maintaining this anymore,
the repo might even be transferred rather than forked.
Could it be to [JazzBand](https://jazzband.co/about)? If only for
security, to avoid giving it to some anonymous GH account.
@buchi, is 4teamwork still interested in this? Would you be open to
transfer (this and PyPI project) to volunteers? You may even keep it
here and just invite external contributors.
|
from july 2025 |
|
@lukasgraf Who does still work for 4teamwork that you recommend reaching out to? Thanks! |
|
@jcardali, maybe @buchi. Looks like is the only one who touch the project after @lukasgraf quit. |
|
@etienned I tagged him in #105 (comment), but no response yet 🤞 |
|
@lukasgraf even if you're no longer with 4teamwork, perhaps you can point us to a reliable contact at the organization who could approve this PR and get eyes on making sure external contributors could approve a PR and publish a new version to PyPI? @buchi doesn't appear to be responsive. It looks like we're only a few weeks out from possible package removal on the 30th of this month; perhaps darkvision's repo or another fork will be the best alternative, but it'd be a shame to need to publish a new package to PyPI instead of a new version! |
|
is there any forked and fixed repository? I want to add to my pyproject directly from github |
setup.py
Outdated
| include_package_data=True, | ||
| zip_safe=True, | ||
| install_requires=[ | ||
| 'importlib-resources >= 1.3;python_version<"3.9"', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This backport needs to be imported differently: the module name is importlib_resources, not importlib.resources.
However, given that Python 3.8 EOL date was in October 2024, I think you can remove this backport completely and bump required Python to 3.9.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are completely right!
I will bump the required Python to 3.9.
Fixes 4teamwork#90 Require Python 3.9+, because importlib.resources.files is used.
Fixes #90
Use
importlib.resources.files(usage copied from documentation) instead of deprecatedpkg_resources.resource_string(function documentation).Install
importlib-resourcesbackport package on Python versions less than 3.9 (documentation on how to do that).importlib.resources.fileswas introduced in Python 3.9 (function documentation).Use minimum version of 1.3 forI was importing theimportlib-resourcespackage as that matches the Python 3.9 (compatibility table)importlib-resourcespackage wrong. I instead bumped the required Python version to 3.9.