From 2db6a66720bd60c0eadc64875e15ec50d8a0fd5c Mon Sep 17 00:00:00 2001 From: Ilya Taratukhin Date: Wed, 7 Aug 2024 20:01:43 +0200 Subject: [PATCH] chore: update deps, allow to use `urllib3` v2 --- fingerprint_pro_server_api_sdk/rest.py | 4 ++-- requirements.txt | 8 ++++---- setup.py | 7 ++++--- template/README.mustache | 2 +- template/rest.mustache | 4 ++-- template/setup.mustache | 8 ++++---- 6 files changed, 17 insertions(+), 16 deletions(-) diff --git a/fingerprint_pro_server_api_sdk/rest.py b/fingerprint_pro_server_api_sdk/rest.py index 0da676b1..2e59f01d 100644 --- a/fingerprint_pro_server_api_sdk/rest.py +++ b/fingerprint_pro_server_api_sdk/rest.py @@ -41,11 +41,11 @@ def __init__(self, resp: urllib3.HTTPResponse): def getheaders(self): """Returns a dictionary of the response headers.""" - return self.urllib3_response.getheaders() + return self.urllib3_response.headers def getheader(self, name, default=None): """Returns a given response header.""" - return self.urllib3_response.getheader(name, default) + return self.urllib3_response.headers.get(name, default) class RESTClientObject: diff --git a/requirements.txt b/requirements.txt index 9bda3d02..4d951c6f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ -certifi >= 14.05.14 -python_dateutil >= 2.5.3 -setuptools >= 21.0.0 -urllib3<1.27,>=1.21.1 +certifi >= 2023.7.22 +python-dateutil >= 2.5.3 +setuptools >= 65.5.1 +urllib3>=1.23 python-dotenv cryptography diff --git a/setup.py b/setup.py index de475a1b..c3a02498 100644 --- a/setup.py +++ b/setup.py @@ -24,9 +24,10 @@ # http://pypi.python.org/pypi/setuptools REQUIRES = [ - "certifi>=2017.4.17", - "python-dateutil>=2.1", - "urllib3>=1.23" + "certifi>=2023.7.22", + "python-dateutil>=2.5.3", + "urllib3>=1.23", + "cryptography" ] diff --git a/template/README.mustache b/template/README.mustache index e0f8efe8..8aae40da 100644 --- a/template/README.mustache +++ b/template/README.mustache @@ -39,7 +39,7 @@ For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) The following Python versions are supported: -- Python >= 3.8 +- Python >= 3.9 ## Installation & Usage ### pip install diff --git a/template/rest.mustache b/template/rest.mustache index 0f3cd101..316270b6 100644 --- a/template/rest.mustache +++ b/template/rest.mustache @@ -33,11 +33,11 @@ class RESTResponse(io.IOBase): def getheaders(self): """Returns a dictionary of the response headers.""" - return self.urllib3_response.getheaders() + return self.urllib3_response.headers def getheader(self, name, default=None): """Returns a given response header.""" - return self.urllib3_response.getheader(name, default) + return self.urllib3_response.headers.get(name, default) class RESTClientObject: diff --git a/template/setup.mustache b/template/setup.mustache index e97b1d84..ad748fee 100644 --- a/template/setup.mustache +++ b/template/setup.mustache @@ -19,9 +19,10 @@ NAME = "{{{projectName}}}" # http://pypi.python.org/pypi/setuptools REQUIRES = [ - "certifi>=2017.4.17", - "python-dateutil>=2.1", - "urllib3>=1.23" + "certifi>=2023.7.22", + "python-dateutil>=2.5.3", + "urllib3>=1.23", + "cryptography" ] {{#asyncio}} @@ -57,7 +58,6 @@ setup( 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', - 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.12',