You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've tested and found the above error to occur with schema v0.7.5 on CPython 3.10.2, CPython 3.7.12, and PyPy3.8-7.3.7.
It looks like this regression was introduced in 958e1ad. Arguably this is due to a bug in Python, though.
Curiously: inspect.signature(list) works fine in CPython 3.6.15, but raises in 3.7.0.
For users wanting to work around this, some working options include e.g. Optional(..., default=lambda: dict()) and Optional(..., default=dict.__call__).
The text was updated successfully, but these errors were encountered:
The documentation provides the example
schema/README.rst
Lines 271 to 277 in 09c00ed
This does not work, however:
I've tested and found the above error to occur with schema v0.7.5 on CPython 3.10.2, CPython 3.7.12, and PyPy3.8-7.3.7.
It looks like this regression was introduced in 958e1ad. Arguably this is due to a bug in Python, though.
Curiously:
inspect.signature(list)
works fine in CPython 3.6.15, but raises in 3.7.0.For users wanting to work around this, some working options include e.g.
Optional(..., default=lambda: dict())
andOptional(..., default=dict.__call__)
.The text was updated successfully, but these errors were encountered: