-
Notifications
You must be signed in to change notification settings - Fork 3k
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
AttributeError: 'NoneType' object has no attribute 'is_hash_allowed' #6772
Comments
@ptynecki Thanks for filing this issue! /cc @cjerdonek since he's worked on this part of the codebase and is more familiar with it than me. |
Same issue on Windows 10, Python 3.7.3 |
Same issue on Ubuntu 18.04.2 LTS, Python 3.6.8 |
Same issue on macOS 18.6.0 and Python 3.7.4 |
Same issue on Windows 10, Python 3.7.4 |
Same issue on Fedora 29, Python 3.7.3. For now, as a workaround, ... python3 -m pip install -UI --user 'pip<19.2' reinstalled $ python3 -m pip install -UI --user 'pip<19.2'
Collecting pip<19.2
Using cached https://files.pythonhosted.org/packages/5c/e0/be401c003291b56efc55aeba6a80ab790d3d4cece2778288d65323009420/pip-19.1.1-py2.py3-none-any.whl
Installing collected packages: pip
Successfully installed pip-19.2 Why does it report |
Thanks for the confirmation of this occurring on multiple OSes! Folks, if you're facing the same issue, please don't post additional comments. Please use GitHub reactions to upvote the first post and subscribe to the issue. That way the maintainers would be able to have a discussion on how to resolve this in this issue -- additional "me too" comments won't help anyone. |
Hmm, I guess the type checker failed us here. The type annotation says pip/src/pip/_internal/models/link.py Lines 202 to 209 in 369ec7c
|
After a quick look, I think a good fix for now may be to update |
Ahhh. Yep -- strict_optional is False for
Yea, we can't completely rely on it, as long as we have these flags for incremental adoption. |
And even though |
Okay, I posted PR #6774 for this. |
This issue tells me that a good step after this (for 19.3 -- not the patch release) will be to get |
Yea - mypy does checks at the call site, using the rules at the call site. Your suggested fix and PR look good to me. If we don't see any other issue come up, I can do the bugfix release in the evening today -- ~3-5 hours from now. |
That would be great. Thank you so much for doing that. |
Hello. FWIW I may have found a bug in 19.2 that's unrelated to this one. I'm trying to figure it out still and will open a new issue afterwards. EDIT: |
The fix is in master. I'll do the release in a bit -- getting a bit of rest after a long day today. |
The release with this bug-fix has been uploaded. Thanks everyone (and especially @cjerdonek)! :) |
Environment
Description
I made env update in my project including pip as well. After that I wanted to check outdated packages with command:
After that exception was raised.
Expected behavior
I expected list of packages or empty list.
How to Reproduce
pip list --outdated --format=columns
Output
The text was updated successfully, but these errors were encountered: