[Patches] [ python-Patches-1035255 ] Remove CoreServices / CoreFoundation dependencies in core

SourceForge.net noreply at sourceforge.net
Tue Oct 26 07:51:59 CEST 2004


Patches item #1035255, was opened at 2004-09-26 20:44
Message generated for change (Comment added) made by bcannon
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1035255&group_id=5470

Category: Macintosh
Group: Python 2.4
Status: Open
Resolution: None
Priority: 8
Submitted By: Bob Ippolito (etrepum)
Assigned to: Brett Cannon (bcannon)
Summary: Remove CoreServices / CoreFoundation dependencies in core

Initial Comment:
This patch trims down the Python core on Darwin by making it 
independent of CoreFoundation and CoreServices.  It does this by:

Changed linker flags in configure/configure.in
Removed the unused PyMac_GetAppletScriptFile
Moved the implementation of PyMac_StrError to the MacOS module
Moved the implementation of PyMac_GetFullPathname to the 
Carbon.File module

In theory this should make Python start up faster on OS X, but I 
haven't benchmarked it.

----------------------------------------------------------------------

>Comment By: Brett Cannon (bcannon)
Date: 2004-10-25 22:51

Message:
Logged In: YES 
user_id=357491

So it is undocumented, only references to it from Google point to 
Python's own CVS, and it is meant for internal use for building bundles 
that is supposed to be automated anyway.  Missing anything there? 

That sounds like enough to me to drop it since it is a hinderance to 
solving this bug.

----------------------------------------------------------------------

Comment By: Bob Ippolito (etrepum)
Date: 2004-10-25 20:35

Message:
Logged In: YES 
user_id=139309

99.5% sure nothing else uses it.  It's only useful from a bundled 
application.  I  don't know a single Python application that creates a 
bundle manually.  All published methods for creating a Python bundle use 
a stub that's either pure python (bundlebuilder, BuildApplet), or 
descendent of the Objective C stub I wrote for the PyObjC Xcode 
template (incl. py2app).

----------------------------------------------------------------------

Comment By: Brett Cannon (bcannon)
Date: 2004-10-25 19:59

Message:
Logged In: YES 
user_id=357491

OK, I have a cleaned up version of the patch ready to be checked in, but 
I realized that it changes the API by removing 
PyMac_GetAppletScriptFile().  While googling seems to suggest it is not 
used by anyone, it still changes the API.  How sure are you that no one 
uses it?

----------------------------------------------------------------------

Comment By: Bob Ippolito (etrepum)
Date: 2004-10-23 15:39

Message:
Logged In: YES 
user_id=139309

Raymond said to bump the priority.  It is definitely a bugfix not a 
feature, though.

No, it definitely does not remove all linking to CF, just from the core.

----------------------------------------------------------------------

Comment By: Brett Cannon (bcannon)
Date: 2004-10-23 13:21

Message:
Logged In: YES 
user_id=357491

Bob, did Anthony OK the priority bump?  I need to decide whether this is 
a bugfix or feature and thus go into b2.

----------------------------------------------------------------------

Comment By: Brett Cannon (bcannon)
Date: 2004-10-23 12:49

Message:
Logged In: YES 
user_id=357491

Note that this would close bug #1034277 .

Also realize that it does not remove all linking against CF; if you look in 
setup.py you will notice that a few modules (including _locale) still need 
to link against CoreFoundation.  This patch is just to remove the 
dependence on the core, not extension modules.

----------------------------------------------------------------------

Comment By: Bob Ippolito (etrepum)
Date: 2004-10-20 14:16

Message:
Logged In: YES 
user_id=139309

It certainly won't solve the test__locale issue, but it *might* make it 
intermittent depending on what you've imported ;)

----------------------------------------------------------------------

Comment By: Brett Cannon (bcannon)
Date: 2004-10-20 14:14

Message:
Logged In: YES 
user_id=357491

I will see if I can get to this over the weekend.  Might take a while since 
I am not familiar with much of the MacPython stuff beyond the UNIX-
level issues.

Until then, I am wondering if this will help solve test__locale from failing 
since the C locale should no longer be locked down since compilation 
against CF was what was causing trouble in the first place.

And I need to remember to regenerate configure with autoconf 2.58 (not 
2.57 as is included with OS X!).  DarwinPorts to the rescue.  =)

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1035255&group_id=5470


More information about the Patches mailing list