Python 3.12 removed some things that were deprecated in configparser back
in Python 3.2. The diff below is needed for Python 3.12.
So:
* SafeConfgParser -> ConfigParser
* readfp -> read_file
ok?
(see: https://docs.python.org/3/whatsnew/3.12.html#configparser)
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/py-constantly/Makefile,v
diff -u -p -u -r1.10 Makefile
--- Makefile 6 May 2024 12:23:13 -0000 1.10
+++ Makefile 28 Jun 2024 21:49:42 -0000
@@ -4,7 +4,7 @@ MODPY_EGG_VERSION = 15.1.0
DISTNAME = constantly-${MODPY_EGG_VERSION}
PKGNAME = py-${DISTNAME}
-REVISION = 6
+REVISION = 7
CATEGORIES = devel
Index: patches/patch-versioneer_py
===================================================================
RCS file: patches/patch-versioneer_py
diff -N patches/patch-versioneer_py
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-versioneer_py 28 Jun 2024 21:49:42 -0000
@@ -0,0 +1,18 @@
+SafeConfigParser was deprecated since Python 3.2 and removed
+in Python 3.12.
+
+Index: versioneer.py
+--- versioneer.py.orig
++++ versioneer.py
+@@ -396,9 +396,9 @@ def get_config_from_root(root):
+ # 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):
No comments:
Post a Comment