#6 Don't call deprecated FSSpec functions on Mac

Unstable
closed-fixed
nobody
None
5
2013-12-10
2011-02-12
Anonymous
No

Various modules use deprecated and discontinued Mac OS APIs such as FSpOpenResFile. Change these to use FSRef ones instead.

Unfortunately, some of these functions are missing in 64-bit Mac Python, probably because Carbon itself isn't fully supported on 64-bit. I wasn't able to find a way to test this on my 10.6 system, so some functions still don't work (the ones that create resource files).

Discussion

  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2011-02-12

    Change FSSpec APIs to FSRef ones

     
  • Paul Wise

    Paul Wise - 2011-02-13

    What happens on systems without these functions? Maybe you could adjust the patch to work on systems with both functions.

     
  • Paul Wise

    Paul Wise - 2011-02-13

    By that I mean either the new or old functions, trying the old ones if the new ones are not available.

     
  • Paul Wise

    Paul Wise - 2011-03-28

    Well I meant the issue on 64-bit platforms. Wouldn't it be best to fall back on the older APIs there?

     
  • Neil Mayhew

    Neil Mayhew - 2012-02-04

    Sorry, I never saw your final comment until now.

    I think we are at cross-purposes here. The "new" FSRef APIs are in every Mac OS system, both 32- and 64-bit, and have been for over ten years, so they will always be available and there's no need to test for their existence. In addition, the old APIs became deprecated over ten years ago, so we definitely don't want them cluttering up the source code. If someone wants to run fonttools on a really old system, they will encounter a multitude of problems beyond this one, so there's not much point in trying to support that.

    I don't think the patch needs to be changed. However, I'm willing to look into if you still don't want to accept the patch as-is.

     
  • Neil Mayhew

    Neil Mayhew - 2012-02-21

    I've looked at this a bit more, and I realise my statement about missing functions in the issue description was confusing, and even confused me 12 months after I wrote it.

    So I've done some further testing, and I'm in the process of reworking the changes that are necessary for making fonttools work properly on modern Mac systems, while still preserving the ability to run on older systems. (I have a PowerPC system dating from 2005 running Mac OS 10.4 that I'm using to test backwards compatibility.)

    I'll post a new version of the patch soon, so please don't integrate it just yet.

     
  • Ben Kiel

    Ben Kiel - 2012-03-07

    This has been fixed in the delft-sprint-2012 branch. Outside testing to see if this resolves the issue would be most helpful.

     
  • Paul Wise

    Paul Wise - 2013-06-22
    • status: open --> closed-fixed
    • Group: --> Unstable (example)
     
  • Paul Wise

    Paul Wise - 2013-06-22

    Now fixed in SVN trunk, soon to be released.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks