pkgsrc/devel/py-requests/patches/patch-requests_____init____.py
adam 7459db2083 py-requests: updated to 2.22.0
2.22.0:

**Dependencies**
- Requests now supports urllib3 v1.25.2.
  (note: 1.25.0 and 1.25.1 are incompatible)

**Deprecations**
- Requests has officially stopped support for Python 3.4.
2019-05-17 08:34:38 +00:00

35 lines
1.2 KiB
Python

$NetBSD: patch-requests_____init____.py,v 1.5 2019/05/17 08:34:38 adam Exp $
* Allow newer py-urllib3 and py-chardet.
* Add workaround for segfault of security/py-certbot on NetBSD/amd64
7.0.2 and 7.99.53. It seems that the real root cause is in
security/py-OpenSSL or OpenSSL. However I do not find how to fix it.
This is introduced in https://github.com/shazow/urllib3
--- requests/__init__.py.orig 2019-05-16 14:22:45.000000000 +0000
+++ requests/__init__.py
@@ -60,15 +60,12 @@ def check_compatibility(urllib3_version,
# urllib3 >= 1.21.1, <= 1.25
assert major == 1
assert minor >= 21
- assert minor <= 25
# Check chardet for compatibility.
major, minor, patch = chardet_version.split('.')[:3]
major, minor, patch = int(major), int(minor), int(patch)
# chardet >= 3.0.2, < 3.1.0
assert major == 3
- assert minor < 1
- assert patch >= 2
def _check_cryptography(cryptography_version):
@@ -93,7 +90,6 @@ except (AssertionError, ValueError):
# Attempt to enable urllib3's SNI support, if possible
try:
from urllib3.contrib import pyopenssl
- pyopenssl.inject_into_urllib3()
# Check cryptography version
from cryptography import __version__ as cryptography_version