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-114545: [Lib/tempfile.py] mkdtemp - canonicalise directory name #114691

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SamuelMarks
Copy link
Contributor

@SamuelMarks SamuelMarks commented Jan 28, 2024

On macOS—and probably other operating systems—the temporary directory /tmp is not canonical. This causes weird issues in ones codebase, e.g., /var/folders != /private/var/folders. This additional function call solves the problem.

PS: I'm not sure if the os.path.abspath call can be removed…

PPS: See #114545 for discussion; also see nodejs/node/issues/11422 for when this was discussed for Node.js.

…t/test_tempfile.py] Add test for `mkdtemp` creating a `realpath`
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.

None yet

1 participant