public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH] patches: upstream: python3.12 compat
@ 2024-11-12 19:06 Jing Luo via pve-devel
  0 siblings, 0 replies; only message in thread
From: Jing Luo via pve-devel @ 2024-11-12 19:06 UTC (permalink / raw)
  To: pve-devel; +Cc: Jing Luo

[-- Attachment #1: Type: message/rfc822, Size: 7148 bytes --]

From: Jing Luo <jing@jing.rocks>
To: pve-devel@lists.proxmox.com
Cc: Jing Luo <jing@jing.rocks>
Subject: [PATCH] patches: upstream: python3.12 compat
Date: Wed, 13 Nov 2024 04:06:16 +0900
Message-ID: <20241112190615.3293806-2-jing@jing.rocks>

Prepare for debian trixie. Upstream has not yet made a new release since
Dec 2023, backporting this commit to make ifupdown2 work on trixie. Also
fixes an RC bug on debian (#1074250). Also fixed a typo in the commit msg.

upstream: https://github.com/CumulusNetworks/ifupdown2/commit/fc0318378e878ffe639d1d1285936d1256dd67cf
Signed-off-by: Jing Luo <jing@jing.rocks>
---
 debian/patches/series                         |  1 +
 .../upstream/0001-python312-compat.patch      | 27 +++++++++++++++++++
 2 files changed, 28 insertions(+)
 create mode 100644 debian/patches/upstream/0001-python312-compat.patch

diff --git a/debian/patches/series b/debian/patches/series
index 7ae3f0a..c14c181 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -14,3 +14,4 @@ upstream/0001-scheduler-import-traceback.patch
 upstream/0001-addons-vxlan-fix-compare-between-remote-ips-and-old_.patch
 upstream/0001-scheduler-avoid-waiting-for-stdout-eof-of-etc-networ.patch 
 upstream/0001-vxlan-fix-vni-filter.patch
+upstream/0001-python312-compat.patch
diff --git a/debian/patches/upstream/0001-python312-compat.patch b/debian/patches/upstream/0001-python312-compat.patch
new file mode 100644
index 0000000..c36482f
--- /dev/null
+++ b/debian/patches/upstream/0001-python312-compat.patch
@@ -0,0 +1,27 @@
+From fc0318378e878ffe639d1d1285936d1256dd67cf Mon Sep 17 00:00:00 2001
+From: Jan Huijsmans <huysmans@koffie.nu>
+Date: Tue, 9 Jul 2024 09:03:25 +0200
+Subject: [PATCH] Bug #296: python 3.12 compatibility
+
+Since python 3.2, readfp needs to be replaced by read_file.
+Python 3.12 dropped the readfp function.
+
+Patch provided as PR by me, as the original reporter failed to do
+so since 4-4-2024 and my systems break due to this issue.
+---
+ ifupdown2/ifupdown/main.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ifupdown2/ifupdown/main.py b/ifupdown2/ifupdown/main.py
+index 8e0f13f4..de6579ea 100644
+--- a/ifupdown2/ifupdown/main.py
++++ b/ifupdown2/ifupdown/main.py
+@@ -138,7 +138,7 @@ def read_config(self):
+         configStr = '[ifupdown2]\n' + config
+         configFP = io.StringIO(configStr)
+         parser = configparser.RawConfigParser()
+-        parser.readfp(configFP)
++        parser.read_file(configFP)
+         configmap_g = dict(parser.items('ifupdown2'))
+ 
+         # Preprocess config map
-- 
2.47.0




[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-11-12 19:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-12 19:06 [pve-devel] [PATCH] patches: upstream: python3.12 compat Jing Luo via pve-devel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal