| 1 |
Description: Replace SafeConfigParser deprecated in Python3.12 |
| 2 |
Bug-Debian: https://bugs.debian.org/1058098 |
| 3 |
Author: Andreas Tille <[email protected]> |
| 4 |
Last-Update: Wed, 10 Jan 2024 08:48:46 +0100 |
| 5 |
|
| 6 |
--- a/versioneer.py |
| 7 |
+++ b/versioneer.py |
| 8 |
@@ -409,9 +409,9 @@ def get_config_from_root(root): |
| 9 |
# configparser.NoOptionError (if it lacks "VCS="). See the docstring at |
| 10 |
# the top of versioneer.py for instructions on writing your setup.cfg . |
| 11 |
setup_cfg = os.path.join(root, "setup.cfg") |
| 12 |
|
| 13 |
+ parser = configparser.ConfigParser() |
| 14 |
with open(setup_cfg, "r") as f: |
| 15 |
|
| 16 |
+ parser.read_file(f) |
| 17 |
VCS = parser.get("versioneer", "VCS") # mandatory |
| 18 |
|
| 19 |
def get(parser, name): |