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