marshmallow 3.23.0__py3-none-any.whl → 3.23.2__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.
marshmallow/fields.py CHANGED
@@ -166,9 +166,9 @@ class Field(FieldABC):
166
166
  data_key: str | None = None,
167
167
  attribute: str | None = None,
168
168
  validate: (
169
- None
170
- | typing.Callable[[typing.Any], typing.Any]
169
+ typing.Callable[[typing.Any], typing.Any]
171
170
  | typing.Iterable[typing.Callable[[typing.Any], typing.Any]]
171
+ | None
172
172
  ) = None,
173
173
  required: bool = False,
174
174
  allow_none: bool | None = None,
@@ -321,8 +321,9 @@ class Field(FieldABC):
321
321
  self,
322
322
  attr: str,
323
323
  obj: typing.Any,
324
- accessor: typing.Callable[[typing.Any, str, typing.Any], typing.Any]
325
- | None = None,
324
+ accessor: (
325
+ typing.Callable[[typing.Any, str, typing.Any], typing.Any] | None
326
+ ) = None,
326
327
  **kwargs,
327
328
  ):
328
329
  """Pulls the value for the given key from the object, applies the
@@ -538,11 +539,15 @@ class Nested(Field):
538
539
 
539
540
  def __init__(
540
541
  self,
541
- nested: SchemaABC
542
- | SchemaMeta
543
- | str
544
- | dict[str, Field | type[Field]]
545
- | typing.Callable[[], SchemaABC | SchemaMeta | dict[str, Field | type[Field]]],
542
+ nested: (
543
+ SchemaABC
544
+ | SchemaMeta
545
+ | str
546
+ | dict[str, Field | type[Field]]
547
+ | typing.Callable[
548
+ [], SchemaABC | SchemaMeta | dict[str, Field | type[Field]]
549
+ ]
550
+ ),
546
551
  *,
547
552
  dump_default: typing.Any = missing_,
548
553
  default: typing.Any = missing_,
@@ -1692,6 +1697,7 @@ class Url(String):
1692
1697
 
1693
1698
  :param default: Default value for the field if the attribute is not set.
1694
1699
  :param relative: Whether to allow relative URLs.
1700
+ :param absolute: Whether to allow absolute URLs.
1695
1701
  :param require_tld: Whether to reject non-FQDN hostnames.
1696
1702
  :param schemes: Valid schemes. By default, ``http``, ``https``,
1697
1703
  ``ftp``, and ``ftps`` are allowed.
@@ -2023,14 +2029,14 @@ class Function(Field):
2023
2029
  def __init__(
2024
2030
  self,
2025
2031
  serialize: (
2026
- None
2027
- | typing.Callable[[typing.Any], typing.Any]
2032
+ typing.Callable[[typing.Any], typing.Any]
2028
2033
  | typing.Callable[[typing.Any, dict], typing.Any]
2034
+ | None
2029
2035
  ) = None,
2030
2036
  deserialize: (
2031
- None
2032
- | typing.Callable[[typing.Any], typing.Any]
2037
+ typing.Callable[[typing.Any], typing.Any]
2033
2038
  | typing.Callable[[typing.Any, dict], typing.Any]
2039
+ | None
2034
2040
  ) = None,
2035
2041
  **kwargs,
2036
2042
  ):
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: marshmallow
3
- Version: 3.23.0
3
+ Version: 3.23.2
4
4
  Summary: A lightweight library for converting complex datatypes to and from native Python datatypes.
5
5
  Author-email: Steven Loria <sloria1@gmail.com>
6
6
  Maintainer-email: Steven Loria <sloria1@gmail.com>, Jérôme Lafréchoux <jerome@jolimont.fr>, Jared Deckard <jared@shademaps.com>
@@ -23,7 +23,7 @@ Requires-Dist: sphinx==8.1.3 ; extra == "docs"
23
23
  Requires-Dist: sphinx-issues==5.0.0 ; extra == "docs"
24
24
  Requires-Dist: alabaster==1.0.0 ; extra == "docs"
25
25
  Requires-Dist: sphinx-version-warning==1.1.2 ; extra == "docs"
26
- Requires-Dist: autodocsumm==0.2.13 ; extra == "docs"
26
+ Requires-Dist: autodocsumm==0.2.14 ; extra == "docs"
27
27
  Requires-Dist: pytest ; extra == "tests"
28
28
  Requires-Dist: simplejson ; extra == "tests"
29
29
  Project-URL: Changelog, https://marshmallow.readthedocs.io/en/latest/changelog.html
@@ -59,19 +59,6 @@ marshmallow: simplified object serialization
59
59
 
60
60
  **marshmallow** is an ORM/ODM/framework-agnostic library for converting complex datatypes, such as objects, to and from native Python datatypes.
61
61
 
62
- Sponsor Message
63
- ===============
64
-
65
- Input an OpenAPI spec to generate API docs that look as good as Stripe's. `Request a preview <https://form.typeform.com/to/bShdJw7z>`_ of your docs on Fern.
66
-
67
- .. image:: https://github.com/user-attachments/assets/69916225-0d61-4bd7-b3b9-e378557673cb
68
- :target: https://form.typeform.com/to/bShdJw7z
69
- :align: center
70
- :alt: Fern logo
71
-
72
- Example
73
- =======
74
-
75
62
  .. code-block:: python
76
63
 
77
64
  from datetime import date
@@ -114,17 +101,11 @@ Get It Now
114
101
 
115
102
  $ pip install -U marshmallow
116
103
 
117
-
118
104
  Documentation
119
105
  =============
120
106
 
121
107
  Full documentation is available at https://marshmallow.readthedocs.io/ .
122
108
 
123
- Requirements
124
- ============
125
-
126
- - Python >= 3.9
127
-
128
109
  Ecosystem
129
110
  =========
130
111
 
@@ -4,7 +4,7 @@ marshmallow/class_registry.py,sha256=kT_kv9KT0EUclIluLD5734ms9P0e65t5aky8y3lipFI
4
4
  marshmallow/decorators.py,sha256=vmQFgBgdV0s1Fw8ySyZyQKvjKBTNf5JB3SCldEIl29o,8385
5
5
  marshmallow/error_store.py,sha256=A7AxgLMw9ffSmaxRH4x3wcBWibx-DuGH4LwSDpVn50I,2223
6
6
  marshmallow/exceptions.py,sha256=DuARdOcirCdJxmlp16V97hQKAXOokvdW12jXtYOlGyk,2326
7
- marshmallow/fields.py,sha256=6Cit4Z6AE_HDQBvspibHR8UgtwBkp_oNRaCIqjPR64s,73114
7
+ marshmallow/fields.py,sha256=MqrL2FplcXd6ZF5QhfAwawcDzy2NqcFFw2vGSd6pQOc,73253
8
8
  marshmallow/orderedset.py,sha256=C2aAG6w1faIL1phinbAltbe3AUAnF5MN6n7fzESNDhI,2922
9
9
  marshmallow/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  marshmallow/schema.py,sha256=C4BsYkDBQbdgDA6w39oSqVlsDx4NfbkT_XtSIKcqxIo,48812
@@ -12,7 +12,7 @@ marshmallow/types.py,sha256=RDS4IfasIehvH2rGWh9e4RTBtsMp-JFFtjApajV22zc,283
12
12
  marshmallow/utils.py,sha256=sWciesZ6tS08uX9Z9fzu2lbuut5eh8TKABU-TwgqSms,11886
13
13
  marshmallow/validate.py,sha256=hS7fYC6byDHK9A7A4is0McDMZEzu6GkKke-7unLt2hE,23857
14
14
  marshmallow/warnings.py,sha256=vHQu7AluuWqLhvlw5noXtWWbya13zDXY6JMaVSUzmDs,65
15
- marshmallow-3.23.0.dist-info/LICENSE,sha256=kGtdkFHkJhRMsXOtkRZnuOvQWpxYTCwmwTWzKj7RIAE,1064
16
- marshmallow-3.23.0.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
17
- marshmallow-3.23.0.dist-info/METADATA,sha256=kKdIlUdvaVt3ZOQbuGFgfX65m2Yv8FrmPt3766XiBmU,7582
18
- marshmallow-3.23.0.dist-info/RECORD,,
15
+ marshmallow-3.23.2.dist-info/LICENSE,sha256=kGtdkFHkJhRMsXOtkRZnuOvQWpxYTCwmwTWzKj7RIAE,1064
16
+ marshmallow-3.23.2.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
17
+ marshmallow-3.23.2.dist-info/METADATA,sha256=TlOpI469OQ6idWY74rjfgWR_xKzZPANdBN5wyB9J6bY,7147
18
+ marshmallow-3.23.2.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: flit 3.9.0
2
+ Generator: flit 3.10.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any