diff --git a/requirements.txt b/requirements.txt --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,6 @@ # deps, generated via pipdeptree --exclude setuptools,wheel,pipdeptree,pip -f | tr '[:upper:]' '[:lower:]' atomicwrites==1.4.1 -configobj==5.0.8 - six==1.16.0 contextlib2==21.6.0 cov-core==1.15.0 coverage==7.2.1 diff --git a/vcsserver/tests/fixture.py b/vcsserver/tests/fixture.py --- a/vcsserver/tests/fixture.py +++ b/vcsserver/tests/fixture.py @@ -18,8 +18,7 @@ import os import shutil import tempfile - -import configobj +import configparser class ContextINI(object): @@ -53,17 +52,17 @@ class ContextINI(object): with open(self.new_path, 'wb'): pass - config = configobj.ConfigObj( - self.new_path, file_error=True, write_empty_values=True) + parser = configparser.ConfigParser() + parser.read(self.ini_file_path) for data in self.ini_params: section, ini_params = list(data.items())[0] key, val = list(ini_params.items())[0] - if section not in config: - config[section] = {} - config[section][key] = val - - config.write() + if section not in parser: + parser[section] = {} + parser[section][key] = val + with open(self.ini_file_path, 'w') as f: + parser.write(f) return self.new_path def __exit__(self, exc_type, exc_val, exc_tb):