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

gh-118345: Fix os.path.abspath() & posixpath.abspath() for relative paths on the other platform #118346

Closed
wants to merge 7 commits into from

Conversation

nineteendo
Copy link
Contributor

@nineteendo nineteendo commented Apr 27, 2024

Ideally merged after #117855, then we don't need to check os.name for posixpath.abspath().
It looks like we need to use if for posixpath.realpath() though.

Co-authored-by: Eryk Sun <eryksun@gmail.com>
@nineteendo nineteendo changed the title gh-118345: Fix os.path.abspath() gh-118345: Fix os.path.abspath() for relative paths on the other platform Apr 27, 2024
@nineteendo
Copy link
Contributor Author

The failing tests are to be expected: you shouldn't run functions of os.path, that rely on the cwd, on the other platform.

Lib/ntpath.py Outdated Show resolved Hide resolved
Lib/posixpath.py Outdated Show resolved Hide resolved
@nineteendo nineteendo changed the title gh-118345: Fix os.path.abspath() for relative paths on the other platform gh-118345: Fix os.path.abspath() & posixpath.abspath() for relative paths on the other platform Apr 27, 2024
@nineteendo nineteendo closed this Apr 28, 2024
@nineteendo nineteendo deleted the fix-os.path.abspath branch April 28, 2024 20:31
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.

None yet

1 participant