Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

checkov hook crashes importing LegacyVersion from packaging module #223

Closed
alperenkose opened this issue Dec 27, 2022 · 1 comment · Fixed by #224
Closed

checkov hook crashes importing LegacyVersion from packaging module #223

alperenkose opened this issue Dec 27, 2022 · 1 comment · Fixed by #224
Assignees
Labels
bug Something isn't working

Comments

@alperenkose
Copy link
Contributor

Describe the bug

Pre-commit hook crashes while checkov importing LegacyVersion from packaging module which prevents commiting.

Current behavior

Checkov hook crashes with the following error:
ImportError: cannot import name 'LegacyVersion' from 'packaging.version' (/Users/alp/.cache/pre-commit/repovr64b5yh/py_env-python3.11/lib/python3.11/site-packages/packaging/version.py)

Bug report and PR on checkov project.
bridgecrewio/checkov#4011
bridgecrewio/checkov#4012

Possible solution

Use checkov version 2.2.125 in pre-commit hook which uses a pinned version of packaging for now.

@alperenkose alperenkose added the bug Something isn't working label Dec 27, 2022
@welcome-to-palo-alto-networks

🎉 Thanks for opening your first issue here! Welcome to the community!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
1 participant