Skip to content
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

Remove CoreServices / CoreFoundation dependencies in core #40954

Closed
etrepum mannequin opened this issue Sep 27, 2004 · 16 comments
Closed

Remove CoreServices / CoreFoundation dependencies in core #40954

etrepum mannequin opened this issue Sep 27, 2004 · 16 comments

Comments

@etrepum
Copy link
Mannequin

etrepum mannequin commented Sep 27, 2004

BPO 1035255
Nosy @brettcannon, @rhettinger, @etrepum
Files
  • python-2.4-fewer-deps.patch.gz
  • remove_CF_dependency.diff: Cleanup of Bob's patch; need to run autoconf after patching
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/brettcannon'
    closed_at = <Date 2004-11-05.07:03:34.000>
    created_at = <Date 2004-09-27.03:44:54.000>
    labels = ['OS-mac', 'release-blocker']
    title = 'Remove CoreServices / CoreFoundation dependencies in core'
    updated_at = <Date 2004-11-05.07:03:34.000>
    user = 'https://github.com/etrepum'

    bugs.python.org fields:

    activity = <Date 2004-11-05.07:03:34.000>
    actor = 'rhettinger'
    assignee = 'brett.cannon'
    closed = True
    closed_date = None
    closer = None
    components = ['macOS']
    creation = <Date 2004-09-27.03:44:54.000>
    creator = 'bob.ippolito'
    dependencies = []
    files = ['6266', '6267']
    hgrepos = []
    issue_num = 1035255
    keywords = ['patch']
    message_count = 16.0
    messages = ['46941', '46942', '46943', '46944', '46945', '46946', '46947', '46948', '46949', '46950', '46951', '46952', '46953', '46954', '46955', '46956']
    nosy_count = 4.0
    nosy_names = ['brett.cannon', 'rhettinger', 'jvr', 'bob.ippolito']
    pr_nums = []
    priority = 'release blocker'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue1035255'
    versions = ['Python 2.4']

    @etrepum
    Copy link
    Mannequin Author

    etrepum mannequin commented Sep 27, 2004

    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.

    @etrepum etrepum mannequin closed this as completed Sep 27, 2004
    @etrepum etrepum mannequin added the release-blocker label Sep 27, 2004
    @etrepum etrepum mannequin assigned brettcannon Sep 27, 2004
    @etrepum etrepum mannequin added the OS-mac label Sep 27, 2004
    @etrepum etrepum mannequin closed this as completed Sep 27, 2004
    @etrepum etrepum mannequin added the release-blocker label Sep 27, 2004
    @etrepum etrepum mannequin assigned brettcannon Sep 27, 2004
    @etrepum etrepum mannequin added the OS-mac label Sep 27, 2004
    @brettcannon
    Copy link
    Member

    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. =)

    @etrepum
    Copy link
    Mannequin Author

    etrepum mannequin commented Oct 20, 2004

    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 ;)

    @brettcannon
    Copy link
    Member

    Logged In: YES
    user_id=357491

    Note that this would close bug bpo-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.

    @brettcannon
    Copy link
    Member

    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.

    @etrepum
    Copy link
    Mannequin Author

    etrepum mannequin commented Oct 23, 2004

    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.

    @brettcannon
    Copy link
    Member

    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?

    @etrepum
    Copy link
    Mannequin Author

    etrepum mannequin commented Oct 26, 2004

    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).

    @brettcannon
    Copy link
    Member

    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.

    @etrepum
    Copy link
    Mannequin Author

    etrepum mannequin commented Oct 26, 2004

    Logged In: YES
    user_id=139309

    Mostly correct. The function is intended to be used from
    the executable stub of a bundled python application. No
    known application uses a custom stub, and no stub from an
    automated tool uses this function.

    @brettcannon
    Copy link
    Member

    Logged In: YES
    user_id=357491

    I am waiting to hear from Anthony on an email I sent him about whether
    he is okay on me applying this for b2. Otherwise the patch is all ready
    to be checked in.

    @brettcannon
    Copy link
    Member

    Logged In: YES
    user_id=357491

    OK, I didn't hear from Anthony and he just announced that b2 is going to
    be cut soon (3.5 hours from now) so I am trying to get clearance to
    deprecate PyMac_GetAppletScriptFile() in 2.4 so that this can go in first
    thing in 2.5 .

    @jvr
    Copy link
    Mannequin

    jvr mannequin commented Nov 2, 2004

    Logged In: YES
    user_id=92689

    It's Jack's call, but my opinion is that just ripping it out is fine,
    even if it's after b2. No need to go through a whole deprecation
    phase.

    @brettcannon
    Copy link
    Member

    Logged In: YES
    user_id=357491

    Where is Jack? Have not heard from him in ages.

    I have uploaded my version of the patch so that if someone decided to
    step over me and apply the patch they can.

    @etrepum
    Copy link
    Mannequin Author

    etrepum mannequin commented Nov 5, 2004

    Logged In: YES
    user_id=139309

    he's been really busy.. he probably isn't going to many any noise here

    @rhettinger
    Copy link
    Contributor

    Logged In: YES
    user_id=80475

    Applied.

    Bob, thx for the patch.
    Brett, thx for testing.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants