-
Notifications
You must be signed in to change notification settings - Fork 22
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
Marshmallow Field(Default =) Depriciated After 3.12.2 #103
Comments
Hi @threatify @SoundsSerious Assign me this issue i will update the new changes. |
@ahmadjubair33 - Feel free to open a PR and we can review that. @SoundsSerious - Yes marshmallow backward incompatible changes are starting to become annoying. Unfortunately marshmallow itself is quite tied to arango-orm at this stage. Using jsonschema and newer offerings like pydantic could result in a much better implementation but that does require major rework of the library and would need some backward incompatible changes. Also pydantic requires python 3.6+ which is fine for newer projects but projects using older python versions might suffer. Overall I'm leaning towards using pydantic instead of marshmallow and utilizing arango's support for json schema. This probably would need to be a major release so current projects and still keep using versions utilizing marshmallow (for which we can fix the version in dependencies). |
@kashifpk Ah well always more work to do :) I think for now at least there's an easy solution specifying the marshmallow version, and the code doesn't fail either it just warns. A hack might be to just turn the logging off for marshmallow as well. Have you considered attrs? It doesn't really do validation unless you specify it. On the topic of the Forking approach, I imagine there's a limited subset of features marshmellow offers, and that the schema validation requirements for arango-orm wont change much, since typing and serialization is more or less a solved science. Other than that I'm kinda ignorant on the inner workings of the library, being more of an attrs guy. |
Marshmallow After 3.13 has changed
default
todump_default=
and will switch in version 4. Probably not the biggest issue since arango-orm has been considering its own schema as I've seen discussed in other issues.To solve this issue in my library I've simply specified a version of marshmallow to 3.12.2.
A couple other ideas, fork marshmallow and include a frozen version directly in the code base. Or go through the code updating to
dump_default
(which I personally think is a dumb name)The text was updated successfully, but these errors were encountered: