Skip to content

Commit

Permalink
Merge pull request #69 from deronnax/fix_configparser_deprecation_war…
Browse files Browse the repository at this point in the history
…ning

replace ConfigParser's 'readfp' by 'read_string'
  • Loading branch information
yeisonvargasf committed Oct 16, 2023
2 parents 3c5f621 + 9ffa649 commit 4f62e3c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions dparse/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import re
import sys

from io import StringIO

from configparser import ConfigParser, NoOptionError
from pathlib import PurePath

Expand Down Expand Up @@ -305,7 +303,7 @@ def parse(self):
:return:
"""
parser = ConfigParser()
parser.readfp(StringIO(self.obj.content))
parser.read_string(self.obj.content)
for section in parser.sections():
try:
content = parser.get(section=section, option="deps")
Expand Down Expand Up @@ -413,7 +411,7 @@ def parse(self):
class SetupCfgParser(Parser):
def parse(self):
parser = ConfigParser()
parser.readfp(StringIO(self.obj.content))
parser.read_string(self.obj.content)
for section in parser.values():
if section.name == 'options':
options = 'install_requires', 'setup_requires', 'test_require'
Expand Down

0 comments on commit 4f62e3c

Please sign in to comment.