python-multipart 0.0.23__tar.gz → 0.0.24__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.
- {python_multipart-0.0.23 → python_multipart-0.0.24}/CHANGELOG.md +4 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/PKG-INFO +1 -1
- {python_multipart-0.0.23 → python_multipart-0.0.24}/pyproject.toml +1 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/python_multipart/__init__.py +1 -1
- {python_multipart-0.0.23 → python_multipart-0.0.24}/python_multipart/multipart.py +3 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_multipart.py +10 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/.gitignore +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/LICENSE.txt +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/README.md +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/multipart/__init__.py +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/multipart/decoders.py +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/multipart/exceptions.py +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/multipart/multipart.py +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/python_multipart/decoders.py +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/python_multipart/exceptions.py +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/python_multipart/py.typed +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/__init__.py +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/compat.py +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/CRLF_in_header.http +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/CRLF_in_header.yaml +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/CR_in_header.http +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/CR_in_header.yaml +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/CR_in_header_value.http +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/CR_in_header_value.yaml +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/almost_match_boundary.http +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/almost_match_boundary.yaml +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/almost_match_boundary_without_CR.http +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/almost_match_boundary_without_CR.yaml +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/almost_match_boundary_without_LF.http +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/almost_match_boundary_without_LF.yaml +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/almost_match_boundary_without_final_hyphen.http +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/almost_match_boundary_without_final_hyphen.yaml +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/bad_end_of_headers.http +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/bad_end_of_headers.yaml +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/bad_header_char.http +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/bad_header_char.yaml +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/bad_initial_boundary.http +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/bad_initial_boundary.yaml +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/base64_encoding.http +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/base64_encoding.yaml +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/empty_header.http +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/empty_header.yaml +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/empty_message.http +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/empty_message.yaml +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/empty_message_with_bad_end.http +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/empty_message_with_bad_end.yaml +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/header_with_number.http +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/header_with_number.yaml +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/mixed_plain_and_base64_encoding.http +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/mixed_plain_and_base64_encoding.yaml +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/multiple_fields.http +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/multiple_fields.yaml +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/multiple_files.http +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/multiple_files.yaml +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/quoted_printable_encoding.http +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/quoted_printable_encoding.yaml +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/single_field.http +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/single_field.yaml +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/single_field_blocks.http +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/single_field_blocks.yaml +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/single_field_longer.http +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/single_field_longer.yaml +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/single_field_single_file.http +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/single_field_single_file.yaml +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/single_field_with_leading_newlines.http +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/single_field_with_leading_newlines.yaml +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/single_file.http +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/single_file.yaml +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/utf8_filename.http +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/utf8_filename.yaml +0 -0
- {python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_file.py +0 -0
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.0.24 (2026-04-05)
|
|
4
|
+
|
|
5
|
+
* Validate `chunk_size` in `parse_form()` [#244](https://github.com/Kludex/python-multipart/pull/244).
|
|
6
|
+
|
|
3
7
|
## 0.0.23 (2026-04-05)
|
|
4
8
|
|
|
5
9
|
* Remove unused `trust_x_headers` parameter and `X-File-Name` fallback [#196](https://github.com/Kludex/python-multipart/pull/196).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-multipart
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.24
|
|
4
4
|
Summary: A streaming multipart parser for Python
|
|
5
5
|
Project-URL: Homepage, https://github.com/Kludex/python-multipart
|
|
6
6
|
Project-URL: Documentation, https://kludex.github.io/python-multipart/
|
|
@@ -1838,6 +1838,9 @@ def parse_form(
|
|
|
1838
1838
|
chunk_size: The maximum size to read from the input stream and write to the parser at one time.
|
|
1839
1839
|
Defaults to 1 MiB.
|
|
1840
1840
|
"""
|
|
1841
|
+
if chunk_size < 1:
|
|
1842
|
+
raise ValueError(f"chunk_size must be a positive number, not {chunk_size!r}")
|
|
1843
|
+
|
|
1841
1844
|
# Create our form parser.
|
|
1842
1845
|
parser = create_form_parser(headers, on_field, on_file)
|
|
1843
1846
|
|
|
@@ -1413,6 +1413,16 @@ class TestHelperFunctions(unittest.TestCase):
|
|
|
1413
1413
|
self.assertEqual(len(files), 1)
|
|
1414
1414
|
self.assertEqual(files[0].size, 10) # type: ignore[attr-defined]
|
|
1415
1415
|
|
|
1416
|
+
def test_parse_form_invalid_chunk_size(self) -> None:
|
|
1417
|
+
with self.assertRaisesRegex(ValueError, "chunk_size must be a positive number, not 0"):
|
|
1418
|
+
parse_form(
|
|
1419
|
+
{"Content-Type": b"application/octet-stream"},
|
|
1420
|
+
BytesIO(b"123456789012345"),
|
|
1421
|
+
lambda _: None,
|
|
1422
|
+
lambda _: None,
|
|
1423
|
+
chunk_size=0,
|
|
1424
|
+
)
|
|
1425
|
+
|
|
1416
1426
|
|
|
1417
1427
|
def suite() -> unittest.TestSuite:
|
|
1418
1428
|
suite = unittest.TestSuite()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/CRLF_in_header.http
RENAMED
|
File without changes
|
{python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/CRLF_in_header.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/CR_in_header_value.http
RENAMED
|
File without changes
|
{python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/CR_in_header_value.yaml
RENAMED
|
File without changes
|
{python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/almost_match_boundary.http
RENAMED
|
File without changes
|
{python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/almost_match_boundary.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/bad_end_of_headers.http
RENAMED
|
File without changes
|
{python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/bad_end_of_headers.yaml
RENAMED
|
File without changes
|
{python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/bad_header_char.http
RENAMED
|
File without changes
|
{python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/bad_header_char.yaml
RENAMED
|
File without changes
|
{python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/bad_initial_boundary.http
RENAMED
|
File without changes
|
{python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/bad_initial_boundary.yaml
RENAMED
|
File without changes
|
{python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/base64_encoding.http
RENAMED
|
File without changes
|
{python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/base64_encoding.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/header_with_number.http
RENAMED
|
File without changes
|
{python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/header_with_number.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/multiple_fields.http
RENAMED
|
File without changes
|
{python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/multiple_fields.yaml
RENAMED
|
File without changes
|
{python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/multiple_files.http
RENAMED
|
File without changes
|
{python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/multiple_files.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/single_field_blocks.http
RENAMED
|
File without changes
|
{python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/single_field_blocks.yaml
RENAMED
|
File without changes
|
{python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/single_field_longer.http
RENAMED
|
File without changes
|
{python_multipart-0.0.23 → python_multipart-0.0.24}/tests/test_data/http/single_field_longer.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|