Skip to content

Commit 016c2e9

Browse files
fix: correct typos in source, tests, and docs
- seperately → separately (connection_pool.py) - dependancy → dependency (docs/proxies.md) - intial → initial (test files) - wit → with (test comments)
1 parent 10a6582 commit 016c2e9

9 files changed

Lines changed: 27 additions & 27 deletions

File tree

docs/proxies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ If you use proxies, keep in mind that the `httpcore` package only supports proxi
8888

8989
The `httpcore` package also supports proxies using the SOCKS5 protocol.
9090

91-
Make sure to install the optional dependancy using `pip install 'httpcore[socks]'`.
91+
Make sure to install the optional dependency using `pip install 'httpcore[socks]'`.
9292

9393
The `SOCKSProxy` class should be using instead of a standard connection pool:
9494

httpcore/_async/connection_pool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def _assign_requests_to_connections(self) -> list[AsyncConnectionInterface]:
275275
Called whenever a new request is added or removed from the pool.
276276
277277
Any closing connections are returned, allowing the I/O for closing
278-
those connections to be handled seperately.
278+
those connections to be handled separately.
279279
"""
280280
closing_connections = []
281281

httpcore/_sync/connection_pool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def _assign_requests_to_connections(self) -> list[ConnectionInterface]:
275275
Called whenever a new request is added or removed from the pool.
276276
277277
Any closing connections are returned, allowing the I/O for closing
278-
those connections to be handled seperately.
278+
those connections to be handled separately.
279279
"""
280280
closing_connections = []
281281

tests/_async/test_connection_pool.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ async def test_connection_pool_with_keepalive():
3232
async with httpcore.AsyncConnectionPool(
3333
network_backend=network_backend, max_keepalive_connections=1
3434
) as pool:
35-
# Sending an intial request, which once complete will return to the pool, IDLE.
35+
# Sending an initial request, which once complete will return to the pool, IDLE.
3636
async with pool.stream("GET", "https://example.com/") as response:
3737
info = [repr(c) for c in pool.connections]
3838
assert info == [
@@ -126,7 +126,7 @@ async def test_connection_pool_with_close():
126126
)
127127

128128
async with httpcore.AsyncConnectionPool(network_backend=network_backend) as pool:
129-
# Sending an intial request, which once complete will not return to the pool.
129+
# Sending an initial request, which once complete will not return to the pool.
130130
async with pool.stream(
131131
"GET", "https://example.com/", headers={"Connection": "close"}
132132
) as response:
@@ -183,7 +183,7 @@ async def test_connection_pool_with_http2():
183183
async with httpcore.AsyncConnectionPool(
184184
network_backend=network_backend,
185185
) as pool:
186-
# Sending an intial request, which once complete will return to the pool, IDLE.
186+
# Sending an initial request, which once complete will return to the pool, IDLE.
187187
response = await pool.request("GET", "https://example.com/")
188188
assert response.status == 200
189189
assert response.content == b"Hello, world!"
@@ -237,7 +237,7 @@ async def test_connection_pool_with_http2_goaway():
237237
async with httpcore.AsyncConnectionPool(
238238
network_backend=network_backend,
239239
) as pool:
240-
# Sending an intial request, which once complete will return to the pool, IDLE.
240+
# Sending an initial request, which once complete will return to the pool, IDLE.
241241
response = await pool.request("GET", "https://example.com/")
242242
assert response.status == 200
243243
assert response.content == b"Hello, world!"
@@ -471,7 +471,7 @@ async def test_connection_pool_with_immediate_expiry():
471471
keepalive_expiry=0.0,
472472
network_backend=network_backend,
473473
) as pool:
474-
# Sending an intial request, which once complete will not return to the pool.
474+
# Sending an initial request, which once complete will not return to the pool.
475475
async with pool.stream("GET", "https://example.com/") as response:
476476
info = [repr(c) for c in pool.connections]
477477
assert info == [
@@ -504,7 +504,7 @@ async def test_connection_pool_with_no_keepalive_connections_allowed():
504504
async with httpcore.AsyncConnectionPool(
505505
max_keepalive_connections=0, network_backend=network_backend
506506
) as pool:
507-
# Sending an intial request, which once complete will not return to the pool.
507+
# Sending an initial request, which once complete will not return to the pool.
508508
async with pool.stream("GET", "https://example.com/") as response:
509509
info = [repr(c) for c in pool.connections]
510510
assert info == [

tests/_async/test_http_proxy.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ async def test_proxy_forwarding():
3737
max_connections=10,
3838
network_backend=network_backend,
3939
) as proxy:
40-
# Sending an intial request, which once complete will return to the pool, IDLE.
40+
# Sending an initial request, which once complete will return to the pool, IDLE.
4141
async with proxy.stream("GET", "http://example.com/") as response:
4242
info = [repr(c) for c in proxy.connections]
4343
assert info == [
@@ -92,7 +92,7 @@ async def test_proxy_tunneling():
9292
proxy=Proxy("http://localhost:8080/"),
9393
network_backend=network_backend,
9494
) as proxy:
95-
# Sending an intial request, which once complete will return to the pool, IDLE.
95+
# Sending an initial request, which once complete will return to the pool, IDLE.
9696
async with proxy.stream("GET", "https://example.com/") as response:
9797
info = [repr(c) for c in proxy.connections]
9898
assert info == [
@@ -184,7 +184,7 @@ async def test_proxy_tunneling_http2():
184184
network_backend=network_backend,
185185
http2=True,
186186
) as proxy:
187-
# Sending an intial request, which once complete will return to the pool, IDLE.
187+
# Sending an initial request, which once complete will return to the pool, IDLE.
188188
async with proxy.stream("GET", "https://example.com/") as response:
189189
info = [repr(c) for c in proxy.connections]
190190
assert info == [

tests/_async/test_socks_proxy.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ async def test_socks5_request():
2828
proxy=httpcore.Proxy("socks5://localhost:8080/"),
2929
network_backend=network_backend,
3030
) as proxy:
31-
# Sending an intial request, which once complete will return to the pool, IDLE.
31+
# Sending an initial request, which once complete will return to the pool, IDLE.
3232
async with proxy.stream("GET", "https://example.com/") as response:
3333
info = [repr(c) for c in proxy.connections]
3434
assert info == [
@@ -91,7 +91,7 @@ async def test_authenticated_socks5_request():
9191
),
9292
network_backend=network_backend,
9393
) as proxy:
94-
# Sending an intial request, which once complete will return to the pool, IDLE.
94+
# Sending an initial request, which once complete will return to the pool, IDLE.
9595
async with proxy.stream("GET", "https://example.com/") as response:
9696
info = [repr(c) for c in proxy.connections]
9797
assert info == [
@@ -171,7 +171,7 @@ async def test_socks5_request_failed_to_provide_auth():
171171
async def test_socks5_request_incorrect_auth():
172172
"""
173173
Attempt to send an HTTP request via an authenticated SOCKS proxy,
174-
wit incorrect authentication credentials.
174+
with incorrect authentication credentials.
175175
"""
176176
network_backend = httpcore.AsyncMockBackend(
177177
[

tests/_sync/test_connection_pool.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def test_connection_pool_with_keepalive():
3232
with httpcore.ConnectionPool(
3333
network_backend=network_backend, max_keepalive_connections=1
3434
) as pool:
35-
# Sending an intial request, which once complete will return to the pool, IDLE.
35+
# Sending an initial request, which once complete will return to the pool, IDLE.
3636
with pool.stream("GET", "https://example.com/") as response:
3737
info = [repr(c) for c in pool.connections]
3838
assert info == [
@@ -126,7 +126,7 @@ def test_connection_pool_with_close():
126126
)
127127

128128
with httpcore.ConnectionPool(network_backend=network_backend) as pool:
129-
# Sending an intial request, which once complete will not return to the pool.
129+
# Sending an initial request, which once complete will not return to the pool.
130130
with pool.stream(
131131
"GET", "https://example.com/", headers={"Connection": "close"}
132132
) as response:
@@ -183,7 +183,7 @@ def test_connection_pool_with_http2():
183183
with httpcore.ConnectionPool(
184184
network_backend=network_backend,
185185
) as pool:
186-
# Sending an intial request, which once complete will return to the pool, IDLE.
186+
# Sending an initial request, which once complete will return to the pool, IDLE.
187187
response = pool.request("GET", "https://example.com/")
188188
assert response.status == 200
189189
assert response.content == b"Hello, world!"
@@ -237,7 +237,7 @@ def test_connection_pool_with_http2_goaway():
237237
with httpcore.ConnectionPool(
238238
network_backend=network_backend,
239239
) as pool:
240-
# Sending an intial request, which once complete will return to the pool, IDLE.
240+
# Sending an initial request, which once complete will return to the pool, IDLE.
241241
response = pool.request("GET", "https://example.com/")
242242
assert response.status == 200
243243
assert response.content == b"Hello, world!"
@@ -471,7 +471,7 @@ def test_connection_pool_with_immediate_expiry():
471471
keepalive_expiry=0.0,
472472
network_backend=network_backend,
473473
) as pool:
474-
# Sending an intial request, which once complete will not return to the pool.
474+
# Sending an initial request, which once complete will not return to the pool.
475475
with pool.stream("GET", "https://example.com/") as response:
476476
info = [repr(c) for c in pool.connections]
477477
assert info == [
@@ -504,7 +504,7 @@ def test_connection_pool_with_no_keepalive_connections_allowed():
504504
with httpcore.ConnectionPool(
505505
max_keepalive_connections=0, network_backend=network_backend
506506
) as pool:
507-
# Sending an intial request, which once complete will not return to the pool.
507+
# Sending an initial request, which once complete will not return to the pool.
508508
with pool.stream("GET", "https://example.com/") as response:
509509
info = [repr(c) for c in pool.connections]
510510
assert info == [

tests/_sync/test_http_proxy.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def test_proxy_forwarding():
3737
max_connections=10,
3838
network_backend=network_backend,
3939
) as proxy:
40-
# Sending an intial request, which once complete will return to the pool, IDLE.
40+
# Sending an initial request, which once complete will return to the pool, IDLE.
4141
with proxy.stream("GET", "http://example.com/") as response:
4242
info = [repr(c) for c in proxy.connections]
4343
assert info == [
@@ -92,7 +92,7 @@ def test_proxy_tunneling():
9292
proxy=Proxy("http://localhost:8080/"),
9393
network_backend=network_backend,
9494
) as proxy:
95-
# Sending an intial request, which once complete will return to the pool, IDLE.
95+
# Sending an initial request, which once complete will return to the pool, IDLE.
9696
with proxy.stream("GET", "https://example.com/") as response:
9797
info = [repr(c) for c in proxy.connections]
9898
assert info == [
@@ -184,7 +184,7 @@ def test_proxy_tunneling_http2():
184184
network_backend=network_backend,
185185
http2=True,
186186
) as proxy:
187-
# Sending an intial request, which once complete will return to the pool, IDLE.
187+
# Sending an initial request, which once complete will return to the pool, IDLE.
188188
with proxy.stream("GET", "https://example.com/") as response:
189189
info = [repr(c) for c in proxy.connections]
190190
assert info == [

tests/_sync/test_socks_proxy.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def test_socks5_request():
2828
proxy=httpcore.Proxy("socks5://localhost:8080/"),
2929
network_backend=network_backend,
3030
) as proxy:
31-
# Sending an intial request, which once complete will return to the pool, IDLE.
31+
# Sending an initial request, which once complete will return to the pool, IDLE.
3232
with proxy.stream("GET", "https://example.com/") as response:
3333
info = [repr(c) for c in proxy.connections]
3434
assert info == [
@@ -91,7 +91,7 @@ def test_authenticated_socks5_request():
9191
),
9292
network_backend=network_backend,
9393
) as proxy:
94-
# Sending an intial request, which once complete will return to the pool, IDLE.
94+
# Sending an initial request, which once complete will return to the pool, IDLE.
9595
with proxy.stream("GET", "https://example.com/") as response:
9696
info = [repr(c) for c in proxy.connections]
9797
assert info == [
@@ -171,7 +171,7 @@ def test_socks5_request_failed_to_provide_auth():
171171
def test_socks5_request_incorrect_auth():
172172
"""
173173
Attempt to send an HTTP request via an authenticated SOCKS proxy,
174-
wit incorrect authentication credentials.
174+
with incorrect authentication credentials.
175175
"""
176176
network_backend = httpcore.MockBackend(
177177
[

0 commit comments

Comments
 (0)