-
-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#339 / v4.8.0 broke stevedore which broke bandit, openstackclient, flake8 and others #348
Comments
Same
|
Seems to break openstack cli and rally testing as well. Opening https://storyboard.openstack.org/#!/story/2009151 |
Same here with flake8 (uses stevedore). I created a stevedore bug here: https://bugs.launchpad.net/python-stevedore/+bug/1941991 |
Sorry for the inconvenience. I've yanked 4.8.0 while working out a remedy. |
The recent release of importlib-metadata has broken an interface that stevedore uses when looking for entrypoints (see python/importlib_metadata#348 ). Several of our test/ci dependecies use stevedore for their plugin interfaces including stestr which is causing CI failures. To unblock CI this commit pins the importlib metadata version in our constraints file while the upstream issue is resolved.
The recent release of importlib-metadata has broken an interface that stevedore uses when looking for entrypoints (see: python/importlib_metadata#348 ). Several of our test/ci dependecies use stevedore for their plugin interfaces including stestr which is causing CI failures. To unblock CI this commit pins the importlib metadata version in our constraints file while the upstream issue is resolved.
I'd like devise a way to capture these requirements. I can see from the failure that stevedore is expecting |
@mtreinish: You may wish to refrain from pinning too many projects as I've yanked the offending version and expect to release the next version without the broken behavior. |
Thanks for the quick yank! I know this isn't nice news to receive. |
In #349, I've drafted a fix but marking the access by item as deprecated. I can add other missing but expected tuple behaviors there as well if needed. I welcome feedback. |
v4.8.1 is releasing now. I believe this addresses the issue. It's possible there are other usages out there dependent on tuple behaviors. If so, please raise an issue, mention me, and I'll address those promptly. |
v4.8.1 #348: Restored support for EntryPoint access by item, deprecating support in the process. Users are advised to use direct member access instead of item-based access: - ep[0] -> ep.name - ep[1] -> ep.value - ep[2] -> ep.group - ep[:] -> ep.name, ep.value, ep.group v4.8.0 #337: Rewrote EntryPoint as a simple class, still immutable and still with the attributes, but without any expectation for namedtuple functionality such as _asdict. v4.7.1 #344: Fixed regression in packages_distributions when neither top-level.txt nor a files manifest is present. v4.7.0 #330: In packages_distributions, now infer top-level names from .files() when a top-level.txt (Setuptools-specific metadata) is not present. References: python/importlib_metadata#348 python/importlib_metadata#337 python/importlib_metadata#344 python/importlib_metadata#330 Signed-off-by: Tim Orling <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
v4.8.1 #348: Restored support for EntryPoint access by item, deprecating support in the process. Users are advised to use direct member access instead of item-based access: - ep[0] -> ep.name - ep[1] -> ep.value - ep[2] -> ep.group - ep[:] -> ep.name, ep.value, ep.group v4.8.0 #337: Rewrote EntryPoint as a simple class, still immutable and still with the attributes, but without any expectation for namedtuple functionality such as _asdict. v4.7.1 #344: Fixed regression in packages_distributions when neither top-level.txt nor a files manifest is present. v4.7.0 #330: In packages_distributions, now infer top-level names from .files() when a top-level.txt (Setuptools-specific metadata) is not present. References: python/importlib_metadata#348 python/importlib_metadata#337 python/importlib_metadata#344 python/importlib_metadata#330 (From OE-Core rev: 01eb9d4384ae78b02780cea3b8690d99484b2602) Signed-off-by: Tim Orling <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
v4.8.1 #348: Restored support for EntryPoint access by item, deprecating support in the process. Users are advised to use direct member access instead of item-based access: - ep[0] -> ep.name - ep[1] -> ep.value - ep[2] -> ep.group - ep[:] -> ep.name, ep.value, ep.group v4.8.0 #337: Rewrote EntryPoint as a simple class, still immutable and still with the attributes, but without any expectation for namedtuple functionality such as _asdict. v4.7.1 #344: Fixed regression in packages_distributions when neither top-level.txt nor a files manifest is present. v4.7.0 #330: In packages_distributions, now infer top-level names from .files() when a top-level.txt (Setuptools-specific metadata) is not present. References: python/importlib_metadata#348 python/importlib_metadata#337 python/importlib_metadata#344 python/importlib_metadata#330 (From OE-Core rev: 01eb9d4384ae78b02780cea3b8690d99484b2602) Signed-off-by: Tim Orling <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
v4.8.1 #348: Restored support for EntryPoint access by item, deprecating support in the process. Users are advised to use direct member access instead of item-based access: - ep[0] -> ep.name - ep[1] -> ep.value - ep[2] -> ep.group - ep[:] -> ep.name, ep.value, ep.group v4.8.0 #337: Rewrote EntryPoint as a simple class, still immutable and still with the attributes, but without any expectation for namedtuple functionality such as _asdict. v4.7.1 #344: Fixed regression in packages_distributions when neither top-level.txt nor a files manifest is present. v4.7.0 #330: In packages_distributions, now infer top-level names from .files() when a top-level.txt (Setuptools-specific metadata) is not present. References: python/importlib_metadata#348 python/importlib_metadata#337 python/importlib_metadata#344 python/importlib_metadata#330 (From OE-Core rev: 01eb9d4384ae78b02780cea3b8690d99484b2602) Signed-off-by: Tim Orling <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
v4.8.1 #348: Restored support for EntryPoint access by item, deprecating support in the process. Users are advised to use direct member access instead of item-based access: - ep[0] -> ep.name - ep[1] -> ep.value - ep[2] -> ep.group - ep[:] -> ep.name, ep.value, ep.group v4.8.0 #337: Rewrote EntryPoint as a simple class, still immutable and still with the attributes, but without any expectation for namedtuple functionality such as _asdict. v4.7.1 #344: Fixed regression in packages_distributions when neither top-level.txt nor a files manifest is present. v4.7.0 #330: In packages_distributions, now infer top-level names from .files() when a top-level.txt (Setuptools-specific metadata) is not present. References: python/importlib_metadata#348 python/importlib_metadata#337 python/importlib_metadata#344 python/importlib_metadata#330 (From OE-Core rev: 01eb9d4384ae78b02780cea3b8690d99484b2602) Signed-off-by: Tim Orling <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
v4.8.1 #348: Restored support for EntryPoint access by item, deprecating support in the process. Users are advised to use direct member access instead of item-based access: - ep[0] -> ep.name - ep[1] -> ep.value - ep[2] -> ep.group - ep[:] -> ep.name, ep.value, ep.group v4.8.0 #337: Rewrote EntryPoint as a simple class, still immutable and still with the attributes, but without any expectation for namedtuple functionality such as _asdict. v4.7.1 #344: Fixed regression in packages_distributions when neither top-level.txt nor a files manifest is present. v4.7.0 #330: In packages_distributions, now infer top-level names from .files() when a top-level.txt (Setuptools-specific metadata) is not present. References: python/importlib_metadata#348 python/importlib_metadata#337 python/importlib_metadata#344 python/importlib_metadata#330 (From OE-Core rev: 01eb9d4384ae78b02780cea3b8690d99484b2602) Signed-off-by: Tim Orling <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
v4.8.1 #348: Restored support for EntryPoint access by item, deprecating support in the process. Users are advised to use direct member access instead of item-based access: - ep[0] -> ep.name - ep[1] -> ep.value - ep[2] -> ep.group - ep[:] -> ep.name, ep.value, ep.group v4.8.0 #337: Rewrote EntryPoint as a simple class, still immutable and still with the attributes, but without any expectation for namedtuple functionality such as _asdict. v4.7.1 #344: Fixed regression in packages_distributions when neither top-level.txt nor a files manifest is present. v4.7.0 #330: In packages_distributions, now infer top-level names from .files() when a top-level.txt (Setuptools-specific metadata) is not present. References: python/importlib_metadata#348 python/importlib_metadata#337 python/importlib_metadata#344 python/importlib_metadata#330 (From OE-Core rev: 01eb9d4384ae78b02780cea3b8690d99484b2602) Signed-off-by: Tim Orling <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
v4.8.1 #348: Restored support for EntryPoint access by item, deprecating support in the process. Users are advised to use direct member access instead of item-based access: - ep[0] -> ep.name - ep[1] -> ep.value - ep[2] -> ep.group - ep[:] -> ep.name, ep.value, ep.group v4.8.0 #337: Rewrote EntryPoint as a simple class, still immutable and still with the attributes, but without any expectation for namedtuple functionality such as _asdict. v4.7.1 #344: Fixed regression in packages_distributions when neither top-level.txt nor a files manifest is present. v4.7.0 #330: In packages_distributions, now infer top-level names from .files() when a top-level.txt (Setuptools-specific metadata) is not present. References: python/importlib_metadata#348 python/importlib_metadata#337 python/importlib_metadata#344 python/importlib_metadata#330 (From OE-Core rev: 4272ca45d137b91ec368c94b3e0dbd7d56c616dd) Signed-off-by: Tim Orling <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
v4.8.1 #348: Restored support for EntryPoint access by item, deprecating support in the process. Users are advised to use direct member access instead of item-based access: - ep[0] -> ep.name - ep[1] -> ep.value - ep[2] -> ep.group - ep[:] -> ep.name, ep.value, ep.group v4.8.0 #337: Rewrote EntryPoint as a simple class, still immutable and still with the attributes, but without any expectation for namedtuple functionality such as _asdict. v4.7.1 #344: Fixed regression in packages_distributions when neither top-level.txt nor a files manifest is present. v4.7.0 #330: In packages_distributions, now infer top-level names from .files() when a top-level.txt (Setuptools-specific metadata) is not present. References: python/importlib_metadata#348 python/importlib_metadata#337 python/importlib_metadata#344 python/importlib_metadata#330 Signed-off-by: Tim Orling <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
v4.8.1 #348: Restored support for EntryPoint access by item, deprecating support in the process. Users are advised to use direct member access instead of item-based access: - ep[0] -> ep.name - ep[1] -> ep.value - ep[2] -> ep.group - ep[:] -> ep.name, ep.value, ep.group v4.8.0 #337: Rewrote EntryPoint as a simple class, still immutable and still with the attributes, but without any expectation for namedtuple functionality such as _asdict. v4.7.1 #344: Fixed regression in packages_distributions when neither top-level.txt nor a files manifest is present. v4.7.0 #330: In packages_distributions, now infer top-level names from .files() when a top-level.txt (Setuptools-specific metadata) is not present. References: python/importlib_metadata#348 python/importlib_metadata#337 python/importlib_metadata#344 python/importlib_metadata#330 Signed-off-by: Tim Orling <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
v4.8.1 #348: Restored support for EntryPoint access by item, deprecating support in the process. Users are advised to use direct member access instead of item-based access: - ep[0] -> ep.name - ep[1] -> ep.value - ep[2] -> ep.group - ep[:] -> ep.name, ep.value, ep.group v4.8.0 #337: Rewrote EntryPoint as a simple class, still immutable and still with the attributes, but without any expectation for namedtuple functionality such as _asdict. v4.7.1 #344: Fixed regression in packages_distributions when neither top-level.txt nor a files manifest is present. v4.7.0 #330: In packages_distributions, now infer top-level names from .files() when a top-level.txt (Setuptools-specific metadata) is not present. References: python/importlib_metadata#348 python/importlib_metadata#337 python/importlib_metadata#344 python/importlib_metadata#330 (From OE-Core rev: 21d72ace8f9486bd1b478e28d53da64087d790fa) Signed-off-by: Tim Orling <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
Looks like this issue has been reintroduced in v5.0.0. We are seeing all pipelines fail this morning with the same message when using bandit for security linting.
|
I'm not confident of the report above for a couple of reasons. First, the report doesn't include the actual error message. It includes a screenshot with only a Second, the issue reported above was addressed in 4.8.1, but the changes made in the 5.0 release were made against 5fb7029, released in 4.4.0. Most importantly, importlib_metadata 5 still retains the tuple item access support (deprecated) added in v4.8.1. Probably the user is reporting the issue reported in #409. |
@jaraco I updated my comment with the full content of the error provided by the ADO (Azure Dev Ops) task. commands that ran the task. source $CONDA/bin/activate
python -m pip install safety==2.1.1 bandit==1.7.4
safety check
bandit --recursive . We were not specifying the version of importlib-metadata or that it be installed here. I updated the python -m pip command to include importlib-metadata==4.13.0 and now everything is passing as expected. new command source $CONDA/bin/activate
python -m pip install importlib-metadata==4.13.0 safety==2.1.1 bandit==1.7.4
safety check
bandit --recursive . Please let me know if I can provide more details. Thanks! |
Thanks. Yes, I can confirm with that traceback that it's a different issue, the one reported in #409, and that this issue could still potentially affect stevedore too, if the deprecation isn't addressed. |
This comment was marked as off-topic.
This comment was marked as off-topic.
@devturner Your issue is in #409. |
v4.8.1 #348: Restored support for EntryPoint access by item, deprecating support in the process. Users are advised to use direct member access instead of item-based access: - ep[0] -> ep.name - ep[1] -> ep.value - ep[2] -> ep.group - ep[:] -> ep.name, ep.value, ep.group v4.8.0 #337: Rewrote EntryPoint as a simple class, still immutable and still with the attributes, but without any expectation for namedtuple functionality such as _asdict. v4.7.1 #344: Fixed regression in packages_distributions when neither top-level.txt nor a files manifest is present. v4.7.0 #330: In packages_distributions, now infer top-level names from .files() when a top-level.txt (Setuptools-specific metadata) is not present. References: python/importlib_metadata#348 python/importlib_metadata#337 python/importlib_metadata#344 python/importlib_metadata#330 (From OE-Core rev: 21d72ace8f9486bd1b478e28d53da64087d790fa) Signed-off-by: Tim Orling <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
v4.8.1 #348: Restored support for EntryPoint access by item, deprecating support in the process. Users are advised to use direct member access instead of item-based access: - ep[0] -> ep.name - ep[1] -> ep.value - ep[2] -> ep.group - ep[:] -> ep.name, ep.value, ep.group v4.8.0 #337: Rewrote EntryPoint as a simple class, still immutable and still with the attributes, but without any expectation for namedtuple functionality such as _asdict. v4.7.1 #344: Fixed regression in packages_distributions when neither top-level.txt nor a files manifest is present. v4.7.0 #330: In packages_distributions, now infer top-level names from .files() when a top-level.txt (Setuptools-specific metadata) is not present. References: python/importlib_metadata#348 python/importlib_metadata#337 python/importlib_metadata#344 python/importlib_metadata#330 (From OE-Core rev: 21d72ace8f9486bd1b478e28d53da64087d790fa) Signed-off-by: Tim Orling <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
Setuptools >71 is installed in the zuul env as a setup before running the test jobs. Recent versions of setuptools have packaging >22 as a requirement. This constraint was updated in [1]. Stevedore <= 4.8.0 is incompatible with these updates [2]. In this commit, changed stevedore upper version constraint in zuul tests to 5.0.0, matching [3]. Test Plan: pass - Mock review to update repo [4], where the constraint was causing stx-software-tox-py39 zuul job to fail pass - On the config repo, ran sysinv-tox-py39 zuul job locally, since stevedore is cited in sysinv/sysinv/sysinv/sysinv/common/utils.py Refs: [1] Updated 'packaging' python module version constraint https://review.opendev.org/c/starlingx/root/+/929167 [2] Forum post citing error message from the bug report python/importlib_metadata#348 [3] STX Openstack stevedore constraint is set to 5.0.0 https://opendev.org/starlingx/root/commit/0f050b28f2ae88e72154ba02efddb051f331aa61 [4] Mock review to the update repo to test change https://review.opendev.org/c/starlingx/update/+/929287 Closes-Bug: 2080674 Change-Id: I47ec888e8e56bcbbe547d323add9351bc540a89c Signed-off-by: Leonardo Fagundes Luz Serrano <[email protected]>
Hello, #339 in v4.8.0 broke
stevedore
which brokebandit
for at least myself (but probably others)https://github.com/common-workflow-language/cwltool/pull/1482/checks?check_run_id=3454232416#step:9:50
PyCQA/bandit#730
Reverting to
importlib_metadata
version 4.7.1 resolves the problem for meOriginally posted by @mr-c in #339 (comment)
The text was updated successfully, but these errors were encountered: