Bug 2019954
| Summary: | Auto requirements explode on 'pytz>dev' | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | František Zatloukal <fzatlouk> |
| Component: | python-rpm-generators | Assignee: | Miro Hrončok <mhroncok> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | cstratak, gordon.messmer, lbalhar, m.cyprian, mhroncok, ngompa13, pviktori, shcherbina.iryna, torsava |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | python-rpm-generators-12-11.fc36 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-01-04 09:53:10 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
František Zatloukal
2021-11-03 17:10:59 UTC
Thanks for the report. Previously, this used to generate: python3.10dist(pytz) > dev Which seems to be a wrong result. The requirement seems to behave like 'pytz>0.dev0', but it is parsed as LegacyVersion by packaging (which means "this version has a bogus value"). So this update just likely exposed this problem. To restore the previous (somewhat working, but likely very wrong) behavior, we could define .pre .dev. and.post as None for legacy versions, but I believe that erroring might be a better choice, also considering that packaging warns to drop LegacyVersion altogether. For the celery case, maybe let's try to figure out what do they actually want to achieve by pytz>dev? The commit https://github.com/celery/celery/commit/408835a3523a35d64a5a992fe00043c59f68df05 is from 2013. From the linked issue https://github.com/pypa/pip/issues/974 I believe they actually really want to say 'pytz>0.dev.0' but were told to use pytz>dev which behaves the same with pip, but is actually not a valid version specifier :/ Could they be told to use pytz>0.dev.0 instead? >>> from packaging.version import parse >>> parse('dev') <LegacyVersion('dev')> >>> parse('0.dev.0') <Version('0.dev0')> As a workaround, you should be able to sed/patch that to plain "pytz" when building RPM, the relevant issue with beta versions does not apply to RPM requirements. In the meantime, I will rebuild everything in https://copr.fedorainfracloud.org/coprs/churchyard/generators-mass-rebuild/ to see how many packages are impacted by this and in https://copr.fedorainfracloud.org/coprs/churchyard/generators-mass-rebuild-fail-legacy/ I rebuild everything but with the generator that errors out immediately when a LegacyVersion is parsed. We can deal with LegacyVersions later. Here is a proposed fix of this regression: https://src.fedoraproject.org/rpms/python-rpm-generators/pull-request/47 I've tested it on python-celery (with your workaround removed) and it produces the same results as before. But will run all the builds in https://copr.fedorainfracloud.org/coprs/churchyard/generators-mass-rebuild-fix-regression-legacy anyway. Current rawhide generatiors: https://copr.fedorainfracloud.org/coprs/churchyard/generators-mass-rebuild/ 0 failures with INVALID_REQUIREMENT_ERROR___SEE_STDERR 1 failure with PYTHONDISTDEPS_GENERATORS_FAILED (python-celery) So the good news is this regression only impacts one package \o/ Generators failing with LegacyVersions: https://copr.fedorainfracloud.org/coprs/churchyard/generators-mass-rebuild-fail-legacy/ 0 failures with PYTHONDISTDEPS_GENERATORS_FAILED 5 failures with INVALID_REQUIREMENT_ERROR___SEE_STDERR 2 errors when processing requires: python-celery -- Invalid version: dev python-pvc -- Invalid version: 5.5.0-2014.1.1 /usr/lib/python3.10/site-packages/celery-5.2.0rc1-py3.10.egg-info/requires.txt pytz>dev /usr/lib/python3.10/site-packages/pvc-0.3.0-py3.10.egg-info/requires.txt pyvmomi>=5.5.0-2014.1.1 3 errors when processing provides: python-haversion -- Invalid version: main python-ipmi -- Invalid version: unknown python-lacrosse -- Invalid version: unknown /usr/lib/python3.10/site-packages/pyhaversion-main-py3.10.egg-info/PKG-INFO Version: main /usr/lib/python3.10/site-packages/python_ipmi-unknown-py3.10.egg-info/PKG-INFO Version: unknown /usr/lib/python3.10/site-packages/pylacrosse-unknown-py3.10.egg-info/PKG-INFO Version: unknown Given the fact that some packages are regularly versioned with weird stuff, I am reluctant to error out on LegacyVersion right now, but definitively a good idea to monitor pypa/packaging closely for the removal. I believe the main/unknown stuff is a bug in the 3 packages. Maybe we should error out for provides by default and provide a way to force it (for versions like 5.5.0-2014.1.1). I'll start a discussion on python-devel. (In reply to Miro Hrončok from comment #1) > Could they be told to use pytz>0.dev.0 instead? Asked upstream: https://github.com/celery/celery/pull/7074 Thanks for the explanation! https://src.fedoraproject.org/rpms/python-rpm-generators/pull-request/49 This has been fixed on Rawhide. Given the low impact of this, I will not actively backport to older branches until asked to. ---- Removing support for LegacyVersions is on my TODO, but it can happen after packaging does that. |