Migrate pkg_resources usages to importlib.resources (#9748)

* Migrate pkg_resources API related to resources to importlib_resources

* Fix lint and mypy + pin lexicon

* Update filterwarnings

* Update oldest tests requirements

* Update pinned dependencies

* Fix for modern versions of python

* Fix assets load in nginx integration tests

* Fix a warning

* Isolate static generation from importlib.resource into a private function

---------

Co-authored-by: Adrien Ferrand <adrien.ferrand@amadeus.com>
This commit is contained in:
Adrien Ferrand
2023-09-07 11:38:44 -07:00
committed by GitHub
co-authored by Adrien Ferrand
parent b1978ff188
commit cc359dab46
29 changed files with 398 additions and 297 deletions
+1 -9
View File
@@ -1,20 +1,12 @@
from pkg_resources import parse_version
from setuptools import __version__ as setuptools_version
from setuptools import find_packages
from setuptools import setup
version = '0.32.0.dev0'
# setuptools 36.2+ is needed for support for environment markers
min_setuptools_version='36.2'
# This conditional isn't necessary, but it provides better error messages to
# people who try to install this package with older versions of setuptools.
if parse_version(setuptools_version) < parse_version(min_setuptools_version):
raise RuntimeError(f'setuptools {min_setuptools_version}+ is required')
install_requires = [
'coverage',
'cryptography',
'importlib_resources>=1.3.1; python_version < "3.9"',
'pyopenssl',
'pytest',
'pytest-cov',