Debian Bug report logs - #1084009
zope.deprecation: (build-)depends on deprecated module python3-pkg-resources

version graph

Package: src:zope.deprecation; Maintainer for src:zope.deprecation is Debian Python Team <[email protected]>;

Reported by: Matthias Klose <[email protected]>

Date: Fri, 4 Oct 2024 09:53:50 UTC

Severity: normal

Tags: sid, trixie

Found in version zope.deprecation/5.0-1

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to Debian Python Team <[email protected]>:
Bug#1084009; Package src:zope.deprecation. (Fri, 04 Oct 2024 09:53:51 GMT) (full text, mbox, link).


Acknowledgement sent to Matthias Klose <[email protected]>:
New Bug report received and forwarded. Copy sent to Debian Python Team <[email protected]>. (Fri, 04 Oct 2024 09:53:51 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Matthias Klose <[email protected]>
To: [email protected]
Subject: zope.deprecation: (build-)depends on deprecated module python3-pkg-resources
Date: Fri, 04 Oct 2024 09:52:53 +0000
Package: src:zope.deprecation
Version: 5.0-1
Severity: normal
Tags: sid trixie
User: [email protected]
Usertags: pkg-resources-deprecation

[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.



Information forwarded to [email protected], Debian Python Team <[email protected]>:
Bug#1084009; Package src:zope.deprecation. (Fri, 04 Oct 2024 10:27:04 GMT) (full text, mbox, link).


Acknowledgement sent to Colin Watson <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian Python Team <[email protected]>. (Fri, 04 Oct 2024 10:27:05 GMT) (full text, mbox, link).


Message #10 received at [email protected] (full text, mbox, reply):

From: Colin Watson <[email protected]>
To: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Cc: Matthias Klose <[email protected]>
Subject: Migrating away from pkg_resources is difficult for namespace packages
Date: Fri, 4 Oct 2024 11:22:32 +0100
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):

  __import__('pkg_resources').declare_namespace(__name__)

As
https://packaging.python.org/en/latest/guides/packaging-namespace-packages/#pkg-resources-style-namespace-packages
says:

  If you are creating a new distribution within an existing namespace
  package that uses this method then it’s recommended to continue using
  this as the different methods are not cross-compatible and it’s not
  advisable to try to migrate an existing package.

I know pkg_resources is deprecated for most other purposes, but even
upstream currently advises here not to try to migrate in this case.
Now, I know there've been some attempts to figure this out:
https://github.com/pypa/sample-namespace-packages thinks a migration may
be possible as long as developers are willing to accept some
limitations.  But it's still a difficult migration and upstream hasn't
really got going on it; for Zope, see
https://github.com/zopefoundation/meta/issues/194.

Please can you reconsider, and not force this for Debian trixie?  I
think we need to keep pkg_resources around for this use case until a
good deal more work has been done on migrating away from it for
namespace packages.

-- 
Colin Watson (he/him)                              [[email protected]]



Information forwarded to [email protected], Debian Python Team <[email protected]>:
Bug#1084009; Package src:zope.deprecation. (Sat, 05 Oct 2024 03:00:02 GMT) (full text, mbox, link).


Acknowledgement sent to Matthias Klose <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian Python Team <[email protected]>. (Sat, 05 Oct 2024 03:00:03 GMT) (full text, mbox, link).


Message #15 received at [email protected] (full text, mbox, reply):

From: Matthias Klose <[email protected]>
To: Colin Watson <[email protected]>, [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Migrating away from pkg_resources is difficult for namespace packages
Date: Sat, 5 Oct 2024 04:34:54 +0200
On 04.10.24 12:22, Colin Watson wrote:
> 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):
> 
>    __import__('pkg_resources').declare_namespace(__name__)
> 
> As
> https://packaging.python.org/en/latest/guides/packaging-namespace-packages/#pkg-resources-style-namespace-packages
> says:
> 
>    If you are creating a new distribution within an existing namespace
>    package that uses this method then it’s recommended to continue using
>    this as the different methods are not cross-compatible and it’s not
>    advisable to try to migrate an existing package.
> 
> I know pkg_resources is deprecated for most other purposes, but even
> upstream currently advises here not to try to migrate in this case.
> Now, I know there've been some attempts to figure this out:
> https://github.com/pypa/sample-namespace-packages thinks a migration may
> be possible as long as developers are willing to accept some
> limitations.  But it's still a difficult migration and upstream hasn't
> really got going on it; for Zope, see
> https://github.com/zopefoundation/meta/issues/194.
> 
> Please can you reconsider, and not force this for Debian trixie?  I
> think we need to keep pkg_resources around for this use case until a
> good deal more work has been done on migrating away from it for
> namespace packages.

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




Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 13:20:51 2025; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.