Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
kedifa
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
kedifa
Commits
dacc18a8
Commit
dacc18a8
authored
Dec 05, 2024
by
Thomas Gambier
🚴🏼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove deprecated usage of SafeConfigParser in python3
parent
fb4280a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
versioneer.py
versioneer.py
+5
-4
No files found.
versioneer.py
View file @
dacc18a8
...
...
@@ -278,9 +278,10 @@ https://creativecommons.org/publicdomain/zero/1.0/ .
from
__future__
import
print_function
try
:
import
configp
arser
from
configparser
import
ConfigP
arser
except
ImportError
:
import
ConfigParser
as
configparser
from
ConfigParser
import
SafeConfigParser
as
ConfigParser
ConfigParser
.
read_file
=
ConfigParser
.
readfp
import
errno
import
json
import
os
...
...
@@ -339,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
.
Safe
ConfigParser
()
parser
=
ConfigParser
()
with
open
(
setup_cfg
,
"r"
)
as
f
:
parser
.
read
fp
(
f
)
parser
.
read
_file
(
f
)
VCS
=
parser
.
get
(
"versioneer"
,
"VCS"
)
# mandatory
def
get
(
parser
,
name
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment