Page MenuHomeElementl

Handle LegacyVersion
ClosedPublic

Authored by jordansanders on Jun 28 2021, 8:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jul 15 2022, 2:51 AM
Unknown Object (File)
Jul 15 2022, 2:51 AM
Unknown Object (File)
Jul 15 2022, 2:51 AM
Unknown Object (File)
Jul 10 2022, 6:34 PM
Unknown Object (File)
Jun 30 2022, 1:46 AM
Unknown Object (File)
Jun 24 2022, 5:14 PM
Unknown Object (File)
Jun 22 2022, 4:55 PM
Unknown Object (File)
Jun 21 2022, 3:49 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