* Re: [pve-devel] [PATCH ifupdown2] patches: upstream: python3.12 compat
[not found] <20241112190615.3293806-2-jing@jing.rocks>
@ 2024-11-15 19:26 ` Jing Luo via pve-devel
0 siblings, 0 replies; only message in thread
From: Jing Luo via pve-devel @ 2024-11-15 19:26 UTC (permalink / raw)
To: pve-devel; +Cc: Jing Luo
[-- Attachment #1: Type: message/rfc822, Size: 7924 bytes --]
From: Jing Luo <jing@jing.rocks>
To: pve-devel@lists.proxmox.com
Subject: Re: [PATCH ifupdown2] patches: upstream: python3.12 compat
Date: Sat, 16 Nov 2024 04:26:49 +0900
Message-ID: <312601959cc09c4c022036550dde6215@jing.rocks>
Forgot to add "ifupdown2" to [PATCH], so resend. Oops
On 2024-11-13 04:06, Jing Luo wrote:
> 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
--
Jing Luo
About me: https://jing.rocks/about/
GPG Fingerprint: 4E09 8D19 00AA 3F72 1899 2614 09B3 316E 13A1 1EFC
[-- 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