Fix site version parsing in rb-site upgrade with modern packaging libs.
Review Request #13086 — Created May 31, 2023 and submitted
When running
rb-site upgrade
, the old site version is checked to see
if certain steps need to be performed. We check the display version of
the site, since that's all that we can pull from siteconfig, and
historically this has worked, withpkg_resources.parse_version()
turning this into aLegacyVersion
object.Unfortunately, this support has been dropped, causing this code path to
fail if running any beta, alpha, RC, or development releases.To work around this, we now pull out the actual version component (the
part before a space) and compare using that.Since
pkg_resources
is deprecated, this also moves our version parsing
topackaging.version.parse
instead. This is the first step toward
moving away frompkg_resources
.
Tested a site upgrade, verifying that this code path was being executed.
Verified that the version check worked fine on an alpha dev build.
Summary | ID |
---|---|
45e57e8a01db9f731a3f0812caafb91ae1d646ad |