forked from urllib3/urllib3
-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Removed opinionated OpenSSL version constraint that forbid any version lower than 1.1.1. The reasoning behind this is that some companies expressed (to us) the need to upgrade urllib3 to urllib3-future in (very) old Python 3.7 built against patched OpenSSL 1.0.2 or 1.0.8 and collaborative testing showed us that this constraint is overly protective. Those build often lack TLS 1.3 support and may contain major vulnerabilities, but we have to be optimistic on their awareness. TLS 1.3 / QUIC is also an option for them as it works out of the box on those old distributions. Effective immediately, we added a dedicated pipeline in our CI to verify that urllib3-future works with the oldest Python 3.7 build we found out there. Blindly removing support for those libraries when supporting Python 3.7 ... 3.9 is as we "partially" support this range and end-users have no to little clues for why it's rejected when it clearly works. The only issue that can appear is for users that have Python built against a SSL library that does not support either TLS 1.2 or 1.3, they will encounter errors for sure. - Changed to submodule http2 to subpackage http2. Purely upstream sync. Still no use for us. - Changed minimum (C)Python interpreter version for qh3 automatic pickup to 3.7.11 as it bundle pip 21.2.4 and is the minimum version to pick an appropriate (abi3) pre-built wheel. You may still install ``qh3`` manually by first upgrading your pip installation by running ``python -m pip install -U pip``. - Fixed an issue where a server is yielding an invalid/malformed ``Alt-Svc`` header and urllib3-future may crash upon it. - Fixed an issue where sending a ``str`` body using a ``bytes`` value for Content-Type would induce a crash. This was due to our unicode transparency policy. See #142
- Loading branch information
Showing
41 changed files
with
361 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: CI for EOL 3rd parties | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
permissions: "read-all" | ||
|
||
concurrency: | ||
group: ci-dead-things-${{ github.ref_name }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
|
||
dead-libressl: | ||
name: Ensure LibreSSL <2.8 | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 25 | ||
continue-on-error: true | ||
|
||
steps: | ||
- name: "Checkout repository" | ||
uses: "actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608" | ||
|
||
- name: "Run against Python 3.7 built with LibreSSL 2.7.4" | ||
run: ./ci/run_legacy_libressl.sh | ||
|
||
dead-openssl: | ||
name: Ensure OpenSSL <1.1.1 | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 25 | ||
|
||
steps: | ||
- name: "Checkout repository" | ||
uses: "actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608" | ||
|
||
- name: "Run against Python 3.7 built with OpenSSL 1.0.2q" | ||
run: ./ci/run_legacy_openssl.sh | ||
|
||
dead-pip: | ||
name: Ensure pip <21.2.4 | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
|
||
steps: | ||
- name: "Checkout repository" | ||
uses: "actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608" | ||
|
||
- name: "Setup Python" | ||
uses: "actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1" | ||
with: | ||
python-version: "3.7" | ||
|
||
- name: "Enforce pip 20.x" | ||
run: python -m pip install "pip<21" | ||
|
||
- name: "Ensure that urllib3-future can be installed" | ||
run: python -m pip install . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM python:3.7.1-alpine3.8 | ||
|
||
RUN apk add build-base libffi-dev | ||
|
||
WORKDIR /app | ||
|
||
RUN pip install --upgrade pip setuptools | ||
RUN pip install nox | ||
|
||
ENV TRAEFIK_HTTPBIN_ENABLE=false | ||
ENV CI=true | ||
|
||
COPY ./src/urllib3 src/urllib3/ | ||
COPY ./test test/ | ||
COPY ./dummyserver dummyserver/ | ||
COPY ./ci ci/ | ||
|
||
COPY noxfile.py LICENSE.txt pyproject.toml README.md setup.cfg hatch_build.py dev-requirements.txt mypy-requirements.txt ./ | ||
|
||
CMD nox -s test-3.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM python:3.7.2-alpine3.7 | ||
|
||
RUN apk add build-base libffi-dev | ||
|
||
WORKDIR /app | ||
|
||
RUN pip install --upgrade pip setuptools | ||
RUN pip install nox | ||
|
||
ENV TRAEFIK_HTTPBIN_ENABLE=false | ||
ENV CI=true | ||
|
||
COPY ./src/urllib3 src/urllib3/ | ||
COPY ./test test/ | ||
COPY ./dummyserver dummyserver/ | ||
COPY ./ci ci/ | ||
|
||
COPY noxfile.py LICENSE.txt pyproject.toml README.md setup.cfg hatch_build.py dev-requirements.txt mypy-requirements.txt ./ | ||
|
||
CMD nox -s test-3.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env sh | ||
docker build -f LibreSSL.Dockerfile -t urllib3:legacy-libressl . | ||
docker run urllib3:legacy-libressl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env sh | ||
docker build -f OpenSSL.Dockerfile -t urllib3:legacy-openssl . | ||
docker run urllib3:legacy-openssl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,26 +31,6 @@ | |
from .util.retry import Retry | ||
from .util.timeout import Timeout | ||
|
||
# Ensure that Python is compiled with OpenSSL 1.1.1+ | ||
# If the 'ssl' module isn't available at all that's | ||
# fine, we only care if the module is available. | ||
try: | ||
import ssl | ||
except ImportError: | ||
pass | ||
else: | ||
if ssl.OPENSSL_VERSION.startswith("OpenSSL ") and ssl.OPENSSL_VERSION_INFO < ( | ||
1, | ||
1, | ||
1, | ||
): # Defensive: | ||
raise ImportError( | ||
"urllib3 v2.0 only supports OpenSSL 1.1.1+, currently " | ||
f"the 'ssl' module is compiled with {ssl.OPENSSL_VERSION!r}. " | ||
"See: https://github.com/urllib3/urllib3/issues/2168" | ||
) | ||
|
||
|
||
__author__ = "Andrey Petrov ([email protected])" | ||
__license__ = "MIT" | ||
__version__ = __version__ | ||
|
Oops, something went wrong.