Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix python 3.10 compatibility #108

Merged
merged 3 commits into from
Mar 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[run]
omit=*vendor*
omit=
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Changelog
=========

## 0.6.0 (2022-01)

- [compatibility] add support for Python 3.10
- [dependencies] drop vendored requests library, added requests>=2.11.0
- [fix] previous 'disable pyopenssl for ovh to fix "EPIPE"' fix is handled
by requests dependency update

## 0.5.0 (2018-12-13)
- [compatibility] drop support for EOL Python 2.6, 3.2 and 3.3 (#71)
- [feature] Add OVH US endpoint (#63 #70)
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
include *.ini *.cfg *.rst
include LICENSE
include ovh/vendor/requests/cacert.pem
recursive-include ovh *.py
recursive-include docs *.py *.rst *.png Makefile make.bat
recursive-include tests *.py
Expand Down
20 changes: 4 additions & 16 deletions ovh/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,9 @@
# Python 3
from urllib.parse import urlencode

from .vendor.requests import request, Session
from .vendor.requests.packages import urllib3
from .vendor.requests.exceptions import RequestException

# Disable pyopenssl. It breaks SSL connection pool when SSL connection is
# closed unexpectedly by the server. And we don't need SNI anyway.
try:
from .vendor.requests.packages.urllib3.contrib import pyopenssl
pyopenssl.extract_from_urllib3()
except ImportError:
pass

# Disable SNI related Warning. The API does not rely on it
urllib3.disable_warnings(urllib3.exceptions.SNIMissingWarning)
urllib3.disable_warnings(urllib3.exceptions.SecurityWarning)
from requests import request, Session
from requests.packages import urllib3
from requests.exceptions import RequestException

from .config import config
from .consumer_key import ConsumerKeyRequest
Expand Down Expand Up @@ -467,7 +455,7 @@ def raw_call(self, method, path, data=None, need_auth=True):
"""
Lowest level call helper. If ``consumer_key`` is not ``None``, inject
authentication headers and sign the request.
Will return a vendored ``requests.Response`` object or let any
Will return ``requests.Response`` object or let any
``requests`` exception pass through.

Request signature is a sha1 hash on following fields, joined by '+'
Expand Down
Empty file removed ovh/vendor/__init__.py
Empty file.
83 changes: 0 additions & 83 deletions ovh/vendor/requests/__init__.py

This file was deleted.

Loading