Closed mcepl closed 2 years ago
-standard library +setuptools
-standard library +setuptools
Could you elaborate a little bit, please?
https://build.opensuse.org/request/show/993338
- pkg_resources is provided by setuptools, but the previously transitive pull in of setuptools has been broken by gtk-doc --> python3-Pygments -/-> python3-setuptools
https://build.opensuse.org/request/show/993312#comment-1659321
pkg_resources is a (deprecated) part of setuptools and the reason it failed is because gtk-doc requires Pygments which had setuptools as requirement but does not have it anymore.
https://setuptools.pypa.io/en/latest/pkg_resources.html
The pkg_resources module distributed with setuptools provides an API for Python libraries to access their resource files, and for extensible applications and frameworks to automatically discover plugins. It also provides runtime support for using C extensions that are inside zipfile-format eggs, support for merging packages that have separately-distributed modules or subpackages, and APIs for managing Python’s current “working set” of active packages.
Use of pkg_resources is discouraged in favor of importlib.resources, importlib.metadata, and their backports (importlib_resources, importlib_metadata). Please consider using those libraries instead of pkg_resources.
This has nothing to do with the standard library of python 3.10 or any previous python versions.
OK, so what do you suggest we should do here?
Nothing. It was a packaging error on the openSUSE side and has been fixed.
A simple BuildRequires: python3-setuptools
would have been enough. In fact I had that prepared but my submission failed due to a race condition with your submission.
The patch works and doesn't harm, but is not as pressing as your initial description would imply. Current setuptools still ships pkg_resources and does not throw DeprecationWarnings
unless you are feeding it invalid versions (LegacyVersion
) AFAICT.
When running build of the package in openSUSE/Factory with Python 3.10 we hit the crash, because
pkg_resources
package have been removed from the standard library and the functionality moved to the externalpackaging
package on PyPI.This patch fixes the issue.