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.