Ned Deily <n...@python.org> added the comment:

> Is there anything more to do here?

A belated response: probably not, so I'm OK with closing this.

A quick check shows that macOS behavior has changed a bit on more recent 
releases. On current macOS Big Sur (11.6.3) and Monterey (12.2) releases, Bo's 
test:

$ python3 -c 'import os; open(os.path.relpath("/tmp/test.txt"), "w")'

now works and Ronald's touch example now fails with a somewhat more meaningful 
message:

$ touch ../../foo.txt
touch: ../../foo.txt: Read-only file system

In general, though, even on pre-APFS older macOS systems, it is still best to 
avoid or at least be very careful about using /tmp with any sort of relative 
path testing because of the linking of /tmp to /private/tmp. :(

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38295>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to