Page MenuHomeElementl

Handle LegacyVersion
ClosedPublic

Authored by jordansanders on Jun 28 2021, 8:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 28, 8:34 AM
Unknown Object (File)
Fri, Nov 18, 12:19 AM
Unknown Object (File)
Fri, Nov 18, 12:19 AM
Unknown Object (File)
Fri, Nov 18, 12:19 AM
Unknown Object (File)
Tue, Nov 15, 7:44 AM
Unknown Object (File)
Mon, Nov 14, 3:06 PM
Unknown Object (File)
Sat, Nov 12, 4:25 AM
Unknown Object (File)
Thu, Nov 3, 3:25 PM
Subscribers
None

Details

Summary

packaging.version.parse can return either a Version or a LegacyVersion.
LegacyVersion doesn't have a major attribute:

python_modules/libraries/dagstermill/dagstermill/compat.py:5: error: Item "LegacyVersion" of "Union[LegacyVersion, Version]" has no attribute "major" [union-attr]

While it's probably safe to assume that Papermill will never publish a
non-parsable version, I'm switching this to safely handle occurances
when parse returns a LegacyVersion instead of ignoring the mypy warning.

Test Plan

unit

Diff Detail

Repository
R1 dagster
Lint
Lint Not Applicable
Unit
Tests Not Applicable