Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix deprecation warning with newer Pythons and 'imp' library.
This warning is shown: ``` /opt/appuser/.local/lib/python3.9/site-packages/pyhocon/config_parser.py:4: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp -- Docs: https://docs.pytest.org/en/stable/warnings.html ``` `imp.find_module()` (https://docs.python.org/3/library/imp.html#imp.find_module) was deprecated since version 3.3. However Pyhocon has no support for Python 3.3. We can use the alternative function `importlib.util.find_spec()` (https://docs.python.org/3/library/importlib.html#importlib.util.find_spec) which was added in Python 3.4 as advised in the docs. See:#248
- Loading branch information