marshmallow 3.23.0__tar.gz → 3.23.2__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 (75) hide show
  1. {marshmallow-3.23.0 → marshmallow-3.23.2}/CHANGELOG.rst +19 -0
  2. {marshmallow-3.23.0 → marshmallow-3.23.2}/PKG-INFO +3 -22
  3. {marshmallow-3.23.0 → marshmallow-3.23.2}/README.rst +0 -19
  4. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/conf.py +1 -1
  5. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/index.rst +0 -9
  6. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/install.rst +1 -1
  7. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/upgrading.rst +1 -1
  8. {marshmallow-3.23.0 → marshmallow-3.23.2}/pyproject.toml +2 -2
  9. {marshmallow-3.23.0 → marshmallow-3.23.2}/src/marshmallow/fields.py +19 -13
  10. marshmallow-3.23.0/docs/_static/css/sponsor-message.css +0 -15
  11. {marshmallow-3.23.0 → marshmallow-3.23.2}/CONTRIBUTING.rst +0 -0
  12. {marshmallow-3.23.0 → marshmallow-3.23.2}/LICENSE +0 -0
  13. {marshmallow-3.23.0 → marshmallow-3.23.2}/NOTICE +0 -0
  14. {marshmallow-3.23.0 → marshmallow-3.23.2}/SECURITY.md +0 -0
  15. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/.gitignore +0 -0
  16. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/_static/css/versionwarning.css +0 -0
  17. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/_static/marshmallow-logo.png +0 -0
  18. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/_templates/donate.html +0 -0
  19. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/_templates/useful-links.html +0 -0
  20. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/about.rst.inc +0 -0
  21. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/api_reference.rst +0 -0
  22. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/authors.rst +0 -0
  23. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/changelog.rst +0 -0
  24. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/code_of_conduct.rst +0 -0
  25. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/contributing.rst +0 -0
  26. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/custom_fields.rst +0 -0
  27. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/dashing.json +0 -0
  28. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/ecosystem.rst +0 -0
  29. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/examples.rst +0 -0
  30. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/extending.rst +0 -0
  31. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/kudos.rst +0 -0
  32. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/license.rst +0 -0
  33. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/marshmallow.class_registry.rst +0 -0
  34. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/marshmallow.decorators.rst +0 -0
  35. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/marshmallow.error_store.rst +0 -0
  36. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/marshmallow.exceptions.rst +0 -0
  37. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/marshmallow.fields.rst +0 -0
  38. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/marshmallow.schema.rst +0 -0
  39. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/marshmallow.utils.rst +0 -0
  40. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/marshmallow.validate.rst +0 -0
  41. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/nesting.rst +0 -0
  42. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/quickstart.rst +0 -0
  43. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/whos_using.rst +0 -0
  44. {marshmallow-3.23.0 → marshmallow-3.23.2}/docs/why.rst +0 -0
  45. {marshmallow-3.23.0 → marshmallow-3.23.2}/src/marshmallow/__init__.py +0 -0
  46. {marshmallow-3.23.0 → marshmallow-3.23.2}/src/marshmallow/base.py +0 -0
  47. {marshmallow-3.23.0 → marshmallow-3.23.2}/src/marshmallow/class_registry.py +0 -0
  48. {marshmallow-3.23.0 → marshmallow-3.23.2}/src/marshmallow/decorators.py +0 -0
  49. {marshmallow-3.23.0 → marshmallow-3.23.2}/src/marshmallow/error_store.py +0 -0
  50. {marshmallow-3.23.0 → marshmallow-3.23.2}/src/marshmallow/exceptions.py +0 -0
  51. {marshmallow-3.23.0 → marshmallow-3.23.2}/src/marshmallow/orderedset.py +0 -0
  52. {marshmallow-3.23.0 → marshmallow-3.23.2}/src/marshmallow/py.typed +0 -0
  53. {marshmallow-3.23.0 → marshmallow-3.23.2}/src/marshmallow/schema.py +0 -0
  54. {marshmallow-3.23.0 → marshmallow-3.23.2}/src/marshmallow/types.py +0 -0
  55. {marshmallow-3.23.0 → marshmallow-3.23.2}/src/marshmallow/utils.py +0 -0
  56. {marshmallow-3.23.0 → marshmallow-3.23.2}/src/marshmallow/validate.py +0 -0
  57. {marshmallow-3.23.0 → marshmallow-3.23.2}/src/marshmallow/warnings.py +0 -0
  58. {marshmallow-3.23.0 → marshmallow-3.23.2}/tests/__init__.py +0 -0
  59. {marshmallow-3.23.0 → marshmallow-3.23.2}/tests/base.py +0 -0
  60. {marshmallow-3.23.0 → marshmallow-3.23.2}/tests/conftest.py +0 -0
  61. {marshmallow-3.23.0 → marshmallow-3.23.2}/tests/foo_serializer.py +0 -0
  62. {marshmallow-3.23.0 → marshmallow-3.23.2}/tests/mypy_test_cases/test_validation_error.py +0 -0
  63. {marshmallow-3.23.0 → marshmallow-3.23.2}/tests/test_decorators.py +0 -0
  64. {marshmallow-3.23.0 → marshmallow-3.23.2}/tests/test_deserialization.py +0 -0
  65. {marshmallow-3.23.0 → marshmallow-3.23.2}/tests/test_error_store.py +0 -0
  66. {marshmallow-3.23.0 → marshmallow-3.23.2}/tests/test_exceptions.py +0 -0
  67. {marshmallow-3.23.0 → marshmallow-3.23.2}/tests/test_fields.py +0 -0
  68. {marshmallow-3.23.0 → marshmallow-3.23.2}/tests/test_options.py +0 -0
  69. {marshmallow-3.23.0 → marshmallow-3.23.2}/tests/test_registry.py +0 -0
  70. {marshmallow-3.23.0 → marshmallow-3.23.2}/tests/test_schema.py +0 -0
  71. {marshmallow-3.23.0 → marshmallow-3.23.2}/tests/test_serialization.py +0 -0
  72. {marshmallow-3.23.0 → marshmallow-3.23.2}/tests/test_utils.py +0 -0
  73. {marshmallow-3.23.0 → marshmallow-3.23.2}/tests/test_validate.py +0 -0
  74. {marshmallow-3.23.0 → marshmallow-3.23.2}/tests/test_version_attributes.py +0 -0
  75. {marshmallow-3.23.0 → marshmallow-3.23.2}/tox.ini +0 -0
@@ -1,6 +1,25 @@
1
1
  Changelog
2
2
  ---------
3
3
 
4
+ 3.23.2 (2024-12-18)
5
+ *******************
6
+
7
+ Bug fixes:
8
+
9
+ - Improve type hint formatting for ``Field``, ``Nested``, and ``Function`` fields
10
+ to resolve PyCharm warnings (:issue:`2268`).
11
+ Thanks :user:`Fares-Abubaker` for reporting and fixing.
12
+
13
+
14
+ 3.23.1 (2024-11-01)
15
+ *******************
16
+
17
+ Support:
18
+
19
+ - Document ``absolute`` parameter of ``URL`` field (:pr:`2327`).
20
+ - Documentation: Remove (outdated) minimum Python 3 minor version in
21
+ documentation and README (:pr:`2323`).
22
+
4
23
  3.23.0 (2024-10-17)
5
24
  *******************
6
25
 
@@ -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
 
@@ -22,19 +22,6 @@ marshmallow: simplified object serialization
22
22
 
23
23
  **marshmallow** is an ORM/ODM/framework-agnostic library for converting complex datatypes, such as objects, to and from native Python datatypes.
24
24
 
25
- Sponsor Message
26
- ===============
27
-
28
- 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.
29
-
30
- .. image:: https://github.com/user-attachments/assets/69916225-0d61-4bd7-b3b9-e378557673cb
31
- :target: https://form.typeform.com/to/bShdJw7z
32
- :align: center
33
- :alt: Fern logo
34
-
35
- Example
36
- =======
37
-
38
25
  .. code-block:: python
39
26
 
40
27
  from datetime import date
@@ -77,17 +64,11 @@ Get It Now
77
64
 
78
65
  $ pip install -U marshmallow
79
66
 
80
-
81
67
  Documentation
82
68
  =============
83
69
 
84
70
  Full documentation is available at https://marshmallow.readthedocs.io/ .
85
71
 
86
- Requirements
87
- ============
88
-
89
- - Python >= 3.9
90
-
91
72
  Ecosystem
92
73
  =========
93
74
 
@@ -36,7 +36,7 @@ exclude_patterns = ["_build"]
36
36
  html_theme_path = [alabaster.get_path()]
37
37
  html_theme = "alabaster"
38
38
  html_static_path = ["_static"]
39
- html_css_files = ["css/versionwarning.css", "css/sponsor-message.css"]
39
+ html_css_files = ["css/versionwarning.css"]
40
40
  templates_path = ["_templates"]
41
41
  html_show_sourcelink = False
42
42
 
@@ -6,15 +6,6 @@ marshmallow: simplified object serialization
6
6
 
7
7
  Release v\ |version|. (:doc:`Changelog <changelog>`)
8
8
 
9
- .. admonition:: Sponsor Message
10
-
11
- 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.
12
-
13
- .. image:: https://github.com/user-attachments/assets/69916225-0d61-4bd7-b3b9-e378557673cb
14
- :target: https://form.typeform.com/to/bShdJw7z
15
- :align: center
16
- :alt: Fern logo
17
-
18
9
  .. include:: about.rst.inc
19
10
 
20
11
  Upgrading from an older version?
@@ -3,7 +3,7 @@
3
3
  Installation
4
4
  ============
5
5
 
6
- **marshmallow** requires Python >= 3.8. It has no external dependencies other than the `packaging` library.
6
+ **marshmallow** has no external dependencies other than the `packaging` library.
7
7
 
8
8
  Installing/Upgrading from the PyPI
9
9
  ----------------------------------
@@ -62,7 +62,7 @@ Upgrading to 3.0
62
62
  Python compatibility
63
63
  ********************
64
64
 
65
- The marshmallow 3.x series supports Python >= 3.8.
65
+ The marshmallow 3.x series requires Python 3.
66
66
 
67
67
 
68
68
  Schemas are always strict
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "marshmallow"
3
- version = "3.23.0"
3
+ version = "3.23.2"
4
4
  description = "A lightweight library for converting complex datatypes to and from native Python datatypes."
5
5
  readme = "README.rst"
6
6
  license = { file = "LICENSE" }
@@ -37,7 +37,7 @@ docs = [
37
37
  "sphinx-issues==5.0.0",
38
38
  "alabaster==1.0.0",
39
39
  "sphinx-version-warning==1.1.2",
40
- "autodocsumm==0.2.13",
40
+ "autodocsumm==0.2.14",
41
41
  ]
42
42
  tests = ["pytest", "simplejson"]
43
43
  dev = ["marshmallow[tests]", "tox", "pre-commit>=3.5,<5.0"]
@@ -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,15 +0,0 @@
1
- /* Override alabaster's admonition styling, which we used for sponsored messages */
2
-
3
- div.admonition-sponsor-message p.admonition-title {
4
- font-size: 18px;
5
- font-style: normal;
6
- }
7
-
8
- p.admonition-title::after {
9
- content: "";
10
- }
11
-
12
- div.admonition-sponsor-message p {
13
- font-size: 14px;
14
- font-style: italic;
15
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes