Remove pkg_sources use from Neutron and still pin virtualenv#103
Merged
sebageek merged 3 commits intostable/2024.1-m3from Mar 30, 2026
Merged
Remove pkg_sources use from Neutron and still pin virtualenv#103sebageek merged 3 commits intostable/2024.1-m3from
sebageek merged 3 commits intostable/2024.1-m3from
Conversation
In [0] when we changed code to consistently use convert_version_to_tuple() instead of the packaging library, one place was missed since it used the pkg_resources library. Change to use the same code throughout the tree for version checks. Also fixes a pylint warning as the pkg_resources API usage generates a DeprecationWarning. [0] https://review.opendev.org/c/openstack/neutron/+/890162 TrivialFix Change-Id: I54e4e310b660acf3dd4cf07a50636512904b578c
toanju
previously approved these changes
Mar 16, 2026
felix-kaestner
previously approved these changes
Mar 20, 2026
... because it was removed in Python 3.12 [1]. [1] https://docs.python.org/3/whatsnew/3.12.html#ensurepip Note: Selectable entry points were introduced in importlib_metadata 3.6 and Python 3.10 . Change-Id: I1b478a63ad1d73f9f3528939362797ea1fc68534
`virtualenv` 2.38 bumped setuptools, which does not contain `pkg_resources` anymore. Since we're on an older release, our dependencies still require `pkg_resources` to be present. Hence, installing and running unit-tests fails. We're pinning the virtualenv even though we already removed all pkg_resources imports from Neutron as some of the test requirements (at the moment flake8 for the pep8 check) still require pkg_resources to be present. Adopted from sapcc/nova[0]. [0] sapcc/nova@d58abc9
felix-kaestner
approved these changes
Mar 30, 2026
toanju
approved these changes
Mar 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This packports two upstream patches to remove
pkg_resourcesusage from Neutron. We still need it, as at the moment the pep8 check uses a flake8 version that still requirespkg_resources. As all of this will go away anyway with the next major version bump I'm just going to go ahead and pin virtualenv in tox as with our other repos.