File: python3.12.patch

package info (click to toggle)
q2templates 2024.5.0%2Bds-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 720 kB
  • sloc: python: 1,449; makefile: 35; javascript: 28; sh: 17
file content (19 lines) | stat: -rw-r--r-- 707 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Description: SafeConfigParser is deprecated in Python3.12
Author: Andreas Tille <tille@debian.org>
Last-Update: Fri, 16 Feb 2024 17:30:31 +0100


--- a/versioneer.py
+++ b/versioneer.py
@@ -340,9 +340,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):