Debian Bug report logs - #1083471
mallard-ducktype: (build-)depends on deprecated module python3-pkg-resources

version graph

Package: src:mallard-ducktype; Maintainer for src:mallard-ducktype is Debian GNOME Maintainers <[email protected]>;

Reported by: Matthias Klose <[email protected]>

Date: Fri, 4 Oct 2024 09:47:10 UTC

Severity: normal

Tags: moreinfo, sid, trixie, upstream

Found in version mallard-ducktype/1.0.2-2

Forwarded to https://github.com/projectmallard/mallard-ducktype/issues/21

Reply or subscribe to this bug.

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


Report forwarded to Debian GNOME Maintainers <[email protected]>:
Bug#1083471; Package src:mallard-ducktype. (Fri, 04 Oct 2024 09:47:10 GMT) (full text, mbox, link).


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


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

From: Matthias Klose <[email protected]>
To: [email protected]
Subject: mallard-ducktype: (build-)depends on deprecated module python3-pkg-resources
Date: Fri, 04 Oct 2024 09:43:33 +0000
Package: src:mallard-ducktype
Version: 1.0.2-2
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 GNOME Maintainers <[email protected]>:
Bug#1083471; Package src:mallard-ducktype. (Fri, 04 Oct 2024 13:30:01 GMT) (full text, mbox, link).


Acknowledgement sent to Simon McVittie <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian GNOME Maintainers <[email protected]>. (Fri, 04 Oct 2024 13:30:01 GMT) (full text, mbox, link).


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

From: Simon McVittie <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: Re: Bug#1083471: Migrating away from pkg_resources is difficult for namespace packages
Date: Fri, 4 Oct 2024 14:27:19 +0100
Control: tags -1 + upstream moreinfo
Control: forwarded -1 https://github.com/projectmallard/mallard-ducktype/issues/21

On Fri, 04 Oct 2024 at 11:22:32 +0100, 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.

mallard-ducktype (#1083471) is in a similar situation, although there don't
seem to be any third-party extensions to it packaged in Debian in practice,
so we might be able to get away with just deleting
/usr/lib/python3/dist-packages/mallard/ducktype/extensions/__init__.py and
hoping it doesn't break anything for unpackaged code.

I've asked upstream whether they are aware of third-party extensions that
are not packaged in Debian. I'm not intending to work on this further in
mallard-ducktype until there is an obvious correct thing to do.

Thanks,
    smcv



Added tag(s) upstream and moreinfo. Request was from Simon McVittie <[email protected]> to [email protected]. (Fri, 04 Oct 2024 13:30:01 GMT) (full text, mbox, link).


Set Bug forwarded-to-address to 'https://github.com/projectmallard/mallard-ducktype/issues/21'. Request was from Simon McVittie <[email protected]> to [email protected]. (Fri, 04 Oct 2024 13:30:02 GMT) (full text, mbox, link).


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: bembo

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.