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

Drop support for Mac OS X < 10.3 module linking #87734

Closed
jmroot mannequin opened this issue Mar 20, 2021 · 8 comments
Closed

Drop support for Mac OS X < 10.3 module linking #87734

jmroot mannequin opened this issue Mar 20, 2021 · 8 comments
Labels
3.10 only security fixes build The build process and cross-build OS-mac stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@jmroot
Copy link
Mannequin

jmroot mannequin commented Mar 20, 2021

BPO 43568
Nosy @ronaldoussoren, @ned-deily, @merwok, @jmroot, @dstufft
PRs
  • bpo-43568: Drop support for MACOSX_DEPLOYMENT_TARGET < 10.3 #24941
  • bpo-43568: Drop support for MACOSX_DEPLOYMENT_TARGET < 10.3 #25827
  • [3.9] bpo-43568: Relax distutils MACOSX_DEPLOYMENT_TARGET check (GH-25827) #26001
  • 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 = None
    closed_at = <Date 2021-05-03.00:32:09.299>
    created_at = <Date 2021-03-20.13:08:22.542>
    labels = ['OS-mac', 'type-feature', 'library', '3.10', 'build']
    title = 'Drop support for Mac OS X < 10.3 module linking'
    updated_at = <Date 2021-06-03.00:25:23.333>
    user = 'https://github.com/jmroot'

    bugs.python.org fields:

    activity = <Date 2021-06-03.00:25:23.333>
    actor = 'ned.deily'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-05-03.00:32:09.299>
    closer = 'ned.deily'
    components = ['Build', 'Distutils', 'macOS']
    creation = <Date 2021-03-20.13:08:22.542>
    creator = 'jmr'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 43568
    keywords = ['patch']
    message_count = 8.0
    messages = ['389157', '390058', '392751', '392752', '393197', '393202', '393290', '394964']
    nosy_count = 5.0
    nosy_names = ['ronaldoussoren', 'ned.deily', 'eric.araujo', 'jmr', 'dstufft']
    pr_nums = ['24941', '25827', '26001']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue43568'
    versions = ['Python 3.10']

    @jmroot
    Copy link
    Mannequin Author

    jmroot mannequin commented Mar 20, 2021

    The -undefined dynamic_lookup option can only be used in LDSHARED on Mac OS X 10.3 and later. There is a fallback to explicitly linking with the framework for 10.2 and earlier. I'm pretty sure that currently supported Python versions don't build on 10.2 or older for several other reasons (I happen to know that even building on 10.5 requires a little patching.) So it's probably reasonable to just drop this code path.

    There is a closely related check in distutils, though you would only know it's related if you looked through the history as I did. It errors out if you try to build a module for an older MACOSX_DEPLOYMENT_TARGET than Python was configured with. The purpose of that is to prevent using the wrong LDSHARED flags for the target platform. If 10.2 support is dropped, that check can be removed entirely.

    I am aware that distutils is deprecated, going away, etc., and I am submitting a PR to setuptools as well. But setuptools does not yet override the stdlib distutils with its own by default, so bugs in the stdlib copy are still relevant.

    If it's decided to keep 10.2 support, the check in distutils should still be relaxed to error only if the current MDT is < 10.3 and the configured MDT is >= 10.3. I can easily put together a PR for that if needed.

    Either way, the approach taken in setuptools will depend on how LDSHARED is handled here.

    @jmroot jmroot mannequin added 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes 3.10 only security fixes build The build process and cross-build stdlib Python modules in the Lib dir OS-mac type-feature A feature request or enhancement labels Mar 20, 2021
    @terryjreedy terryjreedy removed 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes labels Mar 26, 2021
    @jmroot
    Copy link
    Mannequin Author

    jmroot mannequin commented Apr 2, 2021

    Here's the PR for pypa/distutils, which is just relaxing the MDT check since it has to work with older Python versions: pypa/distutils#36

    @ned-deily
    Copy link
    Member

    New changeset 8703178 by Ned Deily in branch 'master':
    bpo-43568: Drop support for MACOSX_DEPLOYMENT_TARGET < 10.3 (GH-25827)
    8703178

    @ned-deily
    Copy link
    Member

    Thanks for the PR! I updated it using the slightly different different changes in pypa/distutils#36 and it was just easier to open a new PR.

    @jmroot
    Copy link
    Mannequin Author

    jmroot mannequin commented May 7, 2021

    Thanks Ned. Would it be OK to backport just the distutils change to 3.9?

    @ned-deily
    Copy link
    Member

    Would it be OK to backport just the distutils change to 3.9?

    While this seems like a minor feature behavior change rather than a bug fix, it probably wouldn't cause any problems to make such a change. I don't recall this issue coming up before as a problem for users - at least not in a very long time - but, if you think a backport is called for, feel free to submit a PR. Thanks!

    @jmroot
    Copy link
    Mannequin Author

    jmroot mannequin commented May 9, 2021

    The part that is a bug is that the whole version was checked, not just the major version--you couldn't target macOS 11.0 if your Python was built for 11.3, for example. MacPorts users getting an error in that situation was the original motivation for coming up with the distutils change.

    @ned-deily
    Copy link
    Member

    New changeset 991693a by Joshua Root in branch '3.9':
    [3.9] bpo-43568: Relax distutils MACOSX_DEPLOYMENT_TARGET check (GH-25827) (GH-26001)
    991693a

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.10 only security fixes build The build process and cross-build OS-mac stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants