-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Clarify Python versioning in stub file search path #410
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
pep-0484.txt
Outdated
site-packages). Stub file package authors might use the following | ||
snippet in ``setup.py``:: | ||
directory that is always checked is ``shared/typehints/pythonX.Y/`` (for | ||
any PythonX.Y version, not just the installed version). Since there can |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's still not clear. When I run e.g. mypy --python-version 3.5
which directories will it check? python3.5 only, or python3.3, python3.4, python3.5?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, this is true. Perhaps "... (for some PythonX.Y as determined by the type checker, not just the installed Python version)."?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, just pythonX.Y? Then that proposed sentence sounds right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, as I think about this more, would it be possible to drop this entirely? I don't think stubs for one Python version should live in the install of another. It would be better to have this be replaced by python/typing#84.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll make the change you approved, the removal can be discussed in the PEP discussion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, it's not implemented in mypy, and I doubt it's implemented by other checkers. And it's somewhat ambiguous where "shared/typeshed" is rooted. But if we just want to delete it, I think we should just wait until you have a PEP with a better proposal and leave PEP 484 unchanged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My thinking exactly. I will add that to the PEP Im working on.
The previous version was not entirely clear.
cc @ilevkivskyi