]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Drop support for Python 3.7 (#2813)
authorIurii Pliner <yury.pliner@gmail.com>
Wed, 9 Aug 2023 09:02:28 +0000 (10:02 +0100)
committerGitHub <noreply@github.com>
Wed, 9 Aug 2023 09:02:28 +0000 (10:02 +0100)
* Drop Python 3.7 support

* Fix lint

* Changelog

.github/workflows/publish.yml
.github/workflows/test-suite.yml
CHANGELOG.md
README.md
README_chinese.md
docs/index.md
httpx/_compat.py
pyproject.toml
tests/test_config.py

index 053ad289ccdb1282931f2fa78abfe5f19c4302ce..3cbd4a8a2dc327cce2f67853582803f5f2c06286 100644 (file)
@@ -17,7 +17,7 @@ jobs:
       - uses: "actions/checkout@v3"
       - uses: "actions/setup-python@v4"
         with:
-          python-version: 3.7
+          python-version: 3.8
       - name: "Install dependencies"
         run: "scripts/install"
       - name: "Build package & docs"
index f5ad75a4e29c08609e478814cbbbf1020284a067..eb1cc7e22e16dea33d875079c5166102ef5542ae 100644 (file)
@@ -14,7 +14,7 @@ jobs:
 
     strategy:
       matrix:
-        python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
+        python-version: ["3.8", "3.9", "3.10", "3.11"]
 
     steps:
       - uses: "actions/checkout@v3"
index 3d5ea6d2fe6fa3fe61675d84758671bcd2d00703..a4f49c45d157e0e54cc8bbae7bfa34fa5a996ab7 100644 (file)
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
 
 ## Unreleased
 
+### Removed
+
+* Drop support for Python 3.7. (#2813)
+
 ### Added
 
 * Add `socket_options` argument to `httpx.HTTPTransport` and `httpx.AsyncHTTPTransport` classes. (#2716)
index 4d25491a6a0f80321e78124e7155f4502f461cd2..62fb295d17bc59a76a8f924e852c73b34b5ae064 100644 (file)
--- a/README.md
+++ b/README.md
@@ -103,7 +103,7 @@ Or, to include the optional HTTP/2 support, use:
 $ pip install httpx[http2]
 ```
 
-HTTPX requires Python 3.7+.
+HTTPX requires Python 3.8+.
 
 ## Documentation
 
index 02487683233611fbeaadaea3e91da747b1836f9b..ad20c5a1bfe8aa3bcfc79a8572667abafc717a71 100644 (file)
@@ -101,7 +101,7 @@ $ pip install httpx
 $ pip install httpx[http2]
 ```
 
-HTTPX 要求 Python 3.7+ 版本。
+HTTPX 要求 Python 3.8+ 版本。
 
 ## 文档
 
index cd25ee6ca50e2ff2bc28ce7868c4d91ea8a14e0b..ec9746697ddd215afa0493f6d6c7d08d6e2f7160 100644 (file)
@@ -144,6 +144,6 @@ To include the optional brotli decoder support, use:
 $ pip install httpx[brotli]
 ```
 
-HTTPX requires Python 3.7+
+HTTPX requires Python 3.8+
 
 [sync-support]: https://github.com/encode/httpx/issues/572
index a9b9c63072d4ff6ab789cbfb3a7e56630a9d484d..a271c6b800893183d20cdf688a31774077472f87 100644 (file)
@@ -17,7 +17,7 @@ except ImportError:  # pragma: no cover
         brotli = None
 
 if sys.version_info >= (3, 10) or (
-    sys.version_info >= (3, 7) and ssl.OPENSSL_VERSION_INFO >= (1, 1, 0, 7)
+    sys.version_info >= (3, 8) and ssl.OPENSSL_VERSION_INFO >= (1, 1, 0, 7)
 ):
 
     def set_minimum_tls_version_1_2(context: ssl.SSLContext) -> None:
index 30228c120ede98cab75e7b4c9b48ce1348b6ffe1..acd41baf3ac2322c5ecbf30cef846e0fea5b9b39 100644 (file)
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
 name = "httpx"
 description = "The next generation HTTP client."
 license = "BSD-3-Clause"
-requires-python = ">=3.7"
+requires-python = ">=3.8"
 authors = [
     { name = "Tom Christie", email = "tom@tomchristie.com" },
 ]
@@ -20,7 +20,6 @@ classifiers = [
     "Operating System :: OS Independent",
     "Programming Language :: Python :: 3",
     "Programming Language :: Python :: 3 :: Only",
-    "Programming Language :: Python :: 3.7",
     "Programming Language :: Python :: 3.8",
     "Programming Language :: Python :: 3.9",
     "Programming Language :: Python :: 3.10",
index d496cd4a0eb1d9af996c03250ef1c4580fdd42d3..00913b2c17dbc7c0eab7aa3379b1ce4b19c4ca10 100644 (file)
@@ -1,6 +1,5 @@
 import os
 import ssl
-import sys
 from pathlib import Path
 
 import certifi
@@ -176,28 +175,26 @@ def test_timeout_repr():
     not hasattr(ssl.SSLContext, "keylog_filename"),
     reason="requires OpenSSL 1.1.1 or higher",
 )
-@pytest.mark.skipif(sys.version_info < (3, 8), reason="requires python3.8 or higher")
 def test_ssl_config_support_for_keylog_file(tmpdir, monkeypatch):  # pragma: no cover
-    if sys.version_info > (3, 8):
-        with monkeypatch.context() as m:
-            m.delenv("SSLKEYLOGFILE", raising=False)
+    with monkeypatch.context() as m:
+        m.delenv("SSLKEYLOGFILE", raising=False)
 
-            context = httpx.create_ssl_context(trust_env=True)
+        context = httpx.create_ssl_context(trust_env=True)
 
-            assert context.keylog_filename is None
+        assert context.keylog_filename is None
 
-        filename = str(tmpdir.join("test.log"))
+    filename = str(tmpdir.join("test.log"))
 
-        with monkeypatch.context() as m:
-            m.setenv("SSLKEYLOGFILE", filename)
+    with monkeypatch.context() as m:
+        m.setenv("SSLKEYLOGFILE", filename)
 
-            context = httpx.create_ssl_context(trust_env=True)
+        context = httpx.create_ssl_context(trust_env=True)
 
-            assert context.keylog_filename == filename
+        assert context.keylog_filename == filename
 
-            context = httpx.create_ssl_context(trust_env=False)
+        context = httpx.create_ssl_context(trust_env=False)
 
-            assert context.keylog_filename is None
+        assert context.keylog_filename is None
 
 
 def test_proxy_from_url():