Skip to content

Commit

Permalink
chore: update deps, allow to use urllib3 v2
Browse files Browse the repository at this point in the history
  • Loading branch information
ilfa committed Aug 7, 2024
1 parent 907c814 commit 2db6a66
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 16 deletions.
4 changes: 2 additions & 2 deletions fingerprint_pro_server_api_sdk/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]


Expand Down
2 changes: 1 addition & 1 deletion template/README.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions template/rest.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions template/setup.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit 2db6a66

Please sign in to comment.