From 8541d9cbd99215e89c9904093905202d46f1fbf5 Mon Sep 17 00:00:00 2001 From: mh Date: Jul 07 2023 14:42:45 +0000 Subject: versioneer: replace deprecated (and removed in 3.12) SafeConfigParser --- diff --git a/python-onionbalance-fix-versioneer.patch b/python-onionbalance-fix-versioneer.patch new file mode 100644 index 0000000..13e91fa --- /dev/null +++ b/python-onionbalance-fix-versioneer.patch @@ -0,0 +1,14 @@ +--- a/versioneer.py 2023-07-07 16:39:21.432753830 +0200 ++++ b/versioneer.py 2023-07-07 16:39:09.659813381 +0200 +@@ -339,9 +339,9 @@ + # configparser.NoOptionError (if it lacks "VCS="). See the docstring at + # the top of versioneer.py for instructions on writing your setup.cfg . + setup_cfg = os.path.join(root, "setup.cfg") +- parser = configparser.SafeConfigParser() ++ parser = configparser.ConfigParser() + with open(setup_cfg, "r") as f: +- parser.readfp(f) ++ parser.read_file(f) + VCS = parser.get("versioneer", "VCS") # mandatory + + def get(parser, name): diff --git a/python-onionbalance.spec b/python-onionbalance.spec index e9244ab..819fddb 100644 --- a/python-onionbalance.spec +++ b/python-onionbalance.spec @@ -6,7 +6,7 @@ Name: python-%{pkgname} Version: 0.2.1 -Release: 7%{?dist} +Release: 8%{?dist} Summary: %{sum} License: GPLv3 @@ -18,6 +18,8 @@ Source3: onionbalance.logrotate Source5: onionbalance.torrc.example Source6: README.fedora +Patch0: python-onionbalance-fix-versioneer.patch + BuildArch: noarch BuildRequires: systemd-units @@ -126,6 +128,9 @@ exit 0 %config(noreplace) %{_sysconfdir}/logrotate.d/%{pkgname}.conf %changelog +* Fri Jul 07 2023 Python Maint - 0.2.1-8 +- Fix configparsers + * Thu Jul 06 2023 Python Maint - 0.2.1-7 - Rebuilt for Python 3.12