python-multipart 0.0.15__tar.gz → 0.0.17__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.
Files changed (67) hide show
  1. {python_multipart-0.0.15 → python_multipart-0.0.17}/CHANGELOG.md +8 -0
  2. {python_multipart-0.0.15 → python_multipart-0.0.17}/PKG-INFO +1 -1
  3. python_multipart-0.0.17/multipart/__init__.py +24 -0
  4. {python_multipart-0.0.15 → python_multipart-0.0.17}/pyproject.toml +9 -8
  5. {python_multipart-0.0.15 → python_multipart-0.0.17}/python_multipart/__init__.py +1 -1
  6. python_multipart-0.0.15/multipart/__init__.py +0 -20
  7. {python_multipart-0.0.15 → python_multipart-0.0.17}/.gitignore +0 -0
  8. {python_multipart-0.0.15 → python_multipart-0.0.17}/LICENSE.txt +0 -0
  9. {python_multipart-0.0.15 → python_multipart-0.0.17}/README.md +0 -0
  10. {python_multipart-0.0.15 → python_multipart-0.0.17}/multipart/decoders.py +0 -0
  11. {python_multipart-0.0.15 → python_multipart-0.0.17}/multipart/exceptions.py +0 -0
  12. {python_multipart-0.0.15 → python_multipart-0.0.17}/multipart/multipart.py +0 -0
  13. {python_multipart-0.0.15 → python_multipart-0.0.17}/python_multipart/decoders.py +0 -0
  14. {python_multipart-0.0.15 → python_multipart-0.0.17}/python_multipart/exceptions.py +0 -0
  15. {python_multipart-0.0.15 → python_multipart-0.0.17}/python_multipart/multipart.py +0 -0
  16. {python_multipart-0.0.15 → python_multipart-0.0.17}/python_multipart/py.typed +0 -0
  17. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/__init__.py +0 -0
  18. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/compat.py +0 -0
  19. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/CRLF_in_header.http +0 -0
  20. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/CRLF_in_header.yaml +0 -0
  21. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/CR_in_header.http +0 -0
  22. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/CR_in_header.yaml +0 -0
  23. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/CR_in_header_value.http +0 -0
  24. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/CR_in_header_value.yaml +0 -0
  25. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/almost_match_boundary.http +0 -0
  26. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/almost_match_boundary.yaml +0 -0
  27. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/almost_match_boundary_without_CR.http +0 -0
  28. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/almost_match_boundary_without_CR.yaml +0 -0
  29. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/almost_match_boundary_without_LF.http +0 -0
  30. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/almost_match_boundary_without_LF.yaml +0 -0
  31. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/almost_match_boundary_without_final_hyphen.http +0 -0
  32. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/almost_match_boundary_without_final_hyphen.yaml +0 -0
  33. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/bad_end_of_headers.http +0 -0
  34. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/bad_end_of_headers.yaml +0 -0
  35. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/bad_header_char.http +0 -0
  36. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/bad_header_char.yaml +0 -0
  37. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/bad_initial_boundary.http +0 -0
  38. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/bad_initial_boundary.yaml +0 -0
  39. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/base64_encoding.http +0 -0
  40. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/base64_encoding.yaml +0 -0
  41. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/empty_header.http +0 -0
  42. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/empty_header.yaml +0 -0
  43. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/header_with_number.http +0 -0
  44. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/header_with_number.yaml +0 -0
  45. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/mixed_plain_and_base64_encoding.http +0 -0
  46. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/mixed_plain_and_base64_encoding.yaml +0 -0
  47. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/multiple_fields.http +0 -0
  48. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/multiple_fields.yaml +0 -0
  49. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/multiple_files.http +0 -0
  50. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/multiple_files.yaml +0 -0
  51. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/quoted_printable_encoding.http +0 -0
  52. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/quoted_printable_encoding.yaml +0 -0
  53. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/single_field.http +0 -0
  54. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/single_field.yaml +0 -0
  55. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/single_field_blocks.http +0 -0
  56. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/single_field_blocks.yaml +0 -0
  57. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/single_field_longer.http +0 -0
  58. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/single_field_longer.yaml +0 -0
  59. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/single_field_single_file.http +0 -0
  60. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/single_field_single_file.yaml +0 -0
  61. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/single_field_with_leading_newlines.http +0 -0
  62. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/single_field_with_leading_newlines.yaml +0 -0
  63. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/single_file.http +0 -0
  64. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/single_file.yaml +0 -0
  65. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/utf8_filename.http +0 -0
  66. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_data/http/utf8_filename.yaml +0 -0
  67. {python_multipart-0.0.15 → python_multipart-0.0.17}/tests/test_multipart.py +0 -0
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.0.17 (2024-10-31)
4
+
5
+ * Handle PermissionError in fallback code for old import name [#182](https://github.com/Kludex/python-multipart/pull/182).
6
+
7
+ ## 0.0.16 (2024-10-27)
8
+
9
+ * Add dunder attributes to `multipart` package [#177](https://github.com/Kludex/python-multipart/pull/177).
10
+
3
11
  ## 0.0.15 (2024-10-27)
4
12
 
5
13
  * Replace `FutureWarning` to `PendingDeprecationWarning` [#174](https://github.com/Kludex/python-multipart/pull/174).
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: python-multipart
3
- Version: 0.0.15
3
+ Version: 0.0.17
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/
@@ -0,0 +1,24 @@
1
+ # This only works if using a file system, other loaders not implemented.
2
+
3
+ import importlib.util
4
+ import sys
5
+ import warnings
6
+ from pathlib import Path
7
+
8
+ for p in sys.path:
9
+ file_path = Path(p, "multipart.py")
10
+ try:
11
+ if file_path.is_file():
12
+ spec = importlib.util.spec_from_file_location("multipart", file_path)
13
+ assert spec is not None, f"{file_path} found but not loadable!"
14
+ module = importlib.util.module_from_spec(spec)
15
+ sys.modules["multipart"] = module
16
+ assert spec.loader is not None, f"{file_path} must be loadable!"
17
+ spec.loader.exec_module(module)
18
+ break
19
+ except PermissionError:
20
+ pass
21
+ else:
22
+ warnings.warn("Please use `import python_multipart` instead.", PendingDeprecationWarning, stacklevel=2)
23
+ from python_multipart import *
24
+ from python_multipart import __all__, __author__, __copyright__, __license__, __version__
@@ -68,7 +68,13 @@ Source = "https://github.com/Kludex/python-multipart"
68
68
  path = "python_multipart/__init__.py"
69
69
 
70
70
  [tool.hatch.build.targets.sdist]
71
- include = ["/python_multipart", "/multipart", "/tests", "CHANGELOG.md", "LICENSE.txt"]
71
+ include = [
72
+ "/python_multipart",
73
+ "/multipart",
74
+ "/tests",
75
+ "CHANGELOG.md",
76
+ "LICENSE.txt",
77
+ ]
72
78
 
73
79
  [tool.hatch.build.targets.wheel]
74
80
  packages = ["python_multipart", "multipart"]
@@ -92,6 +98,7 @@ split-on-trailing-comma = false
92
98
 
93
99
  [tool.ruff.lint.per-file-ignores]
94
100
  "multipart/*.py" = ["F403"]
101
+ "__init__.py" = ["F401"]
95
102
 
96
103
  [tool.coverage.run]
97
104
  branch = false
@@ -115,10 +122,4 @@ exclude_lines = [
115
122
  ]
116
123
 
117
124
  [tool.check-sdist]
118
- git-only = [
119
- "docs",
120
- "fuzz",
121
- "scripts",
122
- "mkdocs.yml",
123
- "uv.lock"
124
- ]
125
+ git-only = ["docs", "fuzz", "scripts", "mkdocs.yml", "uv.lock"]
@@ -2,7 +2,7 @@
2
2
  __author__ = "Andrew Dunham"
3
3
  __license__ = "Apache"
4
4
  __copyright__ = "Copyright (c) 2012-2013, Andrew Dunham"
5
- __version__ = "0.0.15"
5
+ __version__ = "0.0.17"
6
6
 
7
7
  from .multipart import (
8
8
  BaseParser,
@@ -1,20 +0,0 @@
1
- # This only works if using a file system, other loaders not implemented.
2
-
3
- import importlib.util
4
- import sys
5
- import warnings
6
- from pathlib import Path
7
-
8
- for p in sys.path:
9
- file_path = Path(p, "multipart.py")
10
- if file_path.is_file():
11
- spec = importlib.util.spec_from_file_location("multipart", file_path)
12
- assert spec is not None, f"{file_path} found but not loadable!"
13
- module = importlib.util.module_from_spec(spec)
14
- sys.modules["multipart"] = module
15
- assert spec.loader is not None, f"{file_path} must be loadable!"
16
- spec.loader.exec_module(module)
17
- break
18
- else:
19
- warnings.warn("Please use `import python_multipart` instead.", PendingDeprecationWarning, stacklevel=2)
20
- from python_multipart import *