Skip to content

Commit c35286e

Browse files
authored
Merge branch 'master' into master
2 parents df62396 + b5addb6 commit c35286e

8 files changed

Lines changed: 14 additions & 6 deletions

File tree

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
steps:
1717
- uses: "actions/checkout@v4"
18-
- uses: "actions/setup-python@v5"
18+
- uses: "actions/setup-python@v6"
1919
with:
2020
python-version: 3.9
2121
- name: "Install dependencies"

.github/workflows/test-suite.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
steps:
2020
- uses: "actions/checkout@v4"
21-
- uses: "actions/setup-python@v5"
21+
- uses: "actions/setup-python@v6"
2222
with:
2323
python-version: "${{ matrix.python-version }}"
2424
allow-prereleases: true

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
```

docs/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ You can also explicitly set the filename and content type, by using a tuple
191191
of items for the file value:
192192

193193
```pycon
194-
>>> with open('report.xls', 'rb') report_file:
194+
>>> with open('report.xls', 'rb') as report_file:
195195
... files = {'upload-file': ('report.xls', report_file, 'application/vnd.ms-excel')}
196196
... r = httpx.post("https://httpbin.org/post", files=files)
197197
>>> print(r.text)

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)