8000 Merge branch 'master' into add-connection-documentation · encode/httpcore@ce57904 · GitHub
[go: up one dir, main page]

Skip to content

Commit ce57904

Browse files
authored
Merge branch 'master' into add-connection-documentation
2 parents f3a162b + 221a507 commit ce57904

37 files changed

+1018
-212
lines changed

.github/ISSUE_TEMPLATE/1-issue.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: Issue
3+
about: Please only raise an issue if you've been advised to do so after discussion. Thanks! 🙏
4+
---
5+
6+
The starting point for issues should usually be a discussion...
7+
8+
https://github.com/encode/httpcore/discussions
9+
10+
Possible bugs may be raised as a "Potential Issue" discussion, feature requests may be raised as an "Ideas" discussion. We can then determine if the discussion needs to be escalated into an "Issue" or not.
11+
12+
This will help us ensure that the "Issues" list properly reflects ongoing or needed work on the project.
13+
14+
---
15+
16+
- [ ] Initially raised as discussion #...

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Ref: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser
2+
blank_issues_enabled: false
3+
contact_links:
4+
- name: Discussions
5+
url: https://github.com/encode/httpcore/discussions
6+
about: >
7+
The "Discussions" forum is where you want to start. 💖
8+
- name: Chat
9+
url: https://gitter.im/encode/community
10+
about: >
11+
Our community chat forum.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!-- Thanks for contributing to HTTP Core! 💚
2+
Given this is a project maintained by volunteers, please read this template to not waste your time, or ours! 😁 -->
3+
4+
# Summary
5+
6+
<!-- Write a small summary about what is happening here. -->
7+
8+
# Checklist
9+
10+
- [ ] I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
11+
- [ ] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
12+
- [ ] I've updated the documentation accordingly.

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
name: deploy
1515

1616
steps:
17-
- uses: "actions/checkout@v3"
17+
- uses: "actions/checkout@v4"
1818
- uses: "actions/setup-python@v4"
1919
with:
20-
python-version: 3.7
20+
python-version: 3.8
2121
- name: "Install dependencies"
2222
run: "scripts/install"
2323
- name: "Build package & docs"

.github/workflows/test-suite.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@ jobs:
1414

1515
strategy:
1616
matrix:
17-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
17+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
1818

1919
steps:
20-
- uses: "actions/checkout@v3"
20+
- uses: "actions/checkout@v4"
2121
- uses: "actions/setup-python@v4"
2222
with:
2323
python-version: "${{ matrix.python-version }}"
24+
allow-prereleases: true
2425
- name: "Install dependencies"
2526
run: "scripts/install"
2627
- name: "Run linting checks"

CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,25 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

7-
## unreleased
7+
## Unreleased
88

9+
- Add support for Python 3.12. (#807)
10+
11+
## 0.18.0 (September 8th, 2023)
12+
13+
- Add support for HTTPS proxies. (#745, #786)
14+
- Drop Python 3.7 support. (#727)
15+
- Handle `sni_hostname` extension with SOCKS proxy. (#774)
16+
- Handle HTTP/1.1 half-closed connections gracefully. (#641)
17+
- Change the type of `Extensions` from `Mapping[Str, Any]` to `MutableMapping[Str, Any]`. (#762)
18+
19+
## 0.17.3 (July 5th, 2023)
20+
21+
- Support async cancellations, ensuring that the connection pool is left in a clean state when cancellations occur. (#726)
922
- The networking backend interface has [been added to the public API](https://www.encode.io/httpcore/network-backends). Some classes which were previously private implementation detail are now part of the top-level public API. (#699)
1023
- Graceful handling of HTTP/2 GoAway frames, with requests being transparently retried on a new connection. (#730)
1124
- Add exceptions when a synchronous `trace callback` is passed to an asynchronous request or an asynchronous `trace callback` is passed to a synchronous request. (#717)
25+
- Drop Python 3.7 support. (#727)
1226

1327
## 0.17.2 (May 23th, 2023)
1428

MANIFEST.in

Lines changed: 0 additions & 4 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Some things HTTP Core does do:
2525

2626
## Requirements
2727

28-
Python 3.7+
28+
Python 3.8+
2929

3030
## Installation
3131

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Some things HTTP Core does do:
2525

2626
## Requirements
2727

28-
Python 3.7+
28+
Python 3.8+
2929

3030
## Installation
3131

docs/proxies.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,33 @@ proxy = httpcore.HTTPProxy(
5151
)
5252
```
5353

54-
## Proxy SSL and HTTP Versions
54+
## Proxy SSL
5555

56-
Proxy support currently only allows for HTTP/1.1 connections to the proxy,
57-
and does not currently support SSL proxy connections, which require HTTPS-in-HTTPS,
56+
The `httpcore` package also supports HTTPS proxies for http and https destinations.
57+
58+
HTTPS proxies can be used in the same way that HTTP proxies are.
59+
60+
```python
61+
proxy = httpcore.HTTPProxy(proxy_url="https://127.0.0.1:8080/")
62+
```
63+
64+
Also, when using HTTPS proxies, you may need to configure the SSL context, which you can do with the `proxy_ssl_context` argument.
65+
66+
```python
67+
import ssl
68+
import httpcore
69+
70+
proxy_ssl_context = ssl.create_default_context()
71+
proxy_ssl_context.check_hostname = False
72+
73+
proxy = httpcore.HTTPProxy('https://127.0.0.1:8080/', proxy_ssl_context=proxy_ssl_context)
74+
```
75+
76+
It is important to note that the `ssl_context` argument is always used for the remote connection, and the `proxy_ssl_context` argument is always used for the proxy connection.
77+
78+
## HTTP Versions
79+
80+
If you use proxies, keep in mind that the `httpcore` package only supports proxies to HTTP/1.1 servers.
5881

5982
## SOCKS proxy support
6083

0 commit comments

Comments
 (0)
0