flask-marshmallow 1.3.0__tar.gz → 1.4.0__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 (39) hide show
  1. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/CHANGELOG.rst +11 -0
  2. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/PKG-INFO +9 -8
  3. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/pyproject.toml +7 -7
  4. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/src/flask_marshmallow/__init__.py +8 -2
  5. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/src/flask_marshmallow/fields.py +1 -1
  6. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/src/flask_marshmallow/validate.py +1 -1
  7. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/tests/test_validate.py +1 -1
  8. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/tox.ini +9 -9
  9. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/CONTRIBUTING.rst +0 -0
  10. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/LICENSE +0 -0
  11. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/README.rst +0 -0
  12. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/docs/Makefile +0 -0
  13. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/docs/_static/logo.png +0 -0
  14. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/docs/_templates/side-primary.html +0 -0
  15. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/docs/_templates/side-secondary.html +0 -0
  16. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/docs/_themes/LICENSE +0 -0
  17. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/docs/_themes/README +0 -0
  18. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/docs/_themes/flask/layout.html +0 -0
  19. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/docs/_themes/flask/relations.html +0 -0
  20. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/docs/_themes/flask/static/flasky.css_t +0 -0
  21. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/docs/_themes/flask/theme.conf +0 -0
  22. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/docs/_themes/flask_small/layout.html +0 -0
  23. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/docs/_themes/flask_small/static/flasky.css_t +0 -0
  24. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/docs/_themes/flask_small/theme.conf +0 -0
  25. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/docs/_themes/flask_theme_support.py +0 -0
  26. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/docs/changelog.rst +0 -0
  27. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/docs/conf.py +0 -0
  28. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/docs/index.rst +0 -0
  29. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/docs/license.rst +0 -0
  30. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/docs/make.bat +0 -0
  31. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/src/flask_marshmallow/py.typed +0 -0
  32. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/src/flask_marshmallow/schema.py +0 -0
  33. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/src/flask_marshmallow/sqla.py +0 -0
  34. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/tests/__init__.py +0 -0
  35. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/tests/conftest.py +0 -0
  36. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/tests/test_core.py +0 -0
  37. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/tests/test_fields.py +0 -0
  38. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/tests/test_io.py +0 -0
  39. {flask_marshmallow-1.3.0 → flask_marshmallow-1.4.0}/tests/test_sqla.py +0 -0
@@ -1,6 +1,17 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ 1.4.0 (2026-02-04)
5
+ ******************
6
+
7
+ Bug fixes:
8
+
9
+ * Add missing commas in error message for ``validate.FileType`` (:pr:`374`).
10
+
11
+ Support:
12
+
13
+ * Support Python 3.10-3.14 (:pr:`376`).
14
+
4
15
  1.3.0 (2025-01-06)
5
16
  ******************
6
17
 
@@ -1,29 +1,30 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: flask-marshmallow
3
- Version: 1.3.0
3
+ Version: 1.4.0
4
4
  Summary: Flask + marshmallow for beautiful APIs
5
- Maintainer-email: Steven Loria <sloria1@gmail.com>, Stephen Rosen <sirosen0@gmail.com>
6
- Requires-Python: >=3.9
5
+ Maintainer-email: Steven Loria <oss@stevenloria.com>, Stephen Rosen <sirosen0@gmail.com>
6
+ Requires-Python: >=3.10
7
7
  Description-Content-Type: text/x-rst
8
8
  Classifier: Environment :: Web Environment
9
9
  Classifier: Intended Audience :: Developers
10
10
  Classifier: License :: OSI Approved :: MIT License
11
11
  Classifier: Natural Language :: English
12
12
  Classifier: Programming Language :: Python :: 3
13
- Classifier: Programming Language :: Python :: 3.9
14
13
  Classifier: Programming Language :: Python :: 3.10
15
14
  Classifier: Programming Language :: Python :: 3.11
16
15
  Classifier: Programming Language :: Python :: 3.12
17
16
  Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
18
18
  Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
19
+ License-File: LICENSE
19
20
  Requires-Dist: Flask>=2.2
20
21
  Requires-Dist: marshmallow>=3.0.0
21
22
  Requires-Dist: flask-marshmallow[tests] ; extra == "dev"
22
23
  Requires-Dist: tox ; extra == "dev"
23
- Requires-Dist: pre-commit>=3.5,<5.0 ; extra == "dev"
24
+ Requires-Dist: pre-commit>=4.5,<5.0 ; extra == "dev"
24
25
  Requires-Dist: marshmallow-sqlalchemy>=0.19.0 ; extra == "docs"
25
- Requires-Dist: Sphinx==8.1.3 ; extra == "docs"
26
- Requires-Dist: sphinx-issues==5.0.0 ; extra == "docs"
26
+ Requires-Dist: Sphinx==9.1.0 ; extra == "docs"
27
+ Requires-Dist: sphinx-issues==5.0.1 ; extra == "docs"
27
28
  Requires-Dist: flask-sqlalchemy>=3.0.0 ; extra == "sqlalchemy"
28
29
  Requires-Dist: marshmallow-sqlalchemy>=0.29.0 ; extra == "sqlalchemy"
29
30
  Requires-Dist: flask-marshmallow[sqlalchemy] ; extra == "tests"
@@ -1,11 +1,11 @@
1
1
  [project]
2
2
  name = "flask-marshmallow"
3
- version = "1.3.0"
3
+ version = "1.4.0"
4
4
  description = "Flask + marshmallow for beautiful APIs"
5
5
  readme = "README.rst"
6
6
  license = { file = "LICENSE" }
7
7
  maintainers = [
8
- { name = "Steven Loria", email = "sloria1@gmail.com" },
8
+ { name = "Steven Loria", email = "oss@stevenloria.com" },
9
9
  { name = "Stephen Rosen", email = "sirosen0@gmail.com" },
10
10
  ]
11
11
  classifiers = [
@@ -14,14 +14,14 @@ classifiers = [
14
14
  "License :: OSI Approved :: MIT License",
15
15
  "Natural Language :: English",
16
16
  "Programming Language :: Python :: 3",
17
- "Programming Language :: Python :: 3.9",
18
17
  "Programming Language :: Python :: 3.10",
19
18
  "Programming Language :: Python :: 3.11",
20
19
  "Programming Language :: Python :: 3.12",
21
20
  "Programming Language :: Python :: 3.13",
21
+ "Programming Language :: Python :: 3.14",
22
22
  "Topic :: Internet :: WWW/HTTP :: Dynamic Content",
23
23
  ]
24
- requires-python = ">=3.9"
24
+ requires-python = ">=3.10"
25
25
  dependencies = ["Flask>=2.2", "marshmallow>=3.0.0"]
26
26
 
27
27
  [project.urls]
@@ -31,11 +31,11 @@ Funding = "https://opencollective.com/marshmallow"
31
31
  [project.optional-dependencies]
32
32
  docs = [
33
33
  "marshmallow-sqlalchemy>=0.19.0",
34
- "Sphinx==8.1.3",
35
- "sphinx-issues==5.0.0",
34
+ "Sphinx==9.1.0",
35
+ "sphinx-issues==5.0.1",
36
36
  ]
37
37
  tests = ["flask-marshmallow[sqlalchemy]", "pytest"]
38
- dev = ["flask-marshmallow[tests]", "tox", "pre-commit>=3.5,<5.0"]
38
+ dev = ["flask-marshmallow[tests]", "tox", "pre-commit>=4.5,<5.0"]
39
39
  sqlalchemy = ["flask-sqlalchemy>=3.0.0", "marshmallow-sqlalchemy>=0.29.0"]
40
40
 
41
41
  [build-system]
@@ -134,6 +134,12 @@ class Marshmallow:
134
134
  # If using Flask-SQLAlchemy, attach db.session to SQLAlchemySchema
135
135
  if has_sqla and "sqlalchemy" in app.extensions:
136
136
  db = app.extensions["sqlalchemy"]
137
- self.SQLAlchemySchema.OPTIONS_CLASS.session = db.session
138
- self.SQLAlchemyAutoSchema.OPTIONS_CLASS.session = db.session
137
+ SQLAlchemySchemaOpts = typing.cast(
138
+ sqla.SQLAlchemySchemaOpts, self.SQLAlchemySchema.OPTIONS_CLASS
139
+ )
140
+ SQLAlchemySchemaOpts.session = db.session
141
+ SQLAlchemyAutoSchemaOpts = typing.cast(
142
+ sqla.SQLAlchemyAutoSchemaOpts, self.SQLAlchemySchema.OPTIONS_CLASS
143
+ )
144
+ SQLAlchemyAutoSchemaOpts.session = db.session
139
145
  app.extensions[EXTENSION_NAME] = self
@@ -119,7 +119,7 @@ class URLFor(fields.Field):
119
119
  param_values[name] = attribute_value
120
120
  else:
121
121
  raise AttributeError(
122
- f"{attr_name!r} is not a valid " f"attribute of {obj!r}"
122
+ f"{attr_name!r} is not a valid attribute of {obj!r}"
123
123
  )
124
124
  else:
125
125
  param_values[name] = attr_tpl
@@ -180,7 +180,7 @@ class FileType(Validator):
180
180
 
181
181
  def _format_error(self, value):
182
182
  return (self.error or self.default_message).format(
183
- input=value, extensions="".join(self.allowed_types)
183
+ input=value, extensions=",".join(self.allowed_types)
184
184
  )
185
185
 
186
186
  def __call__(self, value):
@@ -165,4 +165,4 @@ def test_filetype():
165
165
  match=r"Not an allowed file type. Allowed file types: \[.*?\]", # noqa: W605
166
166
  ):
167
167
  no_ext_fs = FileStorage(io.BytesIO(b"".ljust(1024)), "test")
168
- validate.FileType([".png"])(no_ext_fs)
168
+ validate.FileType([".png", ".jpg"])(no_ext_fs)
@@ -1,9 +1,9 @@
1
1
  [tox]
2
2
  envlist=
3
3
  lint
4
- py{39,310,311,312,313}
5
- py313-marshmallowdev
6
- py39-lowest
4
+ py{310,311,312,313,314}
5
+ py314-marshmallowdev
6
+ py310-lowest
7
7
  docs
8
8
 
9
9
  [testenv]
@@ -20,7 +20,7 @@ deps =
20
20
  commands = pytest {posargs}
21
21
 
22
22
  [testenv:lint]
23
- deps = pre-commit~=3.5
23
+ deps = pre-commit~=4.5.1
24
24
  skip_install = true
25
25
  commands = pre-commit run --all-files
26
26
 
@@ -30,13 +30,13 @@ commands = sphinx-build docs/ docs/_build {posargs}
30
30
 
31
31
  ; Below tasks are for development only (not run in CI)
32
32
 
33
- [testenv:watch-docs]
34
- deps =
35
- sphinx-autobuild
33
+ [testenv:docs-serve]
34
+ deps = sphinx-autobuild
36
35
  extras = docs
37
- commands = sphinx-autobuild --open-browser docs/ docs/_build {posargs} --watch src/flask_marshmallow --delay 2
36
+ commands = sphinx-autobuild --port=0 --open-browser --delay=2 docs/ docs/_build {posargs} --watch src --watch CONTRIBUTING.rst --watch README.rst
38
37
 
39
- [testenv:watch-readme]
38
+ [testenv:readme-serve]
40
39
  deps = restview
41
40
  skip_install = true
42
41
  commands = restview README.rst
42
+