multipart 1.3.0__tar.gz → 2.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.
@@ -8,7 +8,37 @@ change corrects behavior to match documentation, specification or
8
8
  expectation. In other words: Bugfixes do not count as backward incompatible
9
9
  changes, even if they technically change behavior from *incorrect* to *correct*
10
10
  and may break applications that rely on *incorrect* or *undefined* behavior or
11
- *undocumented* APIs.
11
+ *undocumented* APIs. EOL Python versions may also be dropped during *minor*
12
+ releases.
13
+
14
+ Release 2.0
15
+ ===========
16
+
17
+ This release drops EOL python versions, improves error handling and
18
+ includes multiple performance improvements that can result in up to 30%
19
+ faster file uploads and 50% faster text field handling.
20
+
21
+ * change: Dropped support for Python 3.8 and 3.9 (both EOL), added support
22
+ for Python 3.14
23
+ * change: Accessing :attr:`MultipartSegment.size` before the segment is
24
+ complete now raises :exc:`ParserStateError`. The new attribute
25
+ :attr:`MultipartSegment.bytes_received` provides the in-progress segment
26
+ body byte count previously exposed by :attr:`MultipartSegment.size`.
27
+ * change: :class:`PushMultipartParser` now emits :class:`bytes` instead of
28
+ :class:`bytearray` for part body chunks. Update your ``isinstance`` checks
29
+ if you have any.
30
+ * change: Enforce ``part_limit`` (128 by default) for url-encoded data in
31
+ ``parse_form_data()``. This is consistent with multipart handling and an
32
+ important safeguard against denial of service attacks.
33
+ * change: New strict-mode check to reject extremely large boundaries.
34
+ * change: Raise more helpful :exc:`ParserStateError` instead of implicit
35
+ :exc:`AssertionError` or :exc:`TypeError` when the parser is used
36
+ incorrectly.
37
+ * change: The boundary delimiter must not appear inside a segment body
38
+ (RFC-7578 4.1). This triggers a fatal error now.
39
+ * feat: Hardened (and faster) header validation.
40
+ * build: Change default branch to ``main``.
41
+
12
42
 
13
43
  Release 1.3
14
44
  ===========
@@ -87,6 +117,7 @@ parser, which now serves as the basis for all other parsers.
87
117
  * change: Default disk and memory limits for ``MultipartParser`` increased, but multiple other limits were introduced to allow finer control. Check if the new defaults still fit your needs.
88
118
  * change: Several undocumented APIs were deprecated or removed, some of which were not strictly private but should only be used by the parser itself, not by applications.
89
119
 
120
+
90
121
  Release 0.2
91
122
  ===========
92
123
 
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010-2025, Marcel Hellkamp
1
+ Copyright (c) 2010-2026, Marcel Hellkamp
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: multipart
3
- Version: 1.3.0
3
+ Version: 2.0.0
4
4
  Summary: Parser for multipart/form-data
5
5
  Author-email: Marcel Hellkamp <marc@gsites.de>
6
- Requires-Python: >=3.8
6
+ Requires-Python: >=3.10
7
7
  Description-Content-Type: text/x-rst
8
8
  Classifier: Development Status :: 6 - Mature
9
9
  Classifier: Intended Audience :: Developers
@@ -13,29 +13,18 @@ Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
13
13
  Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries
14
14
  Classifier: Topic :: Internet :: WWW/HTTP :: WSGI
15
15
  Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3.8
17
- Classifier: Programming Language :: Python :: 3.9
18
16
  Classifier: Programming Language :: Python :: 3.10
19
17
  Classifier: Programming Language :: Python :: 3.11
20
18
  Classifier: Programming Language :: Python :: 3.12
21
19
  Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
22
21
  License-File: LICENSE
23
- Requires-Dist: pytest ; extra == "dev"
24
- Requires-Dist: pytest-cov ; extra == "dev"
25
- Requires-Dist: build ; extra == "dev"
26
- Requires-Dist: twine ; extra == "dev"
27
- Requires-Dist: tox ; extra == "dev"
28
- Requires-Dist: tox-uv ; extra == "dev"
29
- Requires-Dist: sphinx>=8,<9 ; extra == "docs"
30
- Requires-Dist: sphinx-autobuild ; extra == "docs"
31
22
  Project-URL: Changelog, https://multipart.readthedocs.io/en/latest/changelog.html
32
23
  Project-URL: Documentation, https://multipart.readthedocs.io/
33
24
  Project-URL: Homepage, https://multipart.readthedocs.io/
34
25
  Project-URL: Issues, https://github.com/defnull/multipart/issues
35
26
  Project-URL: PyPI, https://pypi.org/project/multipart/
36
27
  Project-URL: Source, https://github.com/defnull/multipart
37
- Provides-Extra: dev
38
- Provides-Extra: docs
39
28
 
40
29
  =================================
41
30
  Python multipart/form-data parser
@@ -43,7 +32,7 @@ Python multipart/form-data parser
43
32
 
44
33
  .. image:: https://github.com/defnull/multipart/actions/workflows/test.yaml/badge.svg
45
34
  :target: https://github.com/defnull/multipart/actions/workflows/test.yaml
46
- :alt: Tests Status
35
+ :alt: CI Status
47
36
 
48
37
  .. image:: https://img.shields.io/pypi/v/multipart.svg
49
38
  :target: https://pypi.python.org/pypi/multipart/
@@ -71,9 +60,9 @@ easier use in WSGI_ or CGI applications:
71
60
  * **PushMultipartParser**: Fast SansIO_ (incremental, non-blocking) parser suitable
72
61
  for ASGI_, asyncio_ and other IO, time or memory constrained environments.
73
62
  * **MultipartParser**: Streaming parser that reads from a byte stream and yields
74
- memory- or disk-buffered `MultipartPart` instances.
63
+ memory- or disk-buffered ``MultipartPart`` instances.
75
64
  * **WSGI Helper**: High-level functions and containers for WSGI_ or CGI applications with support
76
- for both `multipart` and `urlencoded` form submissions.
65
+ for both ``multipart`` and ``urlencoded`` form submissions.
77
66
 
78
67
  Features
79
68
  ========
@@ -81,9 +70,9 @@ Features
81
70
  * Pure python single file module with no dependencies.
82
71
  * Optimized for both blocking and non-blocking applications.
83
72
  * 100% test coverage with test data from actual browsers and HTTP clients.
84
- * High throughput and low latency (see `benchmarks <https://github.com/defnull/multipart_bench>`_).
73
+ * High throughput and low latency (see `benchmarks <https://defnull.de/2026/python-multipart-benchmark/>`_).
85
74
  * Predictable memory and disk resource consumption via fine grained limits.
86
- * Strict mode: Spent less time parsing malicious or broken inputs.
75
+ * Strict mode: Spend less time parsing malicious or broken inputs.
87
76
 
88
77
  Scope and compatibility
89
78
  =======================
@@ -111,7 +100,7 @@ Examples and API documentation can be found at: https://multipart.readthedocs.io
111
100
  License
112
101
  =======
113
102
 
114
- .. __: https://github.com/defnull/multipart/raw/master/LICENSE
103
+ .. __: https://github.com/defnull/multipart/raw/main/LICENSE
115
104
 
116
105
  Code and documentation are available under MIT License (see LICENSE__).
117
106
 
@@ -4,7 +4,7 @@ Python multipart/form-data parser
4
4
 
5
5
  .. image:: https://github.com/defnull/multipart/actions/workflows/test.yaml/badge.svg
6
6
  :target: https://github.com/defnull/multipart/actions/workflows/test.yaml
7
- :alt: Tests Status
7
+ :alt: CI Status
8
8
 
9
9
  .. image:: https://img.shields.io/pypi/v/multipart.svg
10
10
  :target: https://pypi.python.org/pypi/multipart/
@@ -32,9 +32,9 @@ easier use in WSGI_ or CGI applications:
32
32
  * **PushMultipartParser**: Fast SansIO_ (incremental, non-blocking) parser suitable
33
33
  for ASGI_, asyncio_ and other IO, time or memory constrained environments.
34
34
  * **MultipartParser**: Streaming parser that reads from a byte stream and yields
35
- memory- or disk-buffered `MultipartPart` instances.
35
+ memory- or disk-buffered ``MultipartPart`` instances.
36
36
  * **WSGI Helper**: High-level functions and containers for WSGI_ or CGI applications with support
37
- for both `multipart` and `urlencoded` form submissions.
37
+ for both ``multipart`` and ``urlencoded`` form submissions.
38
38
 
39
39
  Features
40
40
  ========
@@ -42,9 +42,9 @@ Features
42
42
  * Pure python single file module with no dependencies.
43
43
  * Optimized for both blocking and non-blocking applications.
44
44
  * 100% test coverage with test data from actual browsers and HTTP clients.
45
- * High throughput and low latency (see `benchmarks <https://github.com/defnull/multipart_bench>`_).
45
+ * High throughput and low latency (see `benchmarks <https://defnull.de/2026/python-multipart-benchmark/>`_).
46
46
  * Predictable memory and disk resource consumption via fine grained limits.
47
- * Strict mode: Spent less time parsing malicious or broken inputs.
47
+ * Strict mode: Spend less time parsing malicious or broken inputs.
48
48
 
49
49
  Scope and compatibility
50
50
  =======================
@@ -72,6 +72,6 @@ Examples and API documentation can be found at: https://multipart.readthedocs.io
72
72
  License
73
73
  =======
74
74
 
75
- .. __: https://github.com/defnull/multipart/raw/master/LICENSE
75
+ .. __: https://github.com/defnull/multipart/raw/main/LICENSE
76
76
 
77
77
  Code and documentation are available under MIT License (see LICENSE__).