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

Sadly symlinks don't work on Windows. #1173

Merged
merged 1 commit into from
Apr 18, 2017
Merged

Conversation

gvanrossum
Copy link
Member

So I have to make {ntpath,macpath}.pyi real copies of posixpath.pyi.

So I have to make {ntpath,macpath}.pyi real copies of posixpath.pyi.
@gvanrossum gvanrossum merged commit 8b835f9 into master Apr 18, 2017
@gvanrossum gvanrossum deleted the fix-ntpath-windows branch April 18, 2017 18:55
@JelleZijlstra
Copy link
Member

stdlib/2/builtins.pyi is also a symlink; does that not cause problems? I don't have Windows available to test.

@gvanrossum
Copy link
Member Author

That mystified me too, but apparently mypy carefully never follows the symlink -- it always loads __builtins__.pyi. There are also a few other symlinks -- I am guessing those don't get tested at all.

Unless I totally misunderstood the error from AppVeyor:

typeshed\stdlib\3\ntpath.pyi:1: error: Name 'posixpath' is not defined
typeshed\stdlib\3\macpath.pyi:1: error: Name 'posixpath' is not defined

@gvanrossum
Copy link
Member Author

FWIW I stack-overflowed this and the situation is dear: http://stackoverflow.com/questions/5917249/git-symlinks-in-windows

I don't really want to write a post-checkout script so I guess we should get rid of the symlinks.

@JelleZijlstra
Copy link
Member

JelleZijlstra commented Apr 18, 2017

That's unfortunate, I'm worried that we'll end up with changes being applied to only one of the files. Maybe we can add a test that ensures that the contents of __builtin__.pyi and builtins.pyi (and the other groups of symlinked files) are exactly the same.

@gvanrossum
Copy link
Member Author

You're also welcome to write that post-checkout script. :-)

FWIW we also have this problem in our Windows wheels -- I just checked out https://pypi.python.org/pypi/mypy/0.501 and sadly it looks like the file .../stdlib/2/builtins.pyi there is a plain text file containing the text __builtin__.pyi (i.e. the text contents of the symlink). I guess we're lucky it hasn't bitten anyone yet so far.

JelleZijlstra added a commit to JelleZijlstra/typeshed that referenced this pull request Apr 21, 2017
gvanrossum pushed a commit that referenced this pull request Apr 21, 2017
This reverts commit 8b835f9.

(Because we've fixed the issue in python/mypy#3213.)
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

Successfully merging this pull request may close these issues.

2 participants