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

Clarify Python versioning in stub file search path #410

Merged
merged 2 commits into from
Sep 10, 2017
Merged

Clarify Python versioning in stub file search path #410

merged 2 commits into from
Sep 10, 2017

Conversation

emmatyping
Copy link
Contributor

The previous version was not entirely clear.

cc @ilevkivskyi

Copy link
Member

@ilevkivskyi ilevkivskyi left a 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
Copy link
Member

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?

Copy link
Contributor Author

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)."?

Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

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.

@gvanrossum gvanrossum merged commit ee64ced into python:master Sep 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants