starmallow 0.9.2__tar.gz → 0.9.4__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 (120) hide show
  1. {starmallow-0.9.2 → starmallow-0.9.4}/PKG-INFO +2 -2
  2. {starmallow-0.9.2 → starmallow-0.9.4}/pyproject.toml +6 -7
  3. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/__init__.py +1 -1
  4. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/endpoint.py +6 -6
  5. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/request_resolver.py +1 -1
  6. {starmallow-0.9.2 → starmallow-0.9.4}/uv.lock +7 -4
  7. {starmallow-0.9.2 → starmallow-0.9.4}/.editorconfig +0 -0
  8. {starmallow-0.9.2 → starmallow-0.9.4}/.gitignore +0 -0
  9. {starmallow-0.9.2 → starmallow-0.9.4}/.pre-commit-config.yaml +0 -0
  10. {starmallow-0.9.2 → starmallow-0.9.4}/Dockerfile +0 -0
  11. {starmallow-0.9.2 → starmallow-0.9.4}/LICENSE.md +0 -0
  12. {starmallow-0.9.2 → starmallow-0.9.4}/README.md +0 -0
  13. {starmallow-0.9.2 → starmallow-0.9.4}/docker-compose.yml +0 -0
  14. {starmallow-0.9.2 → starmallow-0.9.4}/docs/design_ideas.md +0 -0
  15. {starmallow-0.9.2 → starmallow-0.9.4}/examples/__init__.py +0 -0
  16. {starmallow-0.9.2 → starmallow-0.9.4}/examples/cache_server.py +0 -0
  17. {starmallow-0.9.2 → starmallow-0.9.4}/examples/flask_server.py +0 -0
  18. {starmallow-0.9.2 → starmallow-0.9.4}/examples/goals.ipynb +0 -0
  19. {starmallow-0.9.2 → starmallow-0.9.4}/examples/gunicorn.py +0 -0
  20. {starmallow-0.9.2 → starmallow-0.9.4}/examples/recommended_server.py +0 -0
  21. {starmallow-0.9.2 → starmallow-0.9.4}/examples/sample_server.py +0 -0
  22. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/applications.py +0 -0
  23. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/background.py +0 -0
  24. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/concurrency.py +0 -0
  25. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/constants.py +0 -0
  26. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/dataclasses.py +0 -0
  27. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/datastructures.py +0 -0
  28. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/decorators.py +0 -0
  29. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/delimited_field.py +0 -0
  30. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/docs.py +0 -0
  31. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/endpoints.py +0 -0
  32. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/exception_handlers.py +0 -0
  33. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/exceptions.py +0 -0
  34. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/ext/__init__.py +0 -0
  35. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/ext/marshmallow/__init__.py +0 -0
  36. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/ext/marshmallow/openapi.py +0 -0
  37. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/fields.py +0 -0
  38. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/generics.py +0 -0
  39. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/middleware/__init__.py +0 -0
  40. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/middleware/asyncexitstack.py +0 -0
  41. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/params.py +0 -0
  42. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/py.typed +0 -0
  43. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/requests.py +0 -0
  44. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/responses.py +0 -0
  45. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/routing.py +0 -0
  46. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/schema_generator.py +0 -0
  47. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/security/__init__.py +0 -0
  48. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/security/api_key.py +0 -0
  49. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/security/base.py +0 -0
  50. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/security/http.py +0 -0
  51. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/security/oauth2.py +0 -0
  52. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/security/open_id_connect_url.py +0 -0
  53. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/security/utils.py +0 -0
  54. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/serializers.py +0 -0
  55. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/types.py +0 -0
  56. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/utils.py +0 -0
  57. {starmallow-0.9.2 → starmallow-0.9.4}/starmallow/websockets.py +0 -0
  58. {starmallow-0.9.2 → starmallow-0.9.4}/tests/__init__.py +0 -0
  59. {starmallow-0.9.2 → starmallow-0.9.4}/tests/basic_api.py +0 -0
  60. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/__init__.py +0 -0
  61. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/api_key/__init__.py +0 -0
  62. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/api_key/test_api_key_cookie.py +0 -0
  63. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/api_key/test_api_key_cookie_description.py +0 -0
  64. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/api_key/test_api_key_cookie_optional.py +0 -0
  65. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/api_key/test_api_key_header.py +0 -0
  66. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/api_key/test_api_key_header_description.py +0 -0
  67. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/api_key/test_api_key_header_optional.py +0 -0
  68. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/api_key/test_api_key_query.py +0 -0
  69. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/api_key/test_api_key_query_description.py +0 -0
  70. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/api_key/test_api_key_query_optional.py +0 -0
  71. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/http/__init__.py +0 -0
  72. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/http/test_http_base.py +0 -0
  73. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/http/test_http_base_description.py +0 -0
  74. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/http/test_http_base_optional.py +0 -0
  75. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/http/test_http_basic.py +0 -0
  76. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/http/test_http_basic_realm.py +0 -0
  77. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/http/test_http_basic_realm_description.py +0 -0
  78. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/http/test_http_bearer.py +0 -0
  79. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/http/test_http_bearer_description.py +0 -0
  80. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/http/test_http_bearer_optional.py +0 -0
  81. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/http/test_http_digest.py +0 -0
  82. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/http/test_http_digest_description.py +0 -0
  83. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/http/test_http_digest_optional.py +0 -0
  84. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/oauth2/__init__.py +0 -0
  85. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/oauth2/test_oauth2.py +0 -0
  86. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/oauth2/test_oauth2_authorization_code_bearer.py +0 -0
  87. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/oauth2/test_oauth2_authorization_code_bearer_description.py +0 -0
  88. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/oauth2/test_oauth2_optional.py +0 -0
  89. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/oauth2/test_oauth2_optional_description.py +0 -0
  90. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/oauth2/test_oauth2_password_bearer_optional.py +0 -0
  91. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/oauth2/test_oauth2_password_bearer_optional_description.py +0 -0
  92. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/openid_connect/__init__.py +0 -0
  93. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/openid_connect/test_openid_connect.py +0 -0
  94. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/openid_connect/test_openid_connect_description.py +0 -0
  95. {starmallow-0.9.2 → starmallow-0.9.4}/tests/security/openid_connect/test_openid_connect_optional.py +0 -0
  96. {starmallow-0.9.2 → starmallow-0.9.4}/tests/test_additional_properties.py +0 -0
  97. {starmallow-0.9.2 → starmallow-0.9.4}/tests/test_additional_response_extra.py +0 -0
  98. {starmallow-0.9.2 → starmallow-0.9.4}/tests/test_additional_responses_bad.py +0 -0
  99. {starmallow-0.9.2 → starmallow-0.9.4}/tests/test_additional_responses_custom_model_in_callback.py +0 -0
  100. {starmallow-0.9.2 → starmallow-0.9.4}/tests/test_additional_responses_custom_validationerror.py +0 -0
  101. {starmallow-0.9.2 → starmallow-0.9.4}/tests/test_additional_responses_default_validationerror.py +0 -0
  102. {starmallow-0.9.2 → starmallow-0.9.4}/tests/test_additional_responses_response_class.py +0 -0
  103. {starmallow-0.9.2 → starmallow-0.9.4}/tests/test_additional_responses_router.py +0 -0
  104. {starmallow-0.9.2 → starmallow-0.9.4}/tests/test_annotated.py +0 -0
  105. {starmallow-0.9.2 → starmallow-0.9.4}/tests/test_basic_api.py +0 -0
  106. {starmallow-0.9.2 → starmallow-0.9.4}/tests/test_dataclass_fields.py +0 -0
  107. {starmallow-0.9.2 → starmallow-0.9.4}/tests/test_delimited_params.py +0 -0
  108. {starmallow-0.9.2 → starmallow-0.9.4}/tests/test_generics.py +0 -0
  109. {starmallow-0.9.2 → starmallow-0.9.4}/tests/test_http_endpoints.py +0 -0
  110. {starmallow-0.9.2 → starmallow-0.9.4}/tests/test_input.py +0 -0
  111. {starmallow-0.9.2 → starmallow-0.9.4}/tests/test_middleware.py +0 -0
  112. {starmallow-0.9.2 → starmallow-0.9.4}/tests/test_requests_orjson.py +0 -0
  113. {starmallow-0.9.2 → starmallow-0.9.4}/tests/test_requests_ujson.py +0 -0
  114. {starmallow-0.9.2 → starmallow-0.9.4}/tests/test_resolved_param_contextmanagers.py +0 -0
  115. {starmallow-0.9.2 → starmallow-0.9.4}/tests/test_resolved_params.py +0 -0
  116. {starmallow-0.9.2 → starmallow-0.9.4}/tests/test_responses.py +0 -0
  117. {starmallow-0.9.2 → starmallow-0.9.4}/tests/test_responses_orjson.py +0 -0
  118. {starmallow-0.9.2 → starmallow-0.9.4}/tests/test_responses_ujson.py +0 -0
  119. {starmallow-0.9.2 → starmallow-0.9.4}/tests/test_ws_router.py +0 -0
  120. {starmallow-0.9.2 → starmallow-0.9.4}/tests/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: starmallow
3
- Version: 0.9.2
3
+ Version: 0.9.4
4
4
  Summary: StarMallow framework
5
5
  Project-URL: Homepage, https://github.com/mvanderlee/starmallow
6
6
  Author-email: Michiel Vanderlee <jmt.vanderlee@gmail.com>
@@ -31,7 +31,7 @@ Requires-Python: >=3.11
31
31
  Requires-Dist: apispec[marshmallow]<7,>=6
32
32
  Requires-Dist: dpath<3,>=2.1.0
33
33
  Requires-Dist: marshmallow-dataclass2<9,>=8.8.1
34
- Requires-Dist: marshmallow>=3.18.0
34
+ Requires-Dist: marshmallow<4,>=3.18.0
35
35
  Requires-Dist: python-multipart>=0.0.20
36
36
  Requires-Dist: pyyaml>=5.4.1
37
37
  Requires-Dist: starlette>=0.46
@@ -38,7 +38,7 @@ classifiers = [
38
38
  dependencies = [
39
39
  "apispec[marshmallow] >=6,<7",
40
40
  "dpath >=2.1.0,<3",
41
- "marshmallow >=3.18.0",
41
+ "marshmallow >=3.18.0,<4",
42
42
  "marshmallow-dataclass2 >=8.8.1,<9",
43
43
  "python-multipart >=0.0.20",
44
44
  "pyyaml >=5.4.1",
@@ -87,11 +87,11 @@ source = [
87
87
  ]
88
88
 
89
89
  [tool.ruff]
90
- exclude = [
90
+ lint.exclude = [
91
91
  "*.ipynb",
92
92
  "examples/**/*.py",
93
93
  ]
94
- select = [
94
+ lint.select = [
95
95
  "E", # pycodestyle errors
96
96
  "W", # pycodestyle warnings
97
97
  "F", # pyflakes
@@ -111,7 +111,7 @@ select = [
111
111
  "T20", # flake8-print
112
112
  "PT", # flake8-pytest-style
113
113
  ]
114
- ignore = [
114
+ lint.ignore = [
115
115
  "B008", # do not perform function calls in argument defaults
116
116
  "B028", # No explicit stacklevel argument found.
117
117
  "C901", # too complex
@@ -140,9 +140,8 @@ extend-immutable-calls = [
140
140
  venvPath = "."
141
141
  venv = ".venv"
142
142
 
143
- exclude = [
144
- "examples/**/*.py",
145
- "tests/**/*.py",
143
+ include = [
144
+ "starmallow",
146
145
  ]
147
146
 
148
147
  pythonVersion = "3.11"
@@ -1,4 +1,4 @@
1
- __version__ = "0.9.2"
1
+ __version__ = "0.9.4"
2
2
 
3
3
  from .applications import StarMallow as StarMallow
4
4
  from .exceptions import RequestValidationError as RequestValidationError
@@ -1,6 +1,6 @@
1
1
  import inspect
2
2
  import logging
3
- from collections.abc import Callable, Mapping, Sequence
3
+ from collections.abc import Callable, Iterable, Mapping, Sequence
4
4
  from dataclasses import dataclass, field
5
5
  from typing import (
6
6
  TYPE_CHECKING,
@@ -15,8 +15,8 @@ from typing import (
15
15
  import marshmallow as ma
16
16
  import marshmallow.fields as mf
17
17
  import typing_inspect
18
- from marshmallow.constants import missing as missing_
19
- from marshmallow.types import StrSequenceOrSet, UnknownOption
18
+ from marshmallow.types import StrSequenceOrSet
19
+ from marshmallow.utils import missing as missing_
20
20
  from marshmallow_dataclass2 import class_schema, is_generic_alias_of_dataclass
21
21
  from starlette.background import BackgroundTasks
22
22
  from starlette.requests import HTTPConnection, Request
@@ -159,11 +159,11 @@ class SchemaModel(ma.Schema):
159
159
 
160
160
  def load(
161
161
  self,
162
- data: Mapping[str, Any] | Sequence[Mapping[str, Any]],
162
+ data: Mapping[str, Any] | Iterable[Mapping[str, Any]],
163
163
  *,
164
164
  many: bool | None = None,
165
165
  partial: bool | StrSequenceOrSet | None = None,
166
- unknown: UnknownOption | None = None,
166
+ unknown: str | None = None,
167
167
  ) -> Any:
168
168
  if not data and self.load_default:
169
169
  return self.load_default
@@ -242,7 +242,7 @@ class EndpointMixin:
242
242
  model = class_schema(model) # type: ignore
243
243
 
244
244
  mmf = getattr(model, '_marshmallow_field', None)
245
- if isinstance(model, NewType) and mmf and issubclass(mmf, mf.Field):
245
+ if isinstance(model, NewType) and mmf and lenient_issubclass(mmf, mf.Field):
246
246
  return mmf(**kwargs)
247
247
  elif is_marshmallow_schema(model):
248
248
  return SchemaModel(model() if inspect.isclass(model) else model, **kwargs)
@@ -7,9 +7,9 @@ from typing import Any, cast
7
7
 
8
8
  import marshmallow as ma
9
9
  import marshmallow.fields as mf
10
- from marshmallow.constants import missing as missing_
11
10
  from marshmallow.error_store import ErrorStore
12
11
  from marshmallow.exceptions import SCHEMA
12
+ from marshmallow.utils import missing as missing_
13
13
  from starlette.background import BackgroundTasks as StarletteBackgroundTasks
14
14
  from starlette.datastructures import FormData, Headers, QueryParams
15
15
  from starlette.exceptions import HTTPException
@@ -477,11 +477,14 @@ wheels = [
477
477
 
478
478
  [[package]]
479
479
  name = "marshmallow"
480
- version = "4.0.0"
480
+ version = "3.26.1"
481
481
  source = { registry = "https://pypi.org/simple" }
482
- sdist = { url = "https://files.pythonhosted.org/packages/1e/ff/26df5a9f5ac57ccf693a5854916ab47243039d2aa9e0fe5f5a0331e7b74b/marshmallow-4.0.0.tar.gz", hash = "sha256:3b6e80aac299a7935cfb97ed01d1854fb90b5079430969af92118ea1b12a8d55", size = 220507 }
482
+ dependencies = [
483
+ { name = "packaging" },
484
+ ]
485
+ sdist = { url = "https://files.pythonhosted.org/packages/ab/5e/5e53d26b42ab75491cda89b871dab9e97c840bf12c63ec58a1919710cd06/marshmallow-3.26.1.tar.gz", hash = "sha256:e6d8affb6cb61d39d26402096dc0aee12d5a26d490a121f118d2e81dc0719dc6", size = 221825 }
483
486
  wheels = [
484
- { url = "https://files.pythonhosted.org/packages/d6/26/6cc45d156f44dbe1d5696d9e54042e4dcaf7b946c0b86df6a97d29706f32/marshmallow-4.0.0-py3-none-any.whl", hash = "sha256:e7b0528337e9990fd64950f8a6b3a1baabed09ad17a0dfb844d701151f92d203", size = 48420 },
487
+ { url = "https://files.pythonhosted.org/packages/34/75/51952c7b2d3873b44a0028b1bd26a25078c18f92f256608e8d1dc61b39fd/marshmallow-3.26.1-py3-none-any.whl", hash = "sha256:3350409f20a70a7e4e11a27661187b77cdcaeb20abca41c1454fe33636bea09c", size = 50878 },
485
488
  ]
486
489
 
487
490
  [[package]]
@@ -905,7 +908,7 @@ requires-dist = [
905
908
  { name = "dpath", specifier = ">=2.1.0,<3" },
906
909
  { name = "hatch", marker = "extra == 'publish'", specifier = ">=1.7.0" },
907
910
  { name = "httpx", marker = "extra == 'test'", specifier = ">=0.22.0" },
908
- { name = "marshmallow", specifier = ">=3.18.0" },
911
+ { name = "marshmallow", specifier = ">=3.18.0,<4" },
909
912
  { name = "marshmallow-dataclass2", specifier = ">=8.8.1,<9" },
910
913
  { name = "mypy", marker = "extra == 'test'", specifier = ">=1.1.1,<2" },
911
914
  { name = "orjson", marker = "extra == 'all'" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes