On 12/11/2025 11:21, Stephen Finucane wrote:
o/
Sean Mooney noted earlier today that watcher's requirements-check job has started failing with the following warning:
Validating requirements.txt WARNING: possible mismatch found for package "microversion_parse" Attribute "package" does not match "microversion_parse" does not match "microversion-parse" Requirement(package='microversion_parse', location='', specifiers='>=0.2.1', markers='', comment='# Apache-2.0', extras=frozenset()) Requirement(package='microversion-parse', location='', specifiers='', markers='', comment='# Apache-2.0', extras=frozenset()) ERROR: Could not find a global requirements entry to match package microversion_parse. If the package is already included in the global list, the name or platform markers there may not match the local settings.
This is almost certainly due to recent changes in the openstack/requirements repo to remove use of the soon-to-be-removed pkg_resources library [1]. Its replacement for this use case - packaging - does normalisation slightly differently and it seems it doesn't replace underscores with hyphens.
While this could be fixed with custom normalisation in the requirements repo, I don't believe it's wise to do so as that custom normalization would need to be copied anywhere else that needs to parse OpenStack requirements.txt files and requirements more generally. I would instead encourage affected projects to fix the names used in their various requirements.txt files and use the correct PyPI names. From a quick look at failing requirements-check jobs in recent days [2], there aren't many: I see neutron has already fixed the issue [3] and I've proposed a fix for tap-as-a-service [4]. Those patches should prove how small a task this should be. just doing a quick check for microversion_parse it only affect watcher cyborg and venus
https://codesearch.opendev.org/?q=microversion_parse&i=nope&literal=nope&files=(test-)%3Frequirements.txt&excludeFiles=&repos= i just pushed a patch for watcher and ill push the same to cyborg and venus to address it there https://review.opendev.org/c/openstack/watcher/+/966784 there may be other packages but i agree in general that this is a pretty simple fix and long term we are better off using the actual package name rather then relying on normalization.
Hope this helps, Stephen
[1] https://review.opendev.org/c/openstack/requirements/+/960845 [2] https://zuul.opendev.org/t/openstack/builds?job_name=requirements-check&result=FAILURE&skip=0 [3] https://review.opendev.org/c/openstack/neutron/+/965188 [4] https://review.opendev.org/c/openstack/tap-as-a-service/+/966782