Fix FTBFS on python 3.12

Bug #2078742 reported by Dave Jones
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vanguards (Ubuntu)
Fix Released
Undecided
Dave Jones
Noble
Fix Released
Undecided
Dave Jones

Bug Description

[Impact]

 * vanguards is incompatible with Python 3.12 which
   removes the deprecated SafeConfigParser class.

 * This causes the package to FTBFS on Noble/Oracular.

[Test Plan]

 * Confirm the source package builds successfully.
 * Compare the binary package contents with the older
   build (last working) and confirm it is as expected
   (no changes other than the applied code changes,
   and other reasonable delta; e.g., version strings).

[Regression Potential]

 * Another, different build failure (actually progress).
 * Different package contents after the rebuild.

Dave Jones (waveform)
Changed in vanguards (Ubuntu):
status: New → Confirmed
assignee: nobody → Dave Jones (waveform)
Dave Jones (waveform)
Changed in vanguards (Ubuntu Noble):
status: New → Confirmed
assignee: nobody → Dave Jones (waveform)
Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Added the SRU bug template for Noble.

description: updated
Changed in vanguards (Ubuntu Noble):
status: Confirmed → Fix Committed
tags: added: verification-needed verification-needed-noble
Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote : Please test proposed package

Hello Dave, or anyone else affected,

Accepted vanguards into noble-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/vanguards/0.3.1-2.3ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-noble to verification-done-noble. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-noble. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package vanguards - 0.3.1-2.4ubuntu1

---------------
vanguards (0.3.1-2.4ubuntu1) oracular; urgency=medium

  * Added patches for Python 3.12 compatibility (LP: #2078742):
    - d/p/python-3.12.patch

 -- Dave Jones <email address hidden> Mon, 02 Sep 2024 21:44:07 +0100

Changed in vanguards (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :
Download full text (3.9 KiB)

Verification done on Noble:

1) Package builds successfully

@ https://launchpad.net/ubuntu/+source/vanguards/0.3.1-2.3ubuntu0.1
Builds
Noble: [FULLYBUILT] amd64

2) Package content delta is as expected

$ debdiff vanguards_0.3.1-2.3_all.deb vanguards_0.3.1-2.3ubuntu0.1_all.deb
[The following lists of changes regard files as different if they have
different names, permissions or owners.]

Files in second .deb but not in first
-------------------------------------
-rw-r--r-- root/root /usr/lib/systemd/system/vanguards.service

Files in first .deb but not in second
-------------------------------------
-rw-r--r-- root/root /lib/systemd/system/vanguards.service

Control files: lines which differ (wdiff format)
------------------------------------------------
{+Breaks: python3-minimal (<< 3.12.3-0ubuntu2~)+}
Installed-Size: [-124-] {+123+}
Version: [-0.3.1-2.3-] {+0.3.1-2.3ubuntu0.1+}

$ ls -ld /lib
lrwxrwxrwx 1 root root 7 May 3 2021 /lib -> usr/lib

$ dpkg-deb -x vanguards_0.3.1-2.3_all.deb deb-old
$ dpkg-deb -x vanguards_0.3.1-2.3ubuntu0.1_all.deb deb-new

$ diff -ur deb-old/ deb-new/
Only in deb-old/: lib
diff -ur deb-old/usr/lib/python3/dist-packages/vanguards/config.py deb-new/usr/lib/python3/dist-packages/vanguards/config.py
--- deb-old/usr/lib/python3/dist-packages/vanguards/config.py 2019-04-10 19:41:55.000000000 -0300
+++ deb-new/usr/lib/python3/dist-packages/vanguards/config.py 2024-08-25 19:40:21.000000000 -0300
@@ -14,9 +14,12 @@
 from .logger import plog

 try:
- from configparser import SafeConfigParser, Error
+ from configparser import ConfigParser, Error
 except ImportError:
   from ConfigParser import SafeConfigParser, Error
+ class ConfigParser(SafeConfigParser):
+ def read_file(self, f, source=None):
+ return self.readfp(f, source)

 ################# Global options ##################

@@ -176,7 +179,7 @@
       config.set(section, param, str(val))

 def generate_config():
- config = SafeConfigParser(allow_no_value=True)
+ config = ConfigParser(allow_no_value=True)
   set_options_from_module(config, sys.modules[__name__], "Global")
   set_options_from_module(config, vanguards, "Vanguards")
   set_options_from_module(config, bandguards, "Bandguards")
@@ -185,9 +188,9 @@
   return config

 def apply_config(config_file):
- config = SafeConfigParser(allow_no_value=True)
+ config = ConfigParser(allow_no_value=True)

- config.readfp(open(config_file, "r"))
+ config.read_file(open(config_file, "r"))

   get_options_for_module(config, sys.modules[__name__], "Global")
   get_options_for_module(config, vanguards, "Vanguards")
diff -ur deb-old/usr/lib/python3/dist-packages/vanguards-0.3.1.egg-info/entry_points.txt deb-new/usr/lib/python3/dist-packages/vanguards-0.3.1.egg-info/entry_points.txt
--- deb-old/usr/lib/python3/dist-packages/vanguards-0.3.1.egg-info/entry_points.txt 2022-11-29 05:34:36.000000000 -0300
+++ deb-new/usr/lib/python3/dist-packages/vanguards-0.3.1.egg-info/entry_points.txt 2024-08-25 19:40:21.000000000 -0300
@@ -1,3 +1,2 @@
 [console_scripts]
 vanguards = vanguards.main:main
-
diff -ur deb-old/usr/lib/python3/dist-packages/vanguards-0.3.1.egg-info/PKG-INFO deb-new/usr/lib/python3/dist-p...

Read more...

tags: added: verification-done verification-done-noble
removed: verification-needed verification-needed-noble
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package vanguards - 0.3.1-2.3ubuntu0.1

---------------
vanguards (0.3.1-2.3ubuntu0.1) noble; urgency=medium

  * Ensure fixed version of py3compile/py3clean is used when upgrading
    (LP: #2075337)
  * Added patches for Python 3.12 compatibility (LP: #2078742):
    - d/p/python-3.12.patch

 -- Dave Jones <email address hidden> Sun, 25 Aug 2024 23:40:21 +0100

Changed in vanguards (Ubuntu Noble):
status: Fix Committed → Fix Released
Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote : Update Released

The verification of the Stable Release Update for vanguards has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.