xtr-http-message 6.8.0__tar.gz → 7.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xtr_http_message-6.8.0 → xtr_http_message-7.0.0}/PKG-INFO +8 -13
- {xtr_http_message-6.8.0 → xtr_http_message-7.0.0}/README.md +5 -6
- {xtr_http_message-6.8.0 → xtr_http_message-7.0.0}/pyproject.toml +10 -14
- {xtr_http_message-6.8.0 → xtr_http_message-7.0.0}/pyproject.toml.orig +14 -19
- {xtr_http_message-6.8.0 → xtr_http_message-7.0.0}/src/xtr_http_message/.agents/skills/xtr-http-message/SKILL.md +1 -1
- {xtr_http_message-6.8.0 → xtr_http_message-7.0.0}/src/xtr_http_message/_connected_trait.py +1 -3
- {xtr_http_message-6.8.0 → xtr_http_message-7.0.0}/src/xtr_http_message/factory/http_factory.py +1 -2
- {xtr_http_message-6.8.0 → xtr_http_message-7.0.0}/src/xtr_http_message/lazy_stream.py +1 -2
- {xtr_http_message-6.8.0 → xtr_http_message-7.0.0}/src/xtr_http_message/response.py +1 -2
- {xtr_http_message-6.8.0 → xtr_http_message-7.0.0}/src/xtr_http_message/server_request.py +2 -6
- {xtr_http_message-6.8.0 → xtr_http_message-7.0.0}/src/xtr_http_message/stream.py +1 -2
- {xtr_http_message-6.8.0 → xtr_http_message-7.0.0}/src/xtr_http_message/uploaded_file.py +1 -2
- {xtr_http_message-6.8.0 → xtr_http_message-7.0.0}/src/xtr_http_message/uri.py +1 -2
- {xtr_http_message-6.8.0 → xtr_http_message-7.0.0}/LICENSE +0 -0
- {xtr_http_message-6.8.0 → xtr_http_message-7.0.0}/src/xtr_http_message/__init__.py +0 -0
- {xtr_http_message-6.8.0 → xtr_http_message-7.0.0}/src/xtr_http_message/_ascii.py +0 -0
- {xtr_http_message-6.8.0 → xtr_http_message-7.0.0}/src/xtr_http_message/_message_trait.py +0 -0
- {xtr_http_message-6.8.0 → xtr_http_message-7.0.0}/src/xtr_http_message/_request_trait.py +0 -0
- {xtr_http_message-6.8.0 → xtr_http_message-7.0.0}/src/xtr_http_message/exception/__init__.py +0 -0
- {xtr_http_message-6.8.0 → xtr_http_message-7.0.0}/src/xtr_http_message/exception/http_message_error.py +0 -0
- {xtr_http_message-6.8.0 → xtr_http_message-7.0.0}/src/xtr_http_message/exception/invalid_argument_error.py +0 -0
- {xtr_http_message-6.8.0 → xtr_http_message-7.0.0}/src/xtr_http_message/exception/stream_error.py +0 -0
- {xtr_http_message-6.8.0 → xtr_http_message-7.0.0}/src/xtr_http_message/exception/uploaded_file_error.py +0 -0
- {xtr_http_message-6.8.0 → xtr_http_message-7.0.0}/src/xtr_http_message/factory/__init__.py +0 -0
- {xtr_http_message-6.8.0 → xtr_http_message-7.0.0}/src/xtr_http_message/py.typed +0 -0
- {xtr_http_message-6.8.0 → xtr_http_message-7.0.0}/src/xtr_http_message/request.py +0 -0
- {xtr_http_message-6.8.0 → xtr_http_message-7.0.0}/src/xtr_http_message/request_source.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: xtr-http-message
|
|
3
|
-
Version:
|
|
3
|
+
Version: 7.0.0
|
|
4
4
|
Summary: A strict, framework-free implementation of the HTTP message contract: requests, responses, streams, URIs, uploaded files and one factory for all six.
|
|
5
5
|
Keywords: http,http-message,request,response,stream,uri,uploaded-file
|
|
6
6
|
Author: Xterr
|
|
@@ -9,16 +9,12 @@ License-Expression: MIT
|
|
|
9
9
|
License-File: LICENSE
|
|
10
10
|
Classifier: Development Status :: 3 - Alpha
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
15
12
|
Classifier: Programming Language :: Python :: 3.14
|
|
16
13
|
Classifier: Topic :: Internet :: WWW/HTTP
|
|
17
14
|
Classifier: Typing :: Typed
|
|
18
|
-
Requires-Dist: xtr-http-message-contracts>=
|
|
19
|
-
Requires-Dist: typing-extensions>=4.4
|
|
15
|
+
Requires-Dist: xtr-http-message-contracts>=7.0,<8
|
|
20
16
|
Requires-Dist: uritools>=6.1,<7
|
|
21
|
-
Requires-Python: >=3.
|
|
17
|
+
Requires-Python: >=3.14.4
|
|
22
18
|
Description-Content-Type: text/markdown
|
|
23
19
|
|
|
24
20
|
<div align="center">
|
|
@@ -27,8 +23,8 @@ Description-Content-Type: text/markdown
|
|
|
27
23
|
|
|
28
24
|
**The HTTP message contract, implemented — six small classes, one factory, a request that can be born connected, and no web framework anywhere in sight.**
|
|
29
25
|
|
|
30
|
-
<img alt="python 3.
|
|
31
|
-
<img alt="core dependencies:
|
|
26
|
+
<img alt="python 3.14+" src="https://img.shields.io/badge/python-%E2%89%A5%203.14-3776AB?logo=python&logoColor=white">
|
|
27
|
+
<img alt="core dependencies: 2" src="https://img.shields.io/badge/core%20deps-2-3FB950">
|
|
32
28
|
<img alt="typed" src="https://img.shields.io/badge/typed-ty%20%2B%20basedpyright-1f6feb">
|
|
33
29
|
<img alt="license MIT" src="https://img.shields.io/badge/license-MIT-blue">
|
|
34
30
|
|
|
@@ -75,9 +71,8 @@ assert response.get_reason_phrase() == "Created"
|
|
|
75
71
|
uv add xtr-http-message
|
|
76
72
|
```
|
|
77
73
|
|
|
78
|
-
Requires Python 3.
|
|
79
|
-
|
|
80
|
-
defines it.
|
|
74
|
+
Requires Python 3.14.4+. Two runtime dependencies: the contract it implements, and `uritools` to
|
|
75
|
+
split a URI the way RFC 3986 defines it.
|
|
81
76
|
|
|
82
77
|
## Who installs what
|
|
83
78
|
|
|
@@ -293,7 +288,7 @@ is copied a mebibyte at a time, and a second move is refused.
|
|
|
293
288
|
configuration file, no environment variable, no path to ignore.
|
|
294
289
|
- **Activate** — nothing to activate. These are classes, not a service: build one where you need
|
|
295
290
|
one, or take `HttpFactory` as a dependency and let it build them.
|
|
296
|
-
- **Brings along** — `xtr-http-message-contracts
|
|
291
|
+
- **Brings along** — `xtr-http-message-contracts` and `uritools`. No web
|
|
297
292
|
framework, no container, no I/O until a stream is read.
|
|
298
293
|
- **Configure** — nothing to configure.
|
|
299
294
|
- **Environment** — nothing to set.
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
**The HTTP message contract, implemented — six small classes, one factory, a request that can be born connected, and no web framework anywhere in sight.**
|
|
6
6
|
|
|
7
|
-
<img alt="python 3.
|
|
8
|
-
<img alt="core dependencies:
|
|
7
|
+
<img alt="python 3.14+" src="https://img.shields.io/badge/python-%E2%89%A5%203.14-3776AB?logo=python&logoColor=white">
|
|
8
|
+
<img alt="core dependencies: 2" src="https://img.shields.io/badge/core%20deps-2-3FB950">
|
|
9
9
|
<img alt="typed" src="https://img.shields.io/badge/typed-ty%20%2B%20basedpyright-1f6feb">
|
|
10
10
|
<img alt="license MIT" src="https://img.shields.io/badge/license-MIT-blue">
|
|
11
11
|
|
|
@@ -52,9 +52,8 @@ assert response.get_reason_phrase() == "Created"
|
|
|
52
52
|
uv add xtr-http-message
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
Requires Python 3.
|
|
56
|
-
|
|
57
|
-
defines it.
|
|
55
|
+
Requires Python 3.14.4+. Two runtime dependencies: the contract it implements, and `uritools` to
|
|
56
|
+
split a URI the way RFC 3986 defines it.
|
|
58
57
|
|
|
59
58
|
## Who installs what
|
|
60
59
|
|
|
@@ -270,7 +269,7 @@ is copied a mebibyte at a time, and a second move is refused.
|
|
|
270
269
|
configuration file, no environment variable, no path to ignore.
|
|
271
270
|
- **Activate** — nothing to activate. These are classes, not a service: build one where you need
|
|
272
271
|
one, or take `HttpFactory` as a dependency and let it build them.
|
|
273
|
-
- **Brings along** — `xtr-http-message-contracts
|
|
272
|
+
- **Brings along** — `xtr-http-message-contracts` and `uritools`. No web
|
|
274
273
|
framework, no container, no I/O until a stream is read.
|
|
275
274
|
- **Configure** — nothing to configure.
|
|
276
275
|
- **Environment** — nothing to set.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "xtr-http-message"
|
|
3
|
-
version = "
|
|
3
|
+
version = "7.0.0"
|
|
4
4
|
description = "A strict, framework-free implementation of the HTTP message contract: requests, responses, streams, URIs, uploaded files and one factory for all six."
|
|
5
5
|
readme = "README.md"
|
|
6
|
-
requires-python = ">=3.
|
|
6
|
+
requires-python = ">=3.14.4"
|
|
7
7
|
license = "MIT"
|
|
8
8
|
license-files = ["LICENSE"]
|
|
9
9
|
keywords = [
|
|
@@ -18,16 +18,12 @@ keywords = [
|
|
|
18
18
|
classifiers = [
|
|
19
19
|
"Development Status :: 3 - Alpha",
|
|
20
20
|
"Intended Audience :: Developers",
|
|
21
|
-
"Programming Language :: Python :: 3.11",
|
|
22
|
-
"Programming Language :: Python :: 3.12",
|
|
23
|
-
"Programming Language :: Python :: 3.13",
|
|
24
21
|
"Programming Language :: Python :: 3.14",
|
|
25
22
|
"Topic :: Internet :: WWW/HTTP",
|
|
26
23
|
"Typing :: Typed",
|
|
27
24
|
]
|
|
28
25
|
dependencies = [
|
|
29
|
-
"xtr-http-message-contracts>=
|
|
30
|
-
"typing-extensions>=4.4",
|
|
26
|
+
"xtr-http-message-contracts>=7.0,<8",
|
|
31
27
|
"uritools>=6.1,<7",
|
|
32
28
|
]
|
|
33
29
|
|
|
@@ -37,11 +33,11 @@ email = "me@xterr.dev"
|
|
|
37
33
|
|
|
38
34
|
[dependency-groups]
|
|
39
35
|
dev = [
|
|
40
|
-
"basedpyright>=1.
|
|
41
|
-
"ruff>=0.
|
|
42
|
-
"pytest>=8",
|
|
43
|
-
"pytest-cov>=
|
|
44
|
-
"anyio>=4.
|
|
36
|
+
"basedpyright>=1.31.7",
|
|
37
|
+
"ruff>=0.14.7",
|
|
38
|
+
"pytest>=8.4",
|
|
39
|
+
"pytest-cov>=7.1",
|
|
40
|
+
"anyio>=4.10",
|
|
45
41
|
"ty>=0.0.83",
|
|
46
42
|
]
|
|
47
43
|
|
|
@@ -50,7 +46,7 @@ workspace = true
|
|
|
50
46
|
|
|
51
47
|
[tool.basedpyright]
|
|
52
48
|
typeCheckingMode = "all"
|
|
53
|
-
pythonVersion = "3.
|
|
49
|
+
pythonVersion = "3.14"
|
|
54
50
|
pythonPlatform = "All"
|
|
55
51
|
include = [
|
|
56
52
|
"src",
|
|
@@ -70,7 +66,7 @@ reportMissingParameterType = "error"
|
|
|
70
66
|
reportPrivateUsage = "error"
|
|
71
67
|
|
|
72
68
|
[tool.ruff]
|
|
73
|
-
target-version = "
|
|
69
|
+
target-version = "py314"
|
|
74
70
|
line-length = 100
|
|
75
71
|
src = [
|
|
76
72
|
"src",
|
|
@@ -1,43 +1,38 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "xtr-http-message"
|
|
3
|
-
version = "
|
|
3
|
+
version = "7.0.0"
|
|
4
4
|
description = "A strict, framework-free implementation of the HTTP message contract: requests, responses, streams, URIs, uploaded files and one factory for all six."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [
|
|
7
7
|
{ name = "Xterr", email = "me@xterr.dev" }
|
|
8
8
|
]
|
|
9
|
-
requires-python = ">=3.
|
|
9
|
+
requires-python = ">=3.14.4"
|
|
10
10
|
license = "MIT"
|
|
11
11
|
license-files = ["LICENSE"]
|
|
12
12
|
keywords = ["http", "http-message", "request", "response", "stream", "uri", "uploaded-file"]
|
|
13
13
|
classifiers = [
|
|
14
14
|
"Development Status :: 3 - Alpha",
|
|
15
15
|
"Intended Audience :: Developers",
|
|
16
|
-
"Programming Language :: Python :: 3.11",
|
|
17
|
-
"Programming Language :: Python :: 3.12",
|
|
18
|
-
"Programming Language :: Python :: 3.13",
|
|
19
16
|
"Programming Language :: Python :: 3.14",
|
|
20
17
|
"Topic :: Internet :: WWW/HTTP",
|
|
21
18
|
"Typing :: Typed",
|
|
22
19
|
]
|
|
23
|
-
# The contract it implements, `
|
|
24
|
-
#
|
|
25
|
-
#
|
|
26
|
-
#
|
|
27
|
-
# standard library.
|
|
20
|
+
# The contract it implements, and `uritools` to split a URI the way RFC 3986
|
|
21
|
+
# defines it (the standard library's splitter deletes a tab, a carriage return
|
|
22
|
+
# and a newline before anything of ours sees the string). Everything else the
|
|
23
|
+
# six classes need is in the standard library.
|
|
28
24
|
dependencies = [
|
|
29
|
-
"xtr-http-message-contracts>=
|
|
30
|
-
"typing-extensions>=4.4",
|
|
25
|
+
"xtr-http-message-contracts>=7.0,<8",
|
|
31
26
|
"uritools>=6.1,<7",
|
|
32
27
|
]
|
|
33
28
|
|
|
34
29
|
[dependency-groups]
|
|
35
30
|
dev = [
|
|
36
|
-
"basedpyright>=1.
|
|
37
|
-
"ruff>=0.
|
|
38
|
-
"pytest>=8",
|
|
39
|
-
"pytest-cov>=
|
|
40
|
-
"anyio>=4.
|
|
31
|
+
"basedpyright>=1.31.7",
|
|
32
|
+
"ruff>=0.14.7",
|
|
33
|
+
"pytest>=8.4",
|
|
34
|
+
"pytest-cov>=7.1",
|
|
35
|
+
"anyio>=4.10",
|
|
41
36
|
"ty>=0.0.83",
|
|
42
37
|
]
|
|
43
38
|
|
|
@@ -53,7 +48,7 @@ build-backend = "uv_build"
|
|
|
53
48
|
# ─────────────────────────────────────────────────────────────────
|
|
54
49
|
[tool.basedpyright]
|
|
55
50
|
typeCheckingMode = "all"
|
|
56
|
-
pythonVersion = "3.
|
|
51
|
+
pythonVersion = "3.14"
|
|
57
52
|
pythonPlatform = "All"
|
|
58
53
|
include = ["src", "tests"]
|
|
59
54
|
exclude = ["**/__pycache__", "**/.venv", "**/build", "**/dist", ".tmp"]
|
|
@@ -68,7 +63,7 @@ reportPrivateUsage = "error"
|
|
|
68
63
|
# ruff — select = ["ALL"], minimal justified ignores
|
|
69
64
|
# ─────────────────────────────────────────────────────────────────
|
|
70
65
|
[tool.ruff]
|
|
71
|
-
target-version = "
|
|
66
|
+
target-version = "py314"
|
|
72
67
|
line-length = 100
|
|
73
68
|
src = ["src", "tests"]
|
|
74
69
|
|
|
@@ -289,7 +289,7 @@ async def test_a_body_can_be_read_from_a_file(tmp_path: Path) -> None:
|
|
|
289
289
|
file, no environment variable, no path to ignore.
|
|
290
290
|
3. **Activate** — nothing to activate. Build a class where you need one, or take `HttpFactory`
|
|
291
291
|
as a dependency.
|
|
292
|
-
4. **Brings along** — `xtr-http-message-contracts
|
|
292
|
+
4. **Brings along** — `xtr-http-message-contracts` and `uritools`. No web
|
|
293
293
|
framework, no container.
|
|
294
294
|
5. **Configure** — nothing to configure.
|
|
295
295
|
6. **Environment** — nothing to set.
|
|
@@ -12,9 +12,7 @@ carries the rest.
|
|
|
12
12
|
|
|
13
13
|
from __future__ import annotations
|
|
14
14
|
|
|
15
|
-
from typing import TYPE_CHECKING, ClassVar, Self
|
|
16
|
-
|
|
17
|
-
from typing_extensions import override
|
|
15
|
+
from typing import TYPE_CHECKING, ClassVar, Self, override
|
|
18
16
|
|
|
19
17
|
from ._request_trait import RequestTrait
|
|
20
18
|
from .lazy_stream import LazyStream
|
{xtr_http_message-6.8.0 → xtr_http_message-7.0.0}/src/xtr_http_message/factory/http_factory.py
RENAMED
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from pathlib import Path
|
|
6
|
-
from typing import TYPE_CHECKING, cast, final
|
|
6
|
+
from typing import TYPE_CHECKING, cast, final, override
|
|
7
7
|
|
|
8
|
-
from typing_extensions import override
|
|
9
8
|
from xtr_http_message_contracts import UploadError
|
|
10
9
|
from xtr_http_message_contracts.factory import (
|
|
11
10
|
RequestFactoryInterface,
|
|
@@ -12,9 +12,8 @@ after it.
|
|
|
12
12
|
from __future__ import annotations
|
|
13
13
|
|
|
14
14
|
import os
|
|
15
|
-
from typing import TYPE_CHECKING, final
|
|
15
|
+
from typing import TYPE_CHECKING, final, override
|
|
16
16
|
|
|
17
|
-
from typing_extensions import override
|
|
18
17
|
from xtr_http_message_contracts import StreamInterface
|
|
19
18
|
|
|
20
19
|
from .stream import Stream
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from types import MappingProxyType
|
|
6
|
-
from typing import TYPE_CHECKING, Final, Self, final
|
|
6
|
+
from typing import TYPE_CHECKING, Final, Self, final, override
|
|
7
7
|
|
|
8
|
-
from typing_extensions import override
|
|
9
8
|
from xtr_http_message_contracts import ResponseInterface
|
|
10
9
|
|
|
11
10
|
from ._message_trait import MessageTrait
|
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from collections.abc import Mapping, MutableMapping
|
|
6
|
-
from typing import TYPE_CHECKING, Self,
|
|
6
|
+
from typing import TYPE_CHECKING, Self, final, override
|
|
7
7
|
from urllib.parse import parse_qsl
|
|
8
8
|
|
|
9
|
-
from typing_extensions import override
|
|
10
9
|
from xtr_http_message_contracts import ServerRequestInterface
|
|
11
10
|
|
|
12
11
|
from ._connected_trait import ConnectedTrait
|
|
@@ -25,11 +24,8 @@ __all__ = ["ServerRequest"]
|
|
|
25
24
|
|
|
26
25
|
_HOST = "Host"
|
|
27
26
|
|
|
28
|
-
_K = TypeVar("_K")
|
|
29
|
-
_V = TypeVar("_V")
|
|
30
27
|
|
|
31
|
-
|
|
32
|
-
def _held(given: Mapping[_K, _V]) -> Mapping[_K, _V]:
|
|
28
|
+
def _held[K, V](given: Mapping[K, V]) -> Mapping[K, V]:
|
|
33
29
|
"""Return the mapping to hold for one given to the request.
|
|
34
30
|
|
|
35
31
|
A mapping nobody can change is held as it is: copying it would only cost a
|
|
@@ -4,9 +4,8 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import io
|
|
6
6
|
import os
|
|
7
|
-
from typing import TYPE_CHECKING, final
|
|
7
|
+
from typing import TYPE_CHECKING, final, override
|
|
8
8
|
|
|
9
|
-
from typing_extensions import override
|
|
10
9
|
from xtr_http_message_contracts import StreamInterface
|
|
11
10
|
|
|
12
11
|
from .exception import StreamError
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from pathlib import Path
|
|
6
|
-
from typing import TYPE_CHECKING, Literal, final
|
|
6
|
+
from typing import TYPE_CHECKING, Literal, final, override
|
|
7
7
|
|
|
8
|
-
from typing_extensions import override
|
|
9
8
|
from xtr_http_message_contracts import StreamInterface, UploadedFileInterface, UploadError
|
|
10
9
|
|
|
11
10
|
from .exception import InvalidArgumentError, UploadedFileError
|
|
@@ -14,10 +14,9 @@ import copy
|
|
|
14
14
|
import re
|
|
15
15
|
from ipaddress import IPv6Address
|
|
16
16
|
from types import MappingProxyType
|
|
17
|
-
from typing import TYPE_CHECKING, Final, Self, final
|
|
17
|
+
from typing import TYPE_CHECKING, Final, Self, final, override
|
|
18
18
|
from urllib.parse import quote
|
|
19
19
|
|
|
20
|
-
from typing_extensions import override
|
|
21
20
|
from uritools import uridefrag, urisplit
|
|
22
21
|
from xtr_http_message_contracts import UriInterface
|
|
23
22
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{xtr_http_message-6.8.0 → xtr_http_message-7.0.0}/src/xtr_http_message/exception/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{xtr_http_message-6.8.0 → xtr_http_message-7.0.0}/src/xtr_http_message/exception/stream_error.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|