#1083460 lazr.restfulclient: (build-)depends on deprecated module python3-pkg-resources

#1083460#5
Date:
2024-10-04 09:43:19 UTC
From:
To:
[This bug is targeted to the upcoming trixie release]

The package build-depends or depends on python3-pkg-resources, which is
deprecated upstream. Details can be found at

https://setuptools.pypa.io/en/latest/pkg_resources.html

Use of pkg_resources is deprecated in favor of importlib.resources,
importlib.metadata and their backports (importlib_resources, importlib_metadata).
Some useful APIs are also provided by packaging (e.g. requirements and version
parsing). Users should refrain from new usage of pkg_resources and should work
to port to importlib-based solutions.

Python 3.12 in unstable provides both importlib_resources and
importlib_metadata, so no additional dependencies on those packages are needed.

#1083460#10
Date:
2024-10-04 10:22:32 UTC
From:
To:
While pkg_resources is indeed deprecated upstream, there's nothing that
we can sensibly do about it at the Debian level in lazr.* or zope.*, and
it's not even as clear as you might hope what to do upstream.  They all
do something like this in an __init__.py (with unimportant variations):

#1083460#15
Date:
2024-10-05 02:34:54 UTC
From:
To:
I don't want to force it.  the separation of this module into it's own
module is a Debian specific change to avoid runtime dependencies on
pkg_resources.  So you'll find a lot of hard-coded dependencies that are
just not used anymore. That's what I want to catch for the trixie release.

Matthias

#1083460#22
Date:
2025-09-19 15:44:16 UTC
From:
To:
Hi,

Now that there's a way to define namespace packages without pkg_resources,
can this bug be reconsidered?

I don't know how the communication with Ubuntu  devs works.

Greetings

https://git.launchpad.net/lazr.restfulclient

#1083460#27
Date:
2025-09-19 16:39:24 UTC
From:
To:
It'll have to be done as a flag day, in the same sort of way as the
recent Zope work (https://github.com/zopefoundation/meta/issues/194).  I
have no objection but also no time for it.

FWIW, the lazr.* packages are maintained by Canonical's Launchpad team
rather than by Ubuntu developers as such (I'm not sure any of that team
are Ubuntu developers now that William and I have both left).