Your message dated Sun, 25 Jan 2026 08:41:41 +0200
with message-id <87jyx6p522.fsf@farfetchd>
and subject line Close, no longer reproducible
has caused the Debian Bug report #1126027,
regarding pypi2deb: cannot import name 'safe_name' from
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1126027: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1126027
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: pypi2deb
Version: 4.20240727
Severity: grave
Justification: renders package unusable
Hello,
py2dsp (pypi2debian) doesn't longer work with current dh-python (likely
after dh-python 6.20251030)
$ py2dsp -h
Traceback (most recent call last):
File "/usr/bin/py2dsp", line 32, in <module>
from pypi2deb.debianize import debianize
File "/usr/share/pypi2deb/pypi2deb/debianize.py", line 32, in <module>
from pypi2deb.tools import execute
File "/usr/share/pypi2deb/pypi2deb/tools.py", line 31, in <module>
from dhpython.pydist import load, safe_name
ImportError: cannot import name 'safe_name' from 'dhpython.pydist'
(/usr/share/dh-python/dhpython/pydist.py)
After changing 'safe_name' for 'normalize_name' it fails further
E: py2dsp py2dsp:173: 'PyDist' object is not subscriptable
Traceback (most recent call last):
File "/usr/bin/py2dsp", line 171, in <module>
asyncio.run(main(args))
~~~~~~~~~~~^^^^^^^^^^^^
File "/usr/lib/python3.13/asyncio/runners.py", line 195, in run
return runner.run(main)
~~~~~~~~~~^^^^^^
File "/usr/lib/python3.13/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/lib/python3.13/asyncio/base_events.py", line 725, in
run_until_complete
return future.result()
~~~~~~~~~~~~~^^
File "/usr/bin/py2dsp", line 77, in main
fname = await download(name, version=requested_version,
destdir=args.root)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/pypi2deb/pypi2deb/pypi.py", line 146, in download
fname = '{}_{}.orig.{}'.format(pkg_name(name), download_version, ext)
~~~~~~~~^^^^^^
File "/usr/share/pypi2deb/pypi2deb/tools.py", line 125, in pkg_name
names = _load_package_names()
File "/usr/share/pypi2deb/pypi2deb/decorators.py", line 49, in __cache
res = func(*args, **kwargs)
File "/usr/share/pypi2deb/pypi2deb/tools.py", line 147, in
_load_package_names
result[key.lower()] = details[0]['dependency'].replace('python3-', '')
~~~~~~~~~~^^^^^^^^^^^^^^
TypeError: 'PyDist' object is not subscriptable
The quick fix below allowed to achieve what I needed but I certainly
missed other points
for key in data.keys():
details = data.get(normalize_name(key))
result[key.lower()] =
details[0].dependency.replace('python3-', '')
Thanks for your support
-- System Information:
Debian Release: forky/sid
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500,
'oldstable-updates'), (500, 'oldstable-security'), (500, 'testing'),
(500, 'stable'), (500, 'oldstable'), (450, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 6.18.3 (SMP w/12 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE
not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages pypi2deb depends on:
ii build-essential 12.12
ii devscripts 2.26.4
ii dh-python 7.20251231
ii python3 3.13.7-1+b1
ii python3-aiohttp 3.13.3-3
ii python3-debian 1.0.1
ii python3-github 2.6.1-1
ii python3-jinja2 3.1.6-1
ii python3-redis 6.4.0-1
Versions of packages pypi2deb recommends:
ii python3-msgpack 1.1.2-1
Versions of packages pypi2deb suggests:
pn cython <none>
pn cython3 <none>
pn python-all-dev <none>
pn python-pytest <none>
pn python-setuptools <none>
ii python3-all-dev 3.13.7-1+b1
pn python3-pytest <none>
ii python3-setuptools 78.1.1-0.1
ii python3-sphinx 8.2.3-12
-- no debconf information
Thank you for using reportbug
--- End Message ---
--- Begin Message ---
Version: 1:30.2+1-2
According to the reporter this bug can no longer be reproduced using the
current version of Emacs.
Reopen if needed.
--
Arto Jantunen
--- End Message ---