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: Drop support for Mac OS X < 10.3 module linking
Type: enhancement Stage: resolved
Components: Build, Distutils, macOS Versions: Python 3.10
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: dstufft, eric.araujo, jmr, ned.deily, ronaldoussoren
Priority: normal Keywords: patch

Created on 2021-03-20 13:08 by jmr, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 24941 closed jmr, 2021-03-20 13:56
PR 25827 merged ned.deily, 2021-05-02 23:53
PR 26001 merged jmr, 2021-05-09 01:08
Messages (8)
msg389157 - (view) Author: Joshua Root (jmr) * Date: 2021-03-20 13:08
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.
msg390058 - (view) Author: Joshua Root (jmr) * Date: 2021-04-02 12:49
Here's the PR for pypa/distutils, which is just relaxing the MDT check since it has to work with older Python versions: https://github.com/pypa/distutils/pull/36
msg392751 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2021-05-03 00:28
New changeset 870317825822c856490a32eee037fec8057690b1 by Ned Deily in branch 'master':
bpo-43568: Drop support for MACOSX_DEPLOYMENT_TARGET < 10.3 (GH-25827)
https://github.com/python/cpython/commit/870317825822c856490a32eee037fec8057690b1
msg392752 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2021-05-03 00:32
Thanks for the PR!  I updated it using the slightly different different changes in https://github.com/pypa/distutils/pull/36 and it was just easier to open a new PR.
msg393197 - (view) Author: Joshua Root (jmr) * Date: 2021-05-07 18:16
Thanks Ned. Would it be OK to backport just the distutils change to 3.9?
msg393202 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2021-05-07 18:43
> 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!
msg393290 - (view) Author: Joshua Root (jmr) * Date: 2021-05-09 00:21
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.
msg394964 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2021-06-03 00:25
New changeset 991693a217363243b0bd33887852d6b3959b99a1 by Joshua Root in branch '3.9':
[3.9] bpo-43568: Relax distutils MACOSX_DEPLOYMENT_TARGET check (GH-25827) (GH-26001)
https://github.com/python/cpython/commit/991693a217363243b0bd33887852d6b3959b99a1
History
Date User Action Args
2022-04-11 14:59:43adminsetgithub: 87734
2021-06-03 00:25:23ned.deilysetmessages: + msg394964
2021-05-09 01:08:20jmrsetpull_requests: + pull_request24654
2021-05-09 00:21:33jmrsetmessages: + msg393290
2021-05-07 18:43:45ned.deilysetmessages: + msg393202
2021-05-07 18:16:37jmrsetmessages: + msg393197
2021-05-03 00:32:09ned.deilysetstatus: open -> closed
resolution: fixed
messages: + msg392752

stage: patch review -> resolved
2021-05-03 00:28:50ned.deilysetmessages: + msg392751
2021-05-02 23:53:26ned.deilysetpull_requests: + pull_request24515
2021-04-02 12:49:06jmrsetmessages: + msg390058
2021-03-26 18:48:57terry.reedysetversions: - Python 3.6, Python 3.7, Python 3.8, Python 3.9
2021-03-20 13:56:41jmrsetkeywords: + patch
stage: patch review
pull_requests: + pull_request23702
2021-03-20 13:08:22jmrcreate