Drop support for Python 3.7 (#2813)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
* Drop Python 3.7 support * Fix lint * Changelog
authored by Iurii Pliner · committed by GitHub · parent 76c9cb6 · Browse files · 9 files·+22 added−22 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
9 files+22 added−22 removed
- tests:+11 added−14 removed
- other:+11 added−8 removed
Provenance
- Commit
b40c04d- Tree
732d2e1- Author
Iurii Pliner <yury.pliner@gmail.com>- Committer
GitHub <noreply@github.com>- Parent
76c9cb6
9 files changed+22 added−22 removed
modified:.github/workflows/publish.yml+1 added-1 removed
15 unmodified lines161718192020212223245 unmodified lines15 unmodified lines steps: - 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" run: "scripts/build"5 unmodified linesmodified:.github/workflows/test-suite.yml+1 added-1 removed
12 unmodified lines1314151617171819202112 unmodified lines12 unmodified lines runs-on: "ubuntu-latest"
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" - uses: "actions/setup-python@v4"12 unmodified linesmodified:docs/index.md+1 added-1 removed
142 unmodified lines143 ```shell144 $ pip install httpx[brotli]145 ```146 147-HTTPX requires Python 3.7+147+HTTPX requires Python 3.8+148 149 [sync-support]: https://github.com/encode/httpx/issues/572modified:httpx/_compat.py+1 added-1 removed
15 unmodified lines16 except ImportError:17 brotli = None18 19 if sys.version_info >= (3, 10) or (20- sys.version_info >= (3, 7) and ssl.OPENSSL_VERSION_INFO >= (1, 1, 0, 7)20+ sys.version_info >= (3, 8) and ssl.OPENSSL_VERSION_INFO >= (1, 1, 0, 7)21 ):22 23 def set_minimum_tls_version_1_2(context: ssl.SSLContext) -> None:24 # The OP_NO_SSL* and OP_NO_TLS* become deprecated in favor of19 unmodified linesmodified:tests/test_config.py+11 added-14 removed
1 import os2 import ssl3-import sys3 from pathlib import Path4 5 import certifi6 import pytest167 unmodified lines174 @pytest.mark.skipif(175 not hasattr(ssl.SSLContext, "keylog_filename"),176 reason="requires OpenSSL 1.1.1 or higher",177 )179-@pytest.mark.skipif(sys.version_info < (3, 8), reason="requires python3.8 or higher")178 def test_ssl_config_support_for_keylog_file(tmpdir, monkeypatch): # pragma: no cover181- if sys.version_info > (3, 8):182- with monkeypatch.context() as m:183- m.delenv("SSLKEYLOGFILE", raising=False)179+ with monkeypatch.context() as m:180+ m.delenv("SSLKEYLOGFILE", raising=False)181 185- context = httpx.create_ssl_context(trust_env=True)182+ context = httpx.create_ssl_context(trust_env=True)183 187- assert context.keylog_filename is None184+ assert context.keylog_filename is None185 189- filename = str(tmpdir.join("test.log"))186+ filename = str(tmpdir.join("test.log"))187 191- with monkeypatch.context() as m:192- m.setenv("SSLKEYLOGFILE", filename)188+ with monkeypatch.context() as m:189+ m.setenv("SSLKEYLOGFILE", filename)190 194- context = httpx.create_ssl_context(trust_env=True)191+ context = httpx.create_ssl_context(trust_env=True)192 196- assert context.keylog_filename == filename193+ assert context.keylog_filename == filename194 198- context = httpx.create_ssl_context(trust_env=False)195+ context = httpx.create_ssl_context(trust_env=False)196 200- assert context.keylog_filename is None197+ assert context.keylog_filename is None198 199 200 def test_proxy_from_url():201 proxy = httpx.Proxy("https://example.com")19 unmodified linesmodified:CHANGELOG.md+4 added
4 unmodified lines5 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).6 7 ## Unreleased8 9+### Removed10+11+* Drop support for Python 3.7. (#2813)12+13 ### Added14 15 * Add `socket_options` argument to `httpx.HTTPTransport` and `httpx.AsyncHTTPTransport` classes. (#2716)16 * The `Response.raise_for_status()` method now returns the response instance. For example: `data = httpx.get('...').raise_for_status().json()`. (#2776)1017 unmodified linesmodified:pyproject.toml+1 added-2 removed
4 unmodified lines567899101112135 unmodified lines192021222323242526100 unmodified lines4 unmodified lines[project]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" },]classifiers = [5 unmodified lines "License :: OSI Approved :: BSD License", "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", "Programming Language :: Python :: 3.11",100 unmodified linesmodified:README_chinese.md+1 added-1 removed
99 unmodified lines100 ```shell101 $ pip install httpx[http2]102 ```103 104-HTTPX 要求 Python 3.7+ 版本。104+HTTPX 要求 Python 3.8+ 版本。105 106 ## 文档107 108 项目文档现已就绪,请访问 [https://www.python-httpx.org/](https://www.python-httpx.org/) 来阅读。36 unmodified linesmodified:README.md+1 added-1 removed
101 unmodified lines102 ```shell103 $ pip install httpx[http2]104 ```105 106-HTTPX requires Python 3.7+.106+HTTPX requires Python 3.8+.107 108 ## Documentation109 110 Project documentation is available at [https://www.python-httpx.org/](https://www.python-httpx.org/).38 unmodified lines