Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
name: deploy

steps:
- uses: "actions/checkout@v3"
- uses: "actions/checkout@v4"
- uses: "actions/setup-python@v4"
with:
python-version: 3.8
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ jobs:

strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: "actions/checkout@v3"
- uses: "actions/checkout@v4"
- uses: "actions/setup-python@v4"
with:
python-version: "${{ matrix.python-version }}"
allow-prereleases: true
- name: "Install dependencies"
run: "scripts/install"
- name: "Run linting checks"
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## Unreleased

### Added

* Add support for Python 3.12. (#2854)

### Fixed

* Raise `ValueError` on `Response.encoding` being set after `Response.text` has been accessed. (#2852)
Expand Down
4 changes: 1 addition & 3 deletions httpx/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
except ImportError:
brotli = None

if sys.version_info >= (3, 10) or (
sys.version_info >= (3, 8) and ssl.OPENSSL_VERSION_INFO >= (1, 1, 0, 7)
):
if sys.version_info >= (3, 10) or ssl.OPENSSL_VERSION_INFO >= (1, 1, 0, 7):

def set_minimum_tls_version_1_2(context: ssl.SSLContext) -> None:
# The OP_NO_SSL* and OP_NO_TLS* become deprecated in favor of
Expand Down
17 changes: 7 additions & 10 deletions httpx/_config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import logging
import os
import ssl
import sys
import typing
from pathlib import Path

Expand Down Expand Up @@ -128,11 +127,10 @@ def load_ssl_context_verify(self) -> ssl.SSLContext:

# Signal to server support for PHA in TLS 1.3. Raises an
# AttributeError if only read-only access is implemented.
if sys.version_info >= (3, 8): # pragma: no cover
try:
context.post_handshake_auth = True
except AttributeError: # pragma: no cover
pass
try:
context.post_handshake_auth = True
except AttributeError: # pragma: no cover
pass

# Disable using 'commonName' for SSLContext.check_hostname
# when the 'subjectAltName' extension isn't available.
Expand Down Expand Up @@ -168,10 +166,9 @@ def _create_default_ssl_context(self) -> ssl.SSLContext:
alpn_idents = ["http/1.1", "h2"] if self.http2 else ["http/1.1"]
context.set_alpn_protocols(alpn_idents)

if sys.version_info >= (3, 8): # pragma: no cover
keylogfile = os.environ.get("SSLKEYLOGFILE")
if keylogfile and self.trust_env:
context.keylog_filename = keylogfile
keylogfile = os.environ.get("SSLKEYLOGFILE")
if keylogfile and self.trust_env:
context.keylog_filename = keylogfile

return context

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Internet :: WWW/HTTP",
]
dependencies = [
Expand Down