Skip to content

Commit ed923ce

Browse files
authored
Merge branch 'master' into fix-3400-improve-header-encoding-error
2 parents 0efe53c + b5addb6 commit ed923ce

5 files changed

Lines changed: 11 additions & 3 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1010

1111
* Drop support for Python 3.8
1212

13+
### Added
14+
15+
* Expose `FunctionAuth` from the public API. (#3699)
16+
1317
## 0.28.1 (6th December, 2024)
1418

1519
* Fix SSL case where `verify=False` together with client side certificates.

‎docs/advanced/ssl.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import certifi
2929
import httpx
3030
import ssl
3131

32-
# This SSL context is equivelent to the default `verify=True`.
32+
# This SSL context is equivalent to the default `verify=True`.
3333
ctx = ssl.create_default_context(cafile=certifi.where())
3434
client = httpx.Client(verify=ctx)
3535
```

‎httpx/__init__.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def main() -> None: # type: ignore
5050
"DecodingError",
5151
"delete",
5252
"DigestAuth",
53+
"FunctionAuth",
5354
"get",
5455
"head",
5556
"Headers",

‎httpx/_auth.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from hashlib import _Hash
1717

1818

19-
__all__ = ["Auth", "BasicAuth", "DigestAuth", "NetRCAuth"]
19+
__all__ = ["Auth", "BasicAuth", "DigestAuth", "FunctionAuth", "NetRCAuth"]
2020

2121

2222
class Auth:

‎tests/models/test_responses.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,10 @@ def test_response_decode_text_using_autodetect():
10111011

10121012
assert response.status_code == 200
10131013
assert response.reason_phrase == "OK"
1014-
assert response.encoding == "ISO-8859-1"
1014+
# The encoded byte string is consistent with either ISO-8859-1 or
1015+
# WINDOWS-1252. Versions <6.0 of chardet claim the former, while chardet
1016+
# 6.0 detects the latter.
1017+
assert response.encoding in ("ISO-8859-1", "WINDOWS-1252")
10151018
assert response.text == text
10161019

10171020

0 commit comments

Comments
 (0)