-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[BUG] v70.0.0 removes 'packaging' from pkg_resources #4385
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
Comments
from pkg_resources import packaging no longer works. See pypa/setuptools#4385 Signed-off-by: Dan Mick <[email protected]>
from pkg_resources import packaging no longer works. See pypa/setuptools#4385 Signed-off-by: Dan Mick <[email protected]>
from pkg_resources import packaging no longer works. See pypa/setuptools#4385 Signed-off-by: Dan Mick <[email protected]>
from pkg_resources import packaging no longer works. See pypa/setuptools#4385. Try pinning (which will need to downgrade) here. Signed-off-by: Dan Mick <[email protected]>
This is also breaking PyTorch 2.1 (not PyTorch 2.2+). Will you consider adding it back?
|
Hi @dmick , please see the explanation for the behaviour you are observing in #4376 (comment). Tl;DR: the package you are using was relying on an internal implementation detail of I recommend contacting the maintainers of that package and reporting the bug on their end. The easiest way to fix this is to install and import The API documentation for You can also check which "names" are public in the package by inspecting the |
"from pkg_resources import packaging" no longer works. See pypa/setuptools#4385. Pin setuptools to v65.5.1 to avoid this until we can fix the various usages. See https://tracker.ceph.com/issues/66201 for more info. Signed-off-by: Dan Mick <[email protected]>
instead of relying on the internal implementation of pkg_resources, let's import packaging directly. in this change, we also add the dependency to the packaging module in the packaging recipes. See also pypa/setuptools#4385 Refs https://tracker.ceph.com/issues/66201 Signed-off-by: Kefu Chai <[email protected]>
instead of relying on the internal implementation of pkg_resources, let's import packaging directly. in this change, we also add the dependency to the packaging module in the packaging recipes. See also pypa/setuptools#4385 Fixes https://tracker.ceph.com/issues/66201 Signed-off-by: Kefu Chai <[email protected]>
instead of relying on the internal implementation of pkg_resources, let's import packaging directly. in this change, we also add the dependency to the packaging module in the packaging recipes. See also pypa/setuptools#4385 Fixes https://tracker.ceph.com/issues/66201 Signed-off-by: Kefu Chai <[email protected]>
instead of relying on the internal implementation of pkg_resources, let's import packaging directly. in this change, we also add the dependency to the packaging module in the packaging recipes. See also pypa/setuptools#4385 Fixes https://tracker.ceph.com/issues/66201 Signed-off-by: Kefu Chai <[email protected]>
instead of relying on the internal implementation of pkg_resources, let's import packaging directly. in this change, we also add the dependency to the packaging module in the packaging recipes. See also pypa/setuptools#4385 Fixes https://tracker.ceph.com/issues/66201 Signed-off-by: Kefu Chai <[email protected]> (cherry picked from commit 844b66d)
instead of relying on the internal implementation of pkg_resources, let's import packaging directly. in this change, we also add the dependency to the packaging module in the packaging recipes. See also pypa/setuptools#4385 Fixes https://tracker.ceph.com/issues/66201 Signed-off-by: Kefu Chai <[email protected]> (cherry picked from commit 844b66d)
Although the argument is understandable, |
@rsxdalv , that is the side effect of imports, and that is why It is unfortunate that so many people missed it. But all the public names in If people desire to use |
I agree, once I realized about python imports causing a side-effect where they are automatically exported I was not very happy. Alternatively, should projects have a deep-lint to check if somebody-somewhere is importing outside of all declaration? Meanwhile, javascript has some extremely strict linting because every bad pattern (such as importing what you are not supposed to) that can be done will be done. |
@rsxdalv I believe that every Python developer will have a different answer for that, as there are many styles and workflows for package development 😅1. I think the best is always to check for the docs of a particular project that you want to use. You may be able to find some linters that check against "non-exported names". Maybe it is worth asking around if the Footnotes
|
instead of relying on the internal implementation of pkg_resources, let's import packaging directly. in this change, we also add the dependency to the packaging module in the packaging recipes. See also pypa/setuptools#4385 Fixes https://tracker.ceph.com/issues/66201 Signed-off-by: Kefu Chai <[email protected]> (cherry picked from commit 844b66d)
instead of relying on the internal implementation of pkg_resources, let's import packaging directly. in this change, we also add the dependency to the packaging module in the packaging recipes. See also pypa/setuptools#4385 Fixes https://tracker.ceph.com/issues/66201 Signed-off-by: Kefu Chai <[email protected]> (cherry picked from commit 844b66d)
instead of relying on the internal implementation of pkg_resources, let's import packaging directly. in this change, we also add the dependency to the packaging module in the packaging recipes. See also pypa/setuptools#4385 Fixes https://tracker.ceph.com/issues/66201 Signed-off-by: Kefu Chai <[email protected]> (cherry picked from commit 844b66d) Conflicts: debian/ceph-mgr-modules-core.requires src/pybind/mgr/prometheus/module.py
instead of relying on the internal implementation of pkg_resources, let's import packaging directly. in this change, we also add the dependency to the packaging module in the packaging recipes. See also pypa/setuptools#4385 Fixes https://tracker.ceph.com/issues/66201 Signed-off-by: Kefu Chai <[email protected]> (cherry picked from commit 844b66d) Conflicts: debian/ceph-mgr-modules-core.requires src/pybind/mgr/prometheus/module.py
instead of relying on the internal implementation of pkg_resources, let's import packaging directly. in this change, we also add the dependency to the packaging module in the packaging recipes. See also pypa/setuptools#4385 Fixes https://tracker.ceph.com/issues/66201 Signed-off-by: Kefu Chai <[email protected]> (cherry picked from commit 844b66d) Conflicts: debian/ceph-mgr-modules-core.requires src/pybind/mgr/prometheus/module.py
instead of relying on the internal implementation of pkg_resources, let's import packaging directly. in this change, we also add the dependency to the packaging module in the packaging recipes. See also pypa/setuptools#4385 Fixes https://tracker.ceph.com/issues/66201 Signed-off-by: Kefu Chai <[email protected]> (cherry picked from commit 844b66d) Conflicts: debian/ceph-mgr-modules-core.requires src/pybind/mgr/prometheus/module.py
instead of relying on the internal implementation of pkg_resources, let's import packaging directly. in this change, we also add the dependency to the packaging module in the packaging recipes. See also pypa/setuptools#4385 Fixes https://tracker.ceph.com/issues/66201 Signed-off-by: Kefu Chai <[email protected]> (cherry picked from commit 844b66d) Conflicts: debian/ceph-mgr-modules-core.requires src/pybind/mgr/prometheus/module.py
instead of relying on the internal implementation of pkg_resources, let's import packaging directly. in this change, we also add the dependency to the packaging module in the packaging recipes. See also pypa/setuptools#4385 Fixes https://tracker.ceph.com/issues/66201 Signed-off-by: Kefu Chai <[email protected]> (cherry picked from commit 844b66d) Conflicts: debian/ceph-mgr-modules-core.requires src/pybind/mgr/prometheus/module.py
instead of relying on the internal implementation of pkg_resources, let's import packaging directly. in this change, we also add the dependency to the packaging module in the packaging recipes. See also pypa/setuptools#4385 Fixes https://tracker.ceph.com/issues/66201 Signed-off-by: Kefu Chai <[email protected]> (cherry picked from commit 844b66d) Conflicts: debian/ceph-mgr-modules-core.requires src/pybind/mgr/prometheus/module.py
instead of relying on the internal implementation of pkg_resources, let's import packaging directly. in this change, we also add the dependency to the packaging module in the packaging recipes. See also pypa/setuptools#4385 Fixes https://tracker.ceph.com/issues/66201 Signed-off-by: Kefu Chai <[email protected]> (cherry picked from commit 844b66d) Conflicts: debian/ceph-mgr-modules-core.requires src/pybind/mgr/prometheus/module.py (cherry picked from commit 28f69d6)
setuptools version
setuptools=70.0.0
Python version
3.8
OS
Ubuntu 22.04
Additional environment information
first noticed on readthedocs.org builds today
Description
from pkg_resources import packaging
fails with
ImportError: cannot import name 'packaging' from 'pkg_resources'
Expected behavior
expected the import to succeed as in v69.5.1 and prior
How to Reproduce
python3 -mvenv v
v/bin/pip install pkg_resources
v/bin/python3
Output
The text was updated successfully, but these errors were encountered: