Skip to content

Commit 478eb50

Browse files
authored
Merge pull request #108 from lalmeras/fix-python-3.10-requests
fix python 3.10 compatibility
2 parents 32b0040 + 0e9ee3f commit 478eb50

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+18
-23065
lines changed

.coveragerc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[run]
2-
omit=*vendor*
2+
omit=

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Changelog
22
=========
33

4+
## 0.6.0 (2022-01)
5+
6+
- [compatibility] add support for Python 3.10
7+
- [dependencies] drop vendored requests library, added requests>=2.11.0
8+
- [fix] previous 'disable pyopenssl for ovh to fix "EPIPE"' fix is handled
9+
by requests dependency update
10+
411
## 0.5.0 (2018-12-13)
512
- [compatibility] drop support for EOL Python 2.6, 3.2 and 3.3 (#71)
613
- [feature] Add OVH US endpoint (#63 #70)

MANIFEST.in

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
include *.ini *.cfg *.rst
22
include LICENSE
3-
include ovh/vendor/requests/cacert.pem
43
recursive-include ovh *.py
54
recursive-include docs *.py *.rst *.png Makefile make.bat
65
recursive-include tests *.py

ovh/client.py

+4-16
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,9 @@
4646
# Python 3
4747
from urllib.parse import urlencode
4848

49-
from .vendor.requests import request, Session
50-
from .vendor.requests.packages import urllib3
51-
from .vendor.requests.exceptions import RequestException
52-
53-
# Disable pyopenssl. It breaks SSL connection pool when SSL connection is
54-
# closed unexpectedly by the server. And we don't need SNI anyway.
55-
try:
56-
from .vendor.requests.packages.urllib3.contrib import pyopenssl
57-
pyopenssl.extract_from_urllib3()
58-
except ImportError:
59-
pass
60-
61-
# Disable SNI related Warning. The API does not rely on it
62-
urllib3.disable_warnings(urllib3.exceptions.SNIMissingWarning)
63-
urllib3.disable_warnings(urllib3.exceptions.SecurityWarning)
49+
from requests import request, Session
50+
from requests.packages import urllib3
51+
from requests.exceptions import RequestException
6452

6553
from .config import config
6654
from .consumer_key import ConsumerKeyRequest
@@ -483,7 +471,7 @@ def raw_call(self, method, path, data=None, need_auth=True):
483471
"""
484472
Lowest level call helper. If ``consumer_key`` is not ``None``, inject
485473
authentication headers and sign the request.
486-
Will return a vendored ``requests.Response`` object or let any
474+
Will return ``requests.Response`` object or let any
487475
``requests`` exception pass through.
488476
489477
Request signature is a sha1 hash on following fields, joined by '+'

ovh/vendor/__init__.py

Whitespace-only changes.

ovh/vendor/requests/__init__.py

-83
This file was deleted.

0 commit comments

Comments
 (0)