drop the final remaining use of the deprecated pkg_resources module#590
drop the final remaining use of the deprecated pkg_resources module#590eli-schwartz wants to merge 1 commit intoPyFilesystem:masterfrom
Conversation
Declaring a namespace package has gone through a few revisions. pkg_resources has a version that is heavily deprecated. pkgutil provides a python2/python3 compatible version that is also compatible with native python3 namespaces. https://packaging.python.org/en/latest/guides/packaging-namespace-packages/ pkg_resources is very very deprecated and importing or using it results in deprecation warnings. It's time to move off of it entirely. Fixes: PyFilesystem#577
7365022 to
c009996
Compare
pyfilesystem2 is no longer actively maintained, but it uses a deprecated function, leading to these warnings: ``` python3.11/site-packages/fs/__init__.py:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html ``` see e.g. PyFilesystem/pyfilesystem2#590 fortunately, fsspec and https://github.com/iterative/morefs are sufficient to cover a direct transition
|
Given the deprecation warning suggests pkg_resources will be removed november this year, are we able to renew the push for this again? :) |
|
I haven't given up on this PR by the way -- I am not aware of any issues with it though, so I'm just waiting for someone with commit access to review... |
|
@willmcgugan Can this be reviewed and merged? |
merged both branches in pkg-resources-part-1-and-2 edit: now this also includes #588 |
This comment was marked as outdated.
This comment was marked as outdated.
|
@milahu please see all my pending PRs, not just two of them. There is a third that fixes that in a very different way than the one you propose. |
|
Hi, any plans to merge this? |
|
@lurch seems to the one with write access |
|
Does anyone have a working version that I can point uv to? |
|
Ok. For anyone looking for this, there is a working version here: https://github.com/milahu/pyfilesystem2/tree/pkg-resources-part-1-and-2 You'll need to mangle your requirements.txt. / Pipfile / etc to point to that specifically. Consider it temporary till the official maintainer merges. Hopefully the maintainer of the official version will merge these fixes in. |
Declaring a namespace package has gone through a few revisions. pkg_resources has a version that is heavily deprecated. pkgutil provides a python2/python3 compatible version that is also compatible with native python3 namespaces.
https://packaging.python.org/en/latest/guides/packaging-namespace-packages/
pkg_resources is very very deprecated and importing or using it results in deprecation warnings. It's time to move off of it entirely.
Fixes: #577
Depends on: #589