|
11 | 11 | from argparse import *
|
12 | 12 | from argparse import _ActionsContainer, _ArgumentGroup, _MutuallyExclusiveGroup, _AttributeHolder, _SubParsersAction, \
|
13 | 13 | Action, _UNRECOGNIZED_ARGS_ATTR, Namespace as BaseNamespace, ArgumentParser as BaseArgumentParser
|
| 14 | +from configparser import ConfigParser, NoOptionError, NoSectionError |
14 | 15 | from inspect import currentframe
|
15 | 16 | from os import environ
|
16 | 17 | from os.path import abspath, basename, dirname, sep, splitext
|
17 | 18 | from shutil import which
|
18 | 19 | from stat import S_IXUSR
|
19 |
| -try: |
20 |
| - from configparser import ConfigParser, NoOptionError, NoSectionError |
21 |
| -except ImportError: |
22 |
| - from ConfigParser import ConfigParser, NoOptionError, NoSectionError |
23 | 20 |
|
24 | 21 | from .features.loglib import logger
|
25 | 22 | from .helpers.inputs import user_input
|
@@ -96,8 +93,6 @@ def __exit__(self, exc_type, exc_value, exc_traceback):
|
96 | 93 |
|
97 | 94 | @staticmethod
|
98 | 95 | def reset():
|
99 |
| - global parser_calls |
100 |
| - parser_calls = [] |
101 | 96 | ArgumentParser.reset()
|
102 | 97 |
|
103 | 98 |
|
@@ -415,7 +410,7 @@ def _check_requirements(self, requires):
|
415 | 410 | environ['SETUPTOOLS_USE_DISTUTILS'] = "stdlib"
|
416 | 411 | # importlib.metadata is available only from Python 3.8
|
417 | 412 | from importlib.metadata import version as get_version
|
418 |
| - from setuptools.extern.packaging.version import Version |
| 413 | + from packaging.version import Version |
419 | 414 | errors = []
|
420 | 415 | requires = requires or {}
|
421 | 416 | if not isinstance(requires, dict):
|
|
0 commit comments