From 78e53c2ce832b30f0a33d8c71cb31af067f56bca Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Tue, 26 Jan 2021 18:04:17 +0400 Subject: [PATCH 1/3] [1.26] Don't compare bytes and str in putheader() --- src/urllib3/connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/urllib3/connection.py b/src/urllib3/connection.py index d2d456fb3c..9066e6ade4 100644 --- a/src/urllib3/connection.py +++ b/src/urllib3/connection.py @@ -215,7 +215,7 @@ def putrequest(self, method, url, *args, **kwargs): def putheader(self, header, *values): """""" - if SKIP_HEADER not in values: + if not any(isinstance(v, str) and v == SKIP_HEADER for v in values): _HTTPConnection.putheader(self, header, *values) elif six.ensure_str(header.lower()) not in SKIPPABLE_HEADERS: raise ValueError( From deb37f08c4b6f6d2e5ac6a735d3b99e4ed9996d0 Mon Sep 17 00:00:00 2001 From: Seth Michael Larson Date: Tue, 26 Jan 2021 09:10:29 -0600 Subject: [PATCH 2/3] Use Python 3.5 compatible get-pip --- ci/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/install.sh b/ci/install.sh index adda3d13cb..20bd477c6c 100755 --- a/ci/install.sh +++ b/ci/install.sh @@ -8,7 +8,7 @@ set -exo pipefail # we're in one of the Travis Python 2 sessions and sets up the Python 3 install # for Nox. if ! python3 -m pip --version; then - curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py + curl https://bootstrap.pypa.io/3.5/get-pip.py -o get-pip.py sudo python3 get-pip.py # https://github.com/theacodes/nox/issues/328 sudo python3 -m pip install nox==2019.11.9 From 3b106a81fa862146c100c1a952d2cbee84cdfe56 Mon Sep 17 00:00:00 2001 From: Seth Michael Larson Date: Tue, 26 Jan 2021 09:18:03 -0600 Subject: [PATCH 3/3] Allow using deprecated OpenSSL with CRYPTOGRAPHY_ALLOW_OPENSSL_102 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index ca52bf2681..fcea6cb174 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,6 +24,7 @@ notifications: env: global: - PYTHONWARNINGS=always::DeprecationWarning + - CRYPTOGRAPHY_ALLOW_OPENSSL_102=1 - PYPI_USERNAME=urllib3 # PYPI_PASSWORD is set in Travis control panel.