starmallow 0.5.0__py3-none-any.whl → 0.5.1__py3-none-any.whl

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.
starmallow/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = "0.5.0"
1
+ __version__ = "0.5.1"
2
2
 
3
3
  from .applications import StarMallow
4
4
  from .exceptions import RequestValidationError
starmallow/params.py CHANGED
@@ -159,6 +159,7 @@ class Header(Param):
159
159
  title=title,
160
160
  )
161
161
 
162
+
162
163
  class Cookie(Param):
163
164
  in_ = ParamType.cookie
164
165
 
starmallow/utils.py CHANGED
@@ -9,7 +9,7 @@ from contextlib import AsyncExitStack, asynccontextmanager, contextmanager
9
9
  from dataclasses import is_dataclass
10
10
  from decimal import Decimal
11
11
  from enum import Enum
12
- from types import NoneType
12
+ from types import NoneType, UnionType
13
13
  from typing import (
14
14
  TYPE_CHECKING,
15
15
  Any,
@@ -191,7 +191,7 @@ def is_body_allowed_for_status_code(status_code: int | str | None) -> bool:
191
191
 
192
192
 
193
193
  def is_optional(field):
194
- return get_origin(field) is Union and type(None) in get_args(field)
194
+ return get_origin(field) in (Union, UnionType) and type(None) in get_args(field)
195
195
 
196
196
 
197
197
  def get_path_param_names(path: str) -> Set[str]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: starmallow
3
- Version: 0.5.0
3
+ Version: 0.5.1
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>
@@ -1,4 +1,4 @@
1
- starmallow/__init__.py,sha256=01Y6juyLnOP83a39nE_mBYK-sEnBIX2SceZ_W32qY9w,322
1
+ starmallow/__init__.py,sha256=bazGj9TH8fId8pbGpljym-YfomnpPBSyM_RWlxhCitg,322
2
2
  starmallow/applications.py,sha256=mSL4YDozP8n6v22g4NX7EAMXmGhzzhtjtZd68YHcFvw,31720
3
3
  starmallow/concurrency.py,sha256=MVRjo4Vqss_yqhaoeVt3xb7rLaSuAq_q9uYgTwbsojE,1375
4
4
  starmallow/constants.py,sha256=u0h8cJKhJY0oIZqzr7wpEZG2bPLrw5FroMnn3d8KBNQ,129
@@ -12,7 +12,7 @@ starmallow/endpoints.py,sha256=UrwVZCxbmWI20iNtJ0oXxo4d3-y12TjsOGs_jnStTiU,939
12
12
  starmallow/exception_handlers.py,sha256=gr2qLYWEtsIEH28n7OreEiiLVz6Y7b6osRyS9esJbBk,891
13
13
  starmallow/exceptions.py,sha256=vabtPJkTmtCdC8_2OPBE8Osz0v0KxaSOX6IWf1jgNkc,872
14
14
  starmallow/fields.py,sha256=arrTabCYoJFZcoY69EZTBH3YUg7CUSr3-zYLiAjYLTM,1238
15
- starmallow/params.py,sha256=-f6ut1p_w_I8lyEgRciJxUtHmoVXKAD2Ug4KuRjPlJA,8661
15
+ starmallow/params.py,sha256=MJzUzUs6GEyrbpDZ1r8To8vR-QwpopdxDStq802o5Ug,8662
16
16
  starmallow/request_resolver.py,sha256=kT7B0BWSqBP_9Jl865Ya_Op9I3W4FyfBxXjvtucWT_0,10785
17
17
  starmallow/requests.py,sha256=o_yNhH9WJ35uAGuoXa5_gihevHeaveOvkP525dbwQSU,843
18
18
  starmallow/responses.py,sha256=k2pf_m21ykf_FECdODUz400pMucMJJf_Zm8TXFujvaU,2012
@@ -20,7 +20,7 @@ starmallow/routing.py,sha256=Uxnlkl4eIs56TZ8VAgNmlh-K89ku1Xu_ROR5S8x-rkg,45128
20
20
  starmallow/schema_generator.py,sha256=BKtXVQoNFWoAIEtiRNylWls_7nyFIshy3_myooogjoI,17806
21
21
  starmallow/serializers.py,sha256=rBEKMNgONgz_bai12uDvAEMCI_aEFGsqMSeIoWtlrOI,12514
22
22
  starmallow/types.py,sha256=8GXWjvzXQhF5NMHf14fbid6uErxVd1Xk_w2I4FoUgZ4,717
23
- starmallow/utils.py,sha256=AkVesTbYnshaXZqdgpc09TpZF07LIUeCOwOlvCaQrAI,11412
23
+ starmallow/utils.py,sha256=Ab6F2yOiy65gVGC2C4mNyKiPTPdsRyH5eVAv7Q_dGbw,11436
24
24
  starmallow/websockets.py,sha256=yIz3LzTBMNclpEoG7oTMbQwxbcdKNU6M8XcqZMyBTuA,2223
25
25
  starmallow/ext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
26
  starmallow/ext/marshmallow/__init__.py,sha256=33jENGdfPq4-CDG0LOmN3KOGW1pXTy7a2oMwy4hrYzM,208
@@ -34,7 +34,7 @@ starmallow/security/http.py,sha256=cpGjM1kFDq3i_bOY96kMkf4cspBUxFkkET9lTK3NA-0,6
34
34
  starmallow/security/oauth2.py,sha256=1nv1580PY4cwgu5gzpQCf2MfMNv2Cfv05753AUHPOhQ,10005
35
35
  starmallow/security/open_id_connect_url.py,sha256=IPsL2YzWc2mPwJbrUn6oFRTi7uRAG6mR62CGwmzBs1k,1399
36
36
  starmallow/security/utils.py,sha256=bd8T0YM7UQD5ATKucr1bNtAvz_Y3__dVNAv5UebiPvc,293
37
- starmallow-0.5.0.dist-info/METADATA,sha256=M7Y6uK8nmKdGATGmuX96mPkyvlAlww0xnASnYcddDkE,5651
38
- starmallow-0.5.0.dist-info/WHEEL,sha256=y1bSCq4r5i4nMmpXeUJMqs3ipKvkZObrIXSvJHm1qCI,87
39
- starmallow-0.5.0.dist-info/licenses/LICENSE.md,sha256=QelyGgOzch8CXzy6HrYwHh7nmj0rlWkDA0YzmZ3CPaY,1084
40
- starmallow-0.5.0.dist-info/RECORD,,
37
+ starmallow-0.5.1.dist-info/METADATA,sha256=bg0HNEKMvq6nDZyRW8MOILAsTtXmOmzWwaFM2q2J3cE,5651
38
+ starmallow-0.5.1.dist-info/WHEEL,sha256=y1bSCq4r5i4nMmpXeUJMqs3ipKvkZObrIXSvJHm1qCI,87
39
+ starmallow-0.5.1.dist-info/licenses/LICENSE.md,sha256=QelyGgOzch8CXzy6HrYwHh7nmj0rlWkDA0YzmZ3CPaY,1084
40
+ starmallow-0.5.1.dist-info/RECORD,,