Page MenuHomeSoftware Heritage

Throw fewer deprecation warnings for the RawExtrinsicMetadata id attr
ClosedPublic

Authored by olasd on Oct 27 2020, 3:42 PM.

Details

Summary

This avoids throwing the deprecation warning when id and target are present and
have the same value, which makes a from_dict / to_dict round-trip throw no
deprecation warnings.

This allows running pytest with -W error:RawExtrinsicMetadata:DeprecationWarning
on other modules to migrate them away from the legacy attributes.

Test Plan

tox

Diff Detail

Repository
rDMOD Data model
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 16663
Build 25692: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 25691: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D4366 (id=15434)

Rebasing onto 9da17a51df...

Current branch diff-target is up to date.
Changes applied before test
commit 4e3fdc062cf2bbf952e99ad3cbc3ab72c6b8cefa
Author: Nicolas Dandrimont <nicolas@dandrimont.eu>
Date:   Tue Oct 27 15:38:26 2020 +0100

    Throw fewer deprecation warnings for the RawExtrinsicMetadata id attr
    
    This avoids throwing the deprecation warning when id and target are present and
    have the same value, which makes a from_dict / to_dict round-trip throw no
    deprecation warnings.

See https://jenkins.softwareheritage.org/job/DMOD/job/tests-on-diff/160/ for more details.

This revision is now accepted and ready to land.Oct 27 2020, 3:55 PM