File: CHANGELOG.rst

package info (click to toggle)
python-flask-marshmallow 1.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 340 kB
  • sloc: python: 1,110; makefile: 169; sh: 17
file content (338 lines) | stat: -rw-r--r-- 9,307 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
Changelog
=========

1.4.0 (2026-02-04)
******************

Bug fixes:

* Add missing commas in error message for ``validate.FileType`` (:pr:`374`).

Support:

* Support Python 3.10-3.14 (:pr:`376`).

1.3.0 (2025-01-06)
******************

Support:

* Support Python 3.9-3.13 (:pr:`347`).
* Support marshmallow 4.0.0 (:pr:`347`).

1.2.1 (2024-03-18)
******************

Bug fixes:

* Fix `File` field when it receives an empty value (:pr:`301`, :issue:`apiflask/apiflask#551`).
  Thanks :user:`uncle-lv`.
* Fix `validate.FileSize` to handle `SpooledTemporaryFile` (:pr:`300`).
  Thanks again :user:`uncle-lv`.

1.2.0 (2024-02-05)
******************

Features:

* Performance improvement to `validate.FileSize` (:pr:`293`).
  Thanks :user:`uncle-lv`.

1.1.0 (2024-01-16)
******************

Features:

* Add type coverage (:pr:`290`).

1.0.0 (2024-01-16)
******************

Features:

* Add field ``fields.File``, ``validate.FileType``, and ``validate.FileSize`` 
  for deserializing uploaded files (:issue:`280`, :pr:`282`).
  Thanks :user:`uncle-lv` for the PR
* Add field ``Config`` for serializing Flask configuration values (:issue:`280`, :pr:`281`).
  Thanks :user:`greyli` for the PR.

Support:

* Support marshmallow-sqlalchemy>=0.29.0.
* Test against Python 3.12.
* Drop support for Python 3.7.

Other changes:

* *Backwards-incompatible*: Remove ```flask_marshmallow.__version__`` 
  and ``flask_marshmallow.__version_info__`` attributes (:pr:`284`). 
  Use feature detection or ``importlib.metadata.version("flask-marshmallow")`` instead.

0.15.0 (2023-04-05)
*******************

* Changes to supported software versions.

  * python3.6 or later and marshmallow>=3.0.0 are now required
  * Add support for python3.11
  * For ``sqlalchemy`` integration, marshmallow-sqlalchemy>=0.28.2 and
    flask-sqlalchemy>=3.0.0 are now required

* *Backwards-incompatible*: ``URLFor`` and ``AbsoluteURLFor`` now do not accept
  parameters for ``flask.url_for`` as top-level parameters. They must always be
  passed in the ``values`` dictionary, as explained in the v0.14.0 changelog.

Bug fixes:

* Address distutils deprecation warning in Python 3.10 (:pr:`242`).
  Thanks :user:`GabrielLins64` for the PR.

0.14.0 (2020-09-27)
*******************

* Add ``values`` argument to ``URLFor`` and ``AbsoluteURLFor`` for passing values to ``flask.url_for``.
  This prevents unrelated parameters from getting passed (:issue:`52`, :issue:`67`).
  Thanks :user:`AlrasheedA` for the PR.

Deprecation:

* Passing params to ``flask.url_for`` via ``URLFor``'s and ``AbsoluteURLFor``'s constructor
  params is deprecated. Pass ``values`` instead.

.. code-block:: python

    # flask-marshmallow<0.14.0


    class UserSchema(ma.Schema):
        _links = ma.Hyperlinks(
            {
                "self": ma.URLFor("user_detail", id="<id>"),
            }
        )


    # flask-marshmallow>=0.14.0


    class UserSchema(ma.Schema):
        _links = ma.Hyperlinks(
            {
                "self": ma.URLFor("user_detail", values=dict(id="<id>")),
            }
        )

0.13.0 (2020-06-07)
*******************

Bug fixes:

* Fix compatibility with marshmallow-sqlalchemy<0.22.0 (:issue:`189`).
  Thanks :user:`PatrickRic` for reporting.

Other changes:

* Remove unused ``flask_marshmallow.sqla.SchemaOpts``.

0.12.0 (2020-04-26)
*******************

* *Breaking change*: ``ma.ModelSchema`` and ``ma.TableSchema`` are removed, since these are deprecated upstream.

.. warning::
  It is highly recommended that you use the newer ``ma.SQLAlchemySchema`` and ``ma.SQLAlchemyAutoSchema``  classes
  instead of ``ModelSchema`` and ``TableSchema``. See the release notes for `marshmallow-sqlalchemy 0.22.0 <https://marshmallow-sqlalchemy.readthedocs.io/en/latest/changelog.html>`_
  for instructions on how to migrate.

If you need to use ``ModelSchema`` and ``TableSchema`` for the time being, you'll need to import these directly from ``marshmallow_sqlalchemy``.

.. code-block:: python

    from flask import Flask
    from flask_sqlalchemy import SQLAlchemy
    from flask_marshmallow import Marshmallow

    app = Flask(__name__)
    app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:////tmp/test.db"

    db = SQLAlchemy(app)
    ma = Marshmallow(app)

    # flask-marshmallow<0.12.0


    class AuthorSchema(ma.ModelSchema):
        class Meta:
            model = Author


    # flask-marshmallow>=0.12.0 (recommended)


    class AuthorSchema(ma.SQLAlchemyAutoSchema):
        class Meta:
            model = Author
            load_instance = True


    # flask-marshmallow>=0.12.0 (not recommended)

    from marshmallow_sqlalchemy import ModelSchema


    class AuthorSchema(ModelSchema):
        class Meta:
            model = Author
            sql_session = db.session

Bug fixes:

* Fix binding Flask-SQLAlchemy's scoped session to ``ma.SQLAlchemySchema`` and ``ma.SQLAlchemyAutoSchema``.
  (:issue:`180`). Thanks :user:`fnalonso` for reporting.

0.11.0 (2020-02-09)
*******************

Features:

* Add support for ``SQLAlchemySchema``, ``SQLAlchemyAutoSchema``, and ``auto_field``
  from marshmallow-sqlalchemy>=0.22.0 (:pr:`166`).

Bug fixes:

* Properly restrict marshmallow-sqlalchemy version based on Python version (:pr:`158`).

Other changes:

* Test against Python 3.8.

0.10.1 (2019-05-05)
*******************

Bug fixes:

* marshmallow 3.0.0rc6 compatibility (:pr:`134`).

0.10.0 (2019-03-09)
*******************

Features:

* Add `ma.TableSchema` (:pr:`124`).
* SQLAlchemy requirements can be installed with ``pip install
  'flask-marshmallow[sqlalchemy]'``.


Bug fixes:

* ``URLFor``, ``AbsoluteURLFor``, and ``HyperlinkRelated`` serialize to ``None`` if a passed attribute value is ``None`` (:issue:`18`, :issue:`68`, :pr:`72`).
  Thanks :user:`RobinRamuel`, :user:`ocervell`, and :user:`feigner` for reporting.

Support:

* Test against Python 3.7.
* Drop support for Python 3.4. Only Python 2.7 and >=3.5 are supported.

0.9.0 (2018-04-29)
******************

* Add support for marshmallow 3 beta. Thanks :user:`SBillion` for the PR.
* Drop support for Python 3.3. Only Python 2.7 and >=3.4 are supported.
* Updated documentation to fix example ``ma.URLFor`` target.

0.8.0 (2017-05-28)
******************

* Fix compatibility with marshmallow>=3.0.

Support:

* *Backwards-incompatible*: Drop support for marshmallow<=2.0.0.
* Test against Python 3.6.

0.7.0 (2016-06-28)
******************

* ``many`` argument to ``Schema.jsonify`` defaults to value of the ``Schema`` instance's ``many`` attribute (:issue:`42`). Thanks :user:`singingwolfboy`.
* Attach `HyperlinkRelated` to `Marshmallow` instances. Thanks :user:`singingwolfboy` for reporting.

Support:

* Upgrade to invoke>=0.13.0.
* Updated documentation to reference `HyperlinkRelated` instead of `HyperlinkModelSchema`. Thanks :user:`singingwolfboy`.
* Updated documentation links to readthedocs.io subdomain. Thanks :user:`adamchainz`.

0.6.2 (2015-09-16)
******************

* Fix compatibility with marshmallow>=2.0.0rc2.

Support:

* Tested against Python 3.5.

0.6.1 (2015-09-06)
******************

* Fix compatibility with marshmallow-sqlalchemy>=0.4.0 (:issue:`25`). Thanks :user:`svenstaro` for reporting.

Support:

* Include docs in release tarballs.

0.6.0 (2015-05-02)
******************

Features:

- Add Flask-SQLAlchemy/marshmallow-sqlalchemy support via the ``ModelSchema`` and ``HyperlinkModelSchema`` classes.
- ``Schema.jsonify`` now takes the same arguments as ``marshmallow.Schema.dump``. Additional keyword arguments are passed to ``flask.jsonify``.
- ``Hyperlinks`` field supports serializing a list of hyperlinks (:issue:`11`). Thanks :user:`royrusso` for the suggestion.


Deprecation/Removal:

- Remove support for ``MARSHMALLOW_DATEFORMAT`` and ``MARSHMALLOW_STRICT`` config options.

Other changes:

- Drop support for marshmallow<1.2.0.

0.5.1 (2015-04-27)
******************

* Fix compatibility with marshmallow>=2.0.0.

0.5.0 (2015-03-29)
******************

* *Backwards-incompatible*: Remove ``flask_marshmallow.SchemaOpts`` class and remove support for ``MARSHMALLOW_DATEFORMAT`` and ``MARSHMALLOW_STRICT`` (:issue:`8`). Prevents a ``RuntimeError`` when instantiating a ``Schema`` outside of a request context.

0.4.0 (2014-12-22)
******************

* *Backwards-incompatible*: Rename ``URL`` and ``AbsoluteURL`` to ``URLFor`` and ``AbsoluteURLFor``, respectively, to prevent overriding marshmallow's ``URL`` field (:issue:`6`). Thanks :user:`svenstaro` for the suggestion.
* Fix bug that raised an error when deserializing ``Hyperlinks`` and ``URL`` fields (:issue:`9`). Thanks :user:`raj-kesavan` for reporting.

Deprecation:

* ``Schema.jsonify`` is deprecated. Use ``flask.jsonify`` on the result of ``Schema.dump`` instead.
* The ``MARSHMALLOW_DATEFORMAT`` and ``MARSHMALLOW_STRICT`` config values are deprecated. Use a base ``Schema`` class instead (:issue:`8`).

0.3.0 (2014-10-19)
******************

* Supports marshmallow >= 1.0.0-a.

0.2.0 (2014-05-12)
******************

* Implementation as a proper class-based Flask extension.
* Serializer and fields classes are available from the ``Marshmallow`` object.

0.1.0 (2014-04-25)
******************

* First release.
* ``Hyperlinks``, ``URL``, and ``AbsoluteURL`` fields implemented.
* ``Serializer#jsonify`` implemented.