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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: fail with pip>= 21.3 #17

Closed
3 tasks done
Niccolum opened this issue Jan 8, 2022 · 5 comments
Closed
3 tasks done

Bug: fail with pip>= 21.3 #17

Niccolum opened this issue Jan 8, 2022 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@Niccolum
Copy link

Niccolum commented Jan 8, 2022

Bug

  • I have read the comment above and have completed each step
  • I have filled out the system info
  • I have described the bug, filled in the expected outcome and the actual
    outcome including screenshots where appropriate

System info

  • OS: Ubuntu 18 LTS
  • Version: 2021.5

Describe the bug

New pip broke internal API. Similar issue with jazzband/pip-tools#1503

Expected outcome

Zero code or lisencecheck output

Actual outcome

licensecheck.............................................................Failed
- hook id: licensecheck
- exit code: 1

Traceback (most recent call last):
  File "/home/niccolum/.cache/pre-commit/repohao7hzis/py_env-python3.10/bin/licensecheck", line 5, in <module>
    from licensecheck import cli
  File "/home/niccolum/.cache/pre-commit/repohao7hzis/py_env-python3.10/lib/python3.10/site-packages/licensecheck/__init__.py", line 12, in <module>
    from licensecheck import formatter, get_deps
  File "/home/niccolum/.cache/pre-commit/repohao7hzis/py_env-python3.10/lib/python3.10/site-packages/licensecheck/get_deps.py", line 10, in <module>
    from licensecheck import license_matrix, packageinfo
  File "/home/niccolum/.cache/pre-commit/repohao7hzis/py_env-python3.10/lib/python3.10/site-packages/licensecheck/packageinfo.py", line 15, in <module>
    from pip._internal.utils.misc import get_installed_distributions
ImportError: cannot import name 'get_installed_distributions' from 'pip._internal.utils.misc' (/home/niccolum/.cache/pre-commit/repohao7hzis/py_env-python3.10/lib/python3.10/site-packages/pip/_internal/utils/misc.py)
@Niccolum Niccolum added the bug Something isn't working label Jan 8, 2022
@FredHappyface
Copy link
Member

Cheers for the report

Can you upgrade to 2021.5.2 please? Should be fixed in the most recent version as noted in the changelog. Thanks 😊

@Niccolum
Copy link
Author

Niccolum commented Jan 9, 2022

Ok, check today, thanks!

@Niccolum
Copy link
Author

Niccolum commented Jan 9, 2022

@FredHappyface can you add new tag 2021.5.2 for master? In precommit i can use only tag instead of package version.

@FredHappyface
Copy link
Member

Oh yeah, of course!

Sorry about that, completely forgot!

@FredHappyface
Copy link
Member

#fixed in https://github.com/FHPythonUtils/LicenseCheck/releases/tag/2021.5.2

@Niccolum Niccolum closed this as completed Jan 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants