openwallet-foundation / acapy

Hyperledger Aries Cloud Agent Python (ACA-Py) is a foundation for building decentralized identity applications and services running in non-mobile environments.
https://wiki.hyperledger.org/display/aries
Apache License 2.0
412 stars 512 forks source link

Update marshmallow usage to remove deprecation warnings #2342

Closed dbluhm closed 1 year ago

dbluhm commented 1 year ago

When running ACA-Py's unit tests, literally thousands of lines of output during the test report are dedicated to warnings of deprecation warnings from marshmallow. Lines like:

aries_cloudagent/wallet/routes.py:190
  /usr/src/app/aries_cloudagent/wallet/routes.py:190: RemovedInMarshmallow4Warning: Passing field metadata as keyword arguments is deprecated. Use the explicit `metadata=...` argument instead. Additional metadata: {'description': 'DID of interest', 'example': 'WgWxqztrNooG92RXvxSTWv'}
    did = fields.Str(description="DID of interest", required=True, **INDY_DID)

A previous attempt to address these warnings can be found here: https://github.com/hyperledger/aries-cloudagent-python/pull/1854#issuecomment-1189381980. This was in a PR where we attempted to update ACA-Py to newer python versions. We ended up getting a bit ahead of ourselves. The effort to upgrade was later broken down into smaller incremental steps. However, the methodology still applies (I think) for the marshmallow updates.

dbluhm commented 1 year ago

You can see these warnings when running unit tests; for example, on this recent github action run: https://github.com/hyperledger/aries-cloudagent-python/actions/runs/5658816461/job/15330956012#step:5:99