[Piuparts-devel] Bug#1074287: piuparts: Piuparts uses a configparser removed in Python 3.12

Diane Trout diane at ghic.org
Wed Jun 26 00:35:42 BST 2024


Package: piuparts
Version: 1.4.2
Severity: normal

Dear Maintainer,

I noticed my numba piuparts jobs crashed
https://salsa.debian.org/science-team/numba/-/jobs/5890084

with the following error.

Piuparts caught exception, exiting...
------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/sbin/piuparts", line 3667, in <module>
    main()
  File "/usr/sbin/piuparts", line 3610, in main
    args = parse_command_line()
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/sbin/piuparts", line 3523, in parse_command_line
    settings.distro_config = piupartslib.conf.DistroConfig(DISTRO_CONFIG_FILE, settings.debian_mirrors[0][0])
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/piupartslib/conf.py", line 159, in __init__
    cp = configparser.SafeConfigParser()
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'configparser' has no attribute
'SafeConfigParser'. Did you mean: 'RawConfigParser'?


I suspected that was due to Python3.12 becoming default in unstable now,
Python 3.12 no longer has the SafeConfigParser class.

In Python 3.11 SafeConfigParser is a subclass of ConfigParser that adds
a deprecation warning saying SafeConfigParser will be removed in 3.12.

https://github.com/python/cpython/blob/3.11/Lib/configparser.py#L1245

Diane

-- System Information:
Debian Release: trixie/sid
  APT prefers stable-security
  APT policy: (500, 'stable-security'), (500, 'testing'), (500, 'stable'), (110, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.7.12-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages piuparts depends on:
ii  debootstrap      1.0.134
ii  debsums          3.0.2.1
ii  libjs-sphinxdoc  7.2.6-8
ii  lsb-release      12.0-2
ii  lsof             4.95.0-1.1
ii  mount            2.40.1-8.1
ii  piuparts-common  1.4.2
ii  python3          3.11.8-1
ii  python3-debian   0.1.49

Versions of packages piuparts recommends:
ii  adequate  0.15.12

Versions of packages piuparts suggests:
pn  docker.io  <none>
ii  schroot    1.6.13-3+b3

-- no debconf information



More information about the Piuparts-devel mailing list