New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
str | None fails #226
Comments
I was unable to reproduce on python 3.10.8 with marshmallow-dataclass==8.5.10. Reverting to 8.5.9 produces the same output that you pasted above though. For reference:
|
PR #219, included as of release 8.5.10, should (at least, in theory) support the |
Ok the issue seems when this version is pinned: |
I see. I believe that's sort of expected since support for UnionType was only added here in typing-inspect v0.8.0. It seems that marshmallow-dataclass only specifies typing-inspect>=0.7.1 in its setup.py, so I think this actually is a bug after all. |
Recent typing-inspect is required for support a PEP 604 (A | B) union notation. (See issue #226.)
I've just pushed 1d0f019 which pins Thanks, @hydrargyrum and @otonnesen, for the report and diagnosis. Let me know if there's a need for an immediate new release (of marshmallow-dataclass), otherwise, I'll wait until there are more changes before making the next release. |
With these versions:
The following snippet breaks:
with error:
The text was updated successfully, but these errors were encountered: