ChangedInMarshmallow3Warning with Python 3.7
See original GitHub issueUsing Python 3.7 and having installed it the standard way™:
$ pip install marshmallow
I get an unexpected warning:
/usr/local/lib/python3.7/dist-packages/marshmallow/schema.py:364: ChangedInMarshmallow3Warning: strict=False is not recommended. In marshmallow 3.0, schemas will always be strict. See https://marshmallow.readthedocs.io/en/latest/upgrading.html#schemas-are-always-strict ChangedInMarshmallow3Warning
And despite what the documentation says, <form>.load(…)
returns a tuple but shouldn’t.
minimal example (not authoritative)
import typing import Tuple
from marshmallow import fields, Schema, ValidationError
class RegistrationSchema(Schema):
email = fields.Email(required=True)
try:
result = RegistrationSchema().load({'email', 'nospam'})
if isinstance(result, Tuple):
print('unexpected')
except ValidationError as err:
print('ok')
# → gives: "unexpected"
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Changelog — marshmallow 3.19.0 documentation
Prevent warning about importing from collections on Python 3.7 (#1354). ... A ChangedInMarshmallow3Warning is no longer raised when strict=False (#1108).
Read more >Python Release Python 3.7.15
Python 3.7.15. Release Date: Oct. 11, 2022. Note: The release you are looking at is Python 3.7.15, a security bugfix release for the...
Read more >Python Release Python 3.7.0b3
Python 3.7.0b3. Release Date: March 29, 2018. This is a beta preview of Python 3.7. Python 3.7 is still in development.
Read more >What's New In Python 3.7 — Python 3.11.1 documentation
Python 3.7 was released on June 27, 2018. For full details, see the changelog. Summary – Release Highlights¶. New syntax features: PEP 563 ......
Read more >Python Release Python 3.7.5
Note: The release you are looking at is Python 3.7.5, a bugfix release for the legacy 3.7 series which is now in the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@rtaft You’re right. I was able to reproduce it. I’ve opened a new bug issue: #1134.
installs marshmallow 2, as marshmallow 3 is still beta.
This warning was added to marshmallow 2 to prepare marshmallow 3 migration. You may ignore it, or make all your schemas strict to be ready for the migration. (Hint: you may declare a strict base schema and have all your schemas inherit from it.)
The tuple is expected return value for marshmallow 2. I suppose you read marshmallow 3 documentation.