-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
base: main
Are you sure you want to change the base?
gh-114545: [Lib/tempfile.py] mkdtemp
- canonicalise directory name
#114691
Conversation
…t/test_tempfile.py] Add test for `mkdtemp` creating a `realpath`
I found a strange thing. After this change, the test_tempfile failed on my machine:
I see that the cpython/Lib/test/test_tempfile.py Line 99 in c87233f
tempfile.mkdtemp is in the temp directory, which is determined by tempfile.gettempdir .
On my machine, the result of I'm using a Intel mac with OS version 12.7.3. |
The
The macOS CI failed with the same error as the previous run, despite appearing unrelated to the change. However, I suspect that a connection might not be easily detectable. |
Marking this as draft, as it is work in progress. |
Oh interesting; this just hit #93852 |
…un_realpath` around ; [Lib/multiprocessing/util.py] Resolve python#93852
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.
mkdtemp
- canonicalise directory name #114545