This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: macfs.FSSpec and Carbon.File.FSSpec fail for "new" files
Type: Stage:
Components: macOS Versions: Python 2.3
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: jackjansen Nosy List: jackjansen, jvr, nnorwitz
Priority: low Keywords:

Created on 2002-07-24 13:35 by jvr, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Messages (7)
msg11683 - (view) Author: Just van Rossum (jvr) * (Python triager) Date: 2002-07-24 13:35
In the mach-o version of Python on MacOSX, the macfs.FSSpec() 
library function fails for files that don't yet exist.

The problem is caused by (internally) using an FSRef to construct 
the FSSpec: FSRefs can't hold references to non-existent files, 
whereas FSSpecs can.
msg11684 - (view) Author: Just van Rossum (jvr) * (Python triager) Date: 2002-07-29 21:56
Logged In: YES 
user_id=92689

This bug also cause macostools.copy() to fail, making the breakage 
larger than I thought :-(
msg11685 - (view) Author: Jack Jansen (jackjansen) * (Python committer) Date: 2002-08-03 21:01
Logged In: YES 
user_id=45365

As the workaround is going to be both difficult to implement and incomplete I'm tempted to punt on this one. Difficult because we have to split the path in C, and we have to do /: substitutions on the last component; incomplete because we cannot cater for utf8/macroman differences and filenames > 32 characters.

If we punt on this we should make sure we phase out using fsspec's in the standard library in favor of the fsref calls.

Do you think this is an acceptable solution? How much work would it be?
msg11686 - (view) Author: Jack Jansen (jackjansen) * (Python committer) Date: 2002-08-05 21:54
Logged In: YES 
user_id=45365

macostools.copy() has been fixed in rev. 1.16. mkalias()
still has the problem, though.
msg11687 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-02-07 22:20
Logged In: YES 
user_id=33168

Can this be closed since macfs has been removed?
msg11688 - (view) Author: Jack Jansen (jackjansen) * (Python committer) Date: 2003-02-08 23:18
Logged In: YES 
user_id=45365

No, the problem still exists, also in Carbon.File, and probably is solvable. It has become less urgent, though, as FSSpecs are phased out in the core.
msg11689 - (view) Author: Jack Jansen (jackjansen) * (Python committer) Date: 2003-02-24 16:47
Logged In: YES 
user_id=45365

Macfs is no longer used in the core. Anyone running into this problem in user code will have to create a workaround based on constructing the FSSpec by hand (i.e. with the (vrefnum, dirid, filename) interface).
History
Date User Action Args
2022-04-10 16:05:31adminsetgithub: 36924
2002-07-24 13:35:37jvrcreate