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

fix system executable discovery #1550

Merged
merged 3 commits into from
Feb 10, 2020
Merged

fix system executable discovery #1550

merged 3 commits into from
Feb 10, 2020

Conversation

gaborbernat
Copy link
Contributor

@gaborbernat gaborbernat commented Feb 10, 2020

This might fix our test suite now.

Resolves #1552
Resolves #1553

@@ -131,7 +131,7 @@ def non_write_able(dest, value):
# pre 3.6 resolve is always strict, aka must exists, sidestep by using os.path operation
dest = Path(os.path.realpath(raw_value))
else:
dest = value.resolve()
dest = value.absolute().resolve() # on Windows absolute does not imply resolve so use both
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

absolute() is undocumented (see bpo-29688)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works in practice though, so I'm fine with this approach for now 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ugh, reading up that thread I've swapped to os.path.abspath now 🤷‍♂

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also relevant is bpo-39090 - "getting the absolute path is surprisingly subtle and varied depending on your needs" 🙁

Signed-off-by: Bernat Gabor <bgabor8@bloomberg.net>
Signed-off-by: Bernat Gabor <bgabor8@bloomberg.net>
Signed-off-by: Bernat Gabor <bgabor8@bloomberg.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants