-
-
Notifications
You must be signed in to change notification settings - Fork 548
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
ImportError: cannot import name 'LegacyVersion' from 'packaging.version' #3171
ImportError: cannot import name 'LegacyVersion' from 'packaging.version' #3171
Comments
@soimkim Thanks for the report.... This likely the same as aboutcode-org/pip-requirements-parser#10 which is breaking many other tools that reuse our requirements parser and is because of the pypa core packaging library new release 22.0 |
The change in packaging: pypa/packaging#407 |
I pushed an emergency v32.0 of pip-requirements-parser to PyPI with aboutcode-org/pip-requirements-parser#12 .... @soimkim @danielthieleog can you test this in your context? this would be super helpful! |
@pombredanne , thank you, the error disappeared |
I am having the same issue. I am unable to install Scancode 31.2.1 via pip.
|
@Jeeppler I will push a new emergency fix. Breaking API changes in the core packaging library are the culprit. I guess we should vendor it. |
@pombredanne thanks for taking care of it. |
@AyanSinhaMahapatra and I pushed a new version of pip-requirements-parser that solves this issue. It works with the "packaging" v21 and v22 equally well, by vendoring the LegacyVersion. |
Testing mucho welcomed before we close this! |
This packaging issue never stops on giving :] |
For info the upstream issue is at pypa/packaging#530 |
@0xc0170 FYI |
* Switch to using packvers fork of packaging * Bump pip requirements parser, but it still using packaging. * Bump dparse2 which is using packvers * Pin SPDX tools for cope with breaking APIs * Update release script to build one release wheel for each Python version that each contain a pickle of the License index * Streamline the app build * Bump version and use correct SPDX version Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
* Switch to using packvers fork of packaging * Bump pip requirements parser, but it still using packaging. * Bump dparse2 which is using packvers * Pin SPDX tools for cope with breaking APIs * Update release script to build one release wheel for each Python version that each contain a pickle of the License index * Streamline the app build * Bump version and use correct SPDX version Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
@soimkim this should be fixed in scancode-toolkit 31.2.3 which was released, please give it a try! |
@AyanSinhaMahapatra , fixed in version 31.2.3. |
Description
How To Reproduce
System configuration
The text was updated successfully, but these errors were encountered: