Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup: Use packaging version <22 #3177

Closed

Conversation

0xc0170
Copy link

@0xc0170 0xc0170 commented Dec 16, 2022

Same locking version is used in requirements. If we do not lock, the 22.0 removed Legacy version, the error I am seeing:
ImportError: cannot import name 'LegacyVersion' from 'packaging.version'

I verified packaging version 22.0 what was breaking there, it really removed LegacyVersion, we should lock to < 22.0.

Requirements (txt files in the root) have the version properly locked (using exact 21 version match), not certain why setup config has different version match. I also wonder why this has not been reported so far, have I missed anything?

See ARMmbed/mbed-os#15357 (we got license check job failing since few days ago).

Tasks

  • Reviewed contribution guidelines
  • PR is descriptively titled 馃搼 and links the original issue above 馃敆
  • Tests pass -- look for a green checkbox 鉁旓笍 a few minutes after opening your PR
    Run tests locally to check for errors.
  • Commits are in uniquely-named feature branch and has no merge conflicts 馃搧

Same locking version is used in requirements. If we do not lock,
the 22.0 removed Legacy version, see the error:
`ImportError: cannot import name 'LegacyVersion' from 'packaging.version'`

Signed-off-by: Martin Kojtal <martin.kojtal@arm.com>
@0xc0170
Copy link
Author

0xc0170 commented Dec 20, 2022

@pombredanne Can you review please?

@pombredanne
Copy link
Member

pombredanne commented Dec 21, 2022

@0xc0170 Thank you ++ for the PR, we used a different approach to fix this as pinning the packaging lib to under v22 creates a few other issues since this is a core "packaging" utility. Instead we now have a new pip-requirements-parser that accepts packaging v21 and v22.
I am still push an emergency dot release for another usage of LegacyVersion.
In the meantime, scancode latest release should install again correctly.
Can you check?

pombredanne added a commit that referenced this pull request Dec 21, 2022
Reference: #3177
Reference: #3171
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
pombredanne added a commit that referenced this pull request Dec 21, 2022
Reference: #3177
Reference: #3171
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
@pombredanne
Copy link
Member

I am pushing a hotfix in this branch https://github.com/nexB/scancode-toolkit/tree/v31.2.2-branch-hotfix as vv31.2.3

@0xc0170
Copy link
Author

0xc0170 commented Dec 22, 2022

Thanks, I'll restart our tests and if there is any issue I'll get back. It should be all good

pombredanne added a commit that referenced this pull request Dec 23, 2022
* 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>
pombredanne added a commit that referenced this pull request Dec 23, 2022
* 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>
AyanSinhaMahapatra added a commit that referenced this pull request Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants