Your message dated Wed, 25 Feb 2026 15:03:59 +0000
with message-id <[email protected]>
and subject line Bug#1126027: fixed in pypi2deb 5.20260225
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 ---
Source: pypi2deb
Source-Version: 5.20260225
Done: Piotr Ożarowski <[email protected]>

We believe that the bug you reported is fixed in the latest version of
pypi2deb, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Piotr Ożarowski <[email protected]> (supplier of updated pypi2deb package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Wed, 25 Feb 2026 15:43:50 +0100
Source: pypi2deb
Architecture: source
Version: 5.20260225
Distribution: unstable
Urgency: medium
Maintainer: Piotr Ożarowski <[email protected]>
Changed-By: Piotr Ożarowski <[email protected]>
Closes: 1126027
Changes:
 pypi2deb (5.20260225) unstable; urgency=medium
 .
   [ Piotr Ożarowski ]
   * Drop no longer needed dpt-maint profile
   * Use dhpython's normalize_name instead of safe_name (closes: 1126027)
 .
   [ Ermakov Alexander ]
   * Fix proxy issues
Checksums-Sha1:
 54756b1accfe98207b2a86c8e700a1b8f903c259 1648 pypi2deb_5.20260225.dsc
 1f4750b2f8b3c94576cb13fac69f15ff1aa347e7 21072 pypi2deb_5.20260225.tar.xz
 b182cdd67dff61c5299332ad03eb6cd457cf89ce 6328 
pypi2deb_5.20260225_amd64.buildinfo
Checksums-Sha256:
 739e33b22880fdc9fde05e76c9a56ee65ae5e1f1eaa8fc90935d08b87064ca1b 1648 
pypi2deb_5.20260225.dsc
 0b34574496fa3b0d9ad454f16007d2c42012becfc60e0371b3074936873c6f24 21072 
pypi2deb_5.20260225.tar.xz
 25f9ca2ca8645b9d3b413b77b2d80bcdbd3224d42dbe8068c42658c6b68a8c95 6328 
pypi2deb_5.20260225_amd64.buildinfo
Files:
 beacfd03567970cfa28078bf5070bb14 1648 python optional pypi2deb_5.20260225.dsc
 1983e6f1ae1dabb84d8fff931ca22692 21072 python optional 
pypi2deb_5.20260225.tar.xz
 cefb2df946c428b06f2cc74dbe60c676 6328 python optional 
pypi2deb_5.20260225_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEHS+omFjar2IXhi33rvbxoqdFdkUFAmmfC8cACgkQrvbxoqdF
dkWtOhAArrxlb7fSgakUSmFvroW+WheQrUS7xk+0FO8HEe4zPULqBoL81/MpUeJx
49y+wv9LQKNrB9/K7YTpA+bJBBWfXYd8FrFF89ivLzdCLBUlDv9zsGHq7VMAVanU
ssnWKDUtOM+MRZGkNkb+6iWGZeFpoe6sUzyncgtnqHRVN+5q2connPWUEux8iyY2
6gxLH3JL/wn1JjJjbWqwpG1TlxcIB4v9eR2GCg/HwZBnizs7sJ5IotUFqckLCxxX
w9I6KL4/3lGWsHvrYGKhSFpt9tOkeAByRBlS0WbIYw32+NKuQB+h6iXElhn8S5PF
NAuG2KuN8fkTH+8/OzyD8LvqCXooKNpPjGi5W2gJmcmXKPTSL/PYPDXXU84Dstz6
cHTFG7CiqRzPUtyqeGG2IgwKfayvzRmxXrA2lhlnOtB7E1ZTZP1dFByfJUAKW1iN
A0846KG8SWQg6Yeb5CthH+qs8s1w6U5viVtwk2daOAxVbIjnJvJS3pwjXZQswtzL
i9KlD+hLVGVxA6zkZcuh5Pjob9dIJO7R26sI23ODvLDy+KniPPI22y3tFHBV26jn
aZfJev9xctwpl8Pn84GBu8Qtt8c6F5nSBy3VM0FD2NlyXx9p/f8k0cQ8bAa49EHW
Y0S6+YTcrJuD5bg9iWQLYU+8v+y0qqQ7ho7eieMFO9jj8ojtYaA=
=K87v
-----END PGP SIGNATURE-----

Attachment: pgpoEBtJikjsM.pgp
Description: PGP signature


--- End Message ---

Reply via email to