On 8 Dec 2020, at 19:59, Gregory Szorc <gregory.szorc@gmail.com> wrote:

Regarding the 3.8.7rc1 release, I wanted to raise some issues regarding macOS.

Without the changes from https://github.com/python/cpython/pull/22855 backported, attempting to build a portable binary on macOS 11 (e.g. by setting `MACOSX_DEPLOYMENT_TARGET=10.9`) results in a myriad of `warning: 'XXX' is only available on macOS 10.13 or newer [-Wunguarded-availability-new]` warnings during the build. This warning could be innocuous if there is run-time probing in place (the symbols in question are weakly linked, which is good). But if I'm reading the code correctly, run-time probing was introduced by commits like eee543722 and isn't present in 3.8.7rc1.

I don't have a machine with older macOS sitting around to test, but I'm fairly certain the lack of these patches means binaries built on macOS 11 will blow up at run-time when run on older macOS versions.

These same patches also taught CPython to build and run properly on Apple ARM hardware. I suspect some people will care about these being backported to 3.8.

We know. Backporting the relevant changes to 3.8 is taking more time than I had hoped. It doesn’t help that I’ve been busy at work and don’t have as much energy during the weekend as I’d like.

The backport to 3.9 was fairly easy because there were few changes between master and the 3.9 branch at the time. Sadly there have been conflicting changes since 3.8 was forked (in particular in posixmodule.c).

The current best practice for building binaries that work on macOS 10.9 is to build on that release (or rather, with that SDK).  That doesn’t help if you want to build Universal 2 binaries though.


I suspect people in the Python application packaging/distribution space will be significantly affected by this (I know I am with PyOxidizer). Is it worth making the backport of these patches a 3.8.7 release blocker or a trigger for a special 3.8.8 release shortly thereafter?


Ronald

Twitter / micro.blog: @ronaldoussoren
Blog: https://blog.ronaldoussoren.net/