Skip to content

os.path stub is missing samestat on py3 #2068

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

Closed
wiml opened this issue Apr 18, 2018 · 1 comment
Closed

os.path stub is missing samestat on py3 #2068

wiml opened this issue Apr 18, 2018 · 1 comment
Assignees

Comments

@wiml
Copy link
Contributor

wiml commented Apr 18, 2018

stdlib/{2,3}/os/path.pyi includes a TODO comment to add a declaration for samestat (but for "Unix only"). On Py2, the OS-specific stubs have samestat, but on Py3, all of the OS-specific stubs have it commented out.

@JelleZijlstra
Copy link
Member

#2053 fixes this.

@JelleZijlstra JelleZijlstra self-assigned this May 14, 2018
JelleZijlstra added a commit that referenced this issue May 15, 2018
Fixes #1997, #2068.

This is tricky because we need to get the return values right (see #1960 for
prior attempts) and we often run into python/mypy#3644. I found that I
could express most signatures correctly using a series of overloads.

A few other changes in here:
- Added splitunc, which according to https://docs.python.org/3/library/os.path.html
  should exist in both Unix and Windows.
- Made the second argument to os.path.curdir Optional to match the implementation.
- Fixed os.path.split, whose previous Path-aware signature triggered python/mypy#3644.
gwk pushed a commit to gwk/typeshed that referenced this issue May 29, 2018
Fixes python#1997, python#2068.

This is tricky because we need to get the return values right (see python#1960 for
prior attempts) and we often run into python/mypy#3644. I found that I
could express most signatures correctly using a series of overloads.

A few other changes in here:
- Added splitunc, which according to https://docs.python.org/3/library/os.path.html
  should exist in both Unix and Windows.
- Made the second argument to os.path.curdir Optional to match the implementation.
- Fixed os.path.split, whose previous Path-aware signature triggered python/mypy#3644.
yedpodtrzitko pushed a commit to yedpodtrzitko/typeshed that referenced this issue Jan 23, 2019
Fixes python#1997, python#2068.

This is tricky because we need to get the return values right (see python#1960 for
prior attempts) and we often run into python/mypy#3644. I found that I
could express most signatures correctly using a series of overloads.

A few other changes in here:
- Added splitunc, which according to https://docs.python.org/3/library/os.path.html
  should exist in both Unix and Windows.
- Made the second argument to os.path.curdir Optional to match the implementation.
- Fixed os.path.split, whose previous Path-aware signature triggered python/mypy#3644.
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

No branches or pull requests

2 participants