Control: tags 1074750 + patch Control: tags 1074750 + pending Dear maintainer,
I've prepared an NMU for vanguards (versioned as 0.3.1-2.5) and uploaded it to DELAYED/1. Please feel free to tell me if I should cancel it. cu Adrian
diffstat for vanguards-0.3.1 vanguards-0.3.1 changelog | 7 ++++++ patches/python-3.12.patch | 51 ++++++++++++++++++++++++++++++++++++++++++++++ patches/series | 1 3 files changed, 59 insertions(+) diff -Nru vanguards-0.3.1/debian/changelog vanguards-0.3.1/debian/changelog --- vanguards-0.3.1/debian/changelog 2024-05-25 11:14:47.000000000 +0300 +++ vanguards-0.3.1/debian/changelog 2025-04-10 20:51:40.000000000 +0300 @@ -1,3 +1,10 @@ +vanguards (0.3.1-2.5) unstable; urgency=medium + + * Non-maintainer upload. + * Add fix for FTBFS with Python >= 3.12 (Closes: #1074750) + + -- Adrian Bunk <b...@debian.org> Thu, 10 Apr 2025 20:51:40 +0300 + vanguards (0.3.1-2.4) unstable; urgency=medium * Non-maintainer upload. diff -Nru vanguards-0.3.1/debian/patches/python-3.12.patch vanguards-0.3.1/debian/patches/python-3.12.patch --- vanguards-0.3.1/debian/patches/python-3.12.patch 1970-01-01 02:00:00.000000000 +0200 +++ vanguards-0.3.1/debian/patches/python-3.12.patch 2025-04-10 20:51:36.000000000 +0300 @@ -0,0 +1,51 @@ +Origin: https://github.com/mikeperry-tor/vanguards/pull/105/commits/183d24775521feb3ed61b681088347279c3fc84c +From: Dave Jones <d...@waveform.org.uk> +Date: Wed, 28 Aug 2024 12:54:24 +0100 +Subject: [PATCH] Python 3.12 compatibility + +Python 3.12 removes the deprecated `SafeConfigParser` class. This patch +switches the code to using ConfigParser and read_file from Python 3.x, +and patches 2.7's SafeConfigParser to a compatible definition. +--- + src/vanguards/config.py | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +diff --git a/src/vanguards/config.py b/src/vanguards/config.py +index 1c33391..b8e3f9c 100644 +--- a/src/vanguards/config.py ++++ b/src/vanguards/config.py +@@ -16,9 +16,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 ################## + +@@ -209,7 +212,7 @@ def set_options_from_module(config, module, section): + 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") +@@ -219,9 +222,9 @@ def generate_config(): + 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 -Nru vanguards-0.3.1/debian/patches/series vanguards-0.3.1/debian/patches/series --- vanguards-0.3.1/debian/patches/series 2019-02-06 21:09:54.000000000 +0200 +++ vanguards-0.3.1/debian/patches/series 2025-04-10 20:51:36.000000000 +0300 @@ -1 +1,2 @@ store-state-in-var-lib-tor.patch +python-3.12.patch