-
Notifications
You must be signed in to change notification settings - Fork 516
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
Chore: fix marshmallow warnings #2398
Chore: fix marshmallow warnings #2398
Conversation
…d example cases, in order to run marshmallow metadata upgrade Signed-off-by: ff137 <[email protected]>
…d example cases, in order to run marshmallow metadata upgrade (openwallet-foundation#2342) Signed-off-by: ff137 <[email protected]>
…on#2342) Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
…PEC_EXAMPLE` (openwallet-foundation#2342) Signed-off-by: ff137 <[email protected]>
…foundation#2342) Utilized the custom upgrade tool from the `dbluhm/acapy-marshmallow-upgrade` repository to modify the marshmallow field definitions in accordance with the latest best practices. This update eliminates the deprecation warnings related to marshmallow usage in ACA-Py. Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
…on#2342) Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
…on#2342) Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
… errors Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
1'108 marshmallow deprecation warnings reduced to 18 :-) |
Signed-off-by: ff137 <[email protected]>
…example Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
There is now only 1 more marshmallow deprecation warning (that occurs 45 times?)
There's no usage of the |
Kudos, SonarCloud Quality Gate passed! |
@ff137 looks like updating |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Glad the script I wrote was helpful. I seem to remember taking a similar tactic on those splatted kwargs from messaging.valid
.
Heads up, @swcurran @usingtechnology, this is a big change by number of lines but behavior of these models is unchanged. I think we should merge this quickly since addressing merge conflicts could be a bit extra painful.
This should merge cleanly into the anoncreds-rs
branch but the new models defined there would need some adjustment. I can assist there. Even if the models weren't adjusted immediately, we'll get warnings reported to help track them down later.
I leave it to you to define how to merge into the |
Oh and awesome to get these cleaned up — nice work!! |
@dbluhm - i am in the middle of a first PR to the |
Resolves #2342
I used the acapy-marshmallow-upgrade tool created by @dbluhm (as described here: #1854 (comment)), which iterates over usages of marshmallow fields, to wrap deprecated arguments in a metadata dictionary.
The only hairy part to this task was the schemas defined in
aries_cloudagent/messaging/valid.py
:These definitions were used in marshmallow fields by calling e.g.
fields.Int(..., **INT_EPOCH)
, which would be missed by the upgrade tool. Also, validate is a supported argument, while example should be moved to metadata.To account for this, I refactored the schema specifications (using regex):
I then updated the imports, and replaced usages of
**INT_EPOCH
, for example, tovalidate=INT_EPOCH_VALIDATE, example=INT_EPOCH_EXAMPLE
. Then could I run the marshmallow-upgrade tool created by dbluhm to correctly wrap examples in the metadata.Additionally: upgrade marshmallow to latest (3.20)