- 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"
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"
## Unreleased
+### Removed
+
+* Drop support for Python 3.7. (#2813)
+
### Added
* Add `socket_options` argument to `httpx.HTTPTransport` and `httpx.AsyncHTTPTransport` classes. (#2716)
$ pip install httpx[http2]
```
-HTTPX requires Python 3.7+.
+HTTPX requires Python 3.8+.
## Documentation
$ pip install httpx[http2]
```
-HTTPX 要求 Python 3.7+ 版本。
+HTTPX 要求 Python 3.8+ 版本。
## 文档
$ pip install httpx[brotli]
```
-HTTPX requires Python 3.7+
+HTTPX requires Python 3.8+
[sync-support]: https://github.com/encode/httpx/issues/572
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:
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" },
]
"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",
import os
import ssl
-import sys
from pathlib import Path
import certifi
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():