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

Add support for Python 3.14 on macOS and GNU Linux #443

Merged
merged 21 commits into from
Dec 20, 2024
Merged

Add support for Python 3.14 on macOS and GNU Linux #443

merged 21 commits into from
Dec 20, 2024

Conversation

zanieb
Copy link
Member

@zanieb zanieb commented Dec 18, 2024

The biggest change seems to be around blake2's implementation.

I figure I'll follow-up on musl Linux separately.

@zanieb zanieb added platform:linux Specific to the Linux platform python:3.14 labels Dec 18, 2024
@zanieb zanieb changed the title Add support for Python 3.13 on GNU Linux Add support for Python 3.14 on GNU Linux Dec 18, 2024
@zanieb

This comment was marked as outdated.

@zanieb zanieb added the platform:darwin Specific to the macOS platform label Dec 18, 2024
@zanieb zanieb changed the title Add support for Python 3.14 on GNU Linux Add support for Python 3.14 on macOS and GNU Linux Dec 18, 2024
@zanieb zanieb marked this pull request as ready for review December 19, 2024 00:36
@zanieb

This comment was marked as outdated.

@zanieb
Copy link
Member Author

zanieb commented Dec 19, 2024

Investigating the removal of blake2 in python/cpython#99108 — not yet sure what I need to do to make the new hash implementation available. python/cpython#119316 is pretty helpful. I got this passing on macOS locally — we'll see if it works for Linux too.

@zanieb zanieb marked this pull request as draft December 19, 2024 05:27
@@ -511,7 +511,10 @@ def derive_setup_local(
)

if target_match and (python_min_match and python_max_match):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes in this file in support of an ergonomic expression in d0521dd

@zanieb
Copy link
Member Author

zanieb commented Dec 19, 2024

There are some problems on the x86_64 cross-compiles, seemingly due to the macOS SDK version, which we'll probably just want to bump to match the upstream

cpython-3.14> ./Modules/_hacl/Hacl_Hash_Blake2s_Simd128.c:523:40: error: 'aligned_alloc' is only available on macOS 10.15 or newer [-Werror,-Wunguarded-availability-new]
cpython-3.14>   523 |     (Lib_IntVector_Intrinsics_vec128 *)KRML_ALIGNED_MALLOC(16,
cpython-3.14>       |                                        ^~~~~~~~~~~~~~~~~~~~~~~
cpython-3.14>   524 |       sizeof (Lib_IntVector_Intrinsics_vec128) * 4U);
cpython-3.14>       |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cpython-3.14> ./Modules/_hacl/include/krml/internal/target.h:137:39: note: expanded from macro 'KRML_ALIGNED_MALLOC'
cpython-3.14>   137 | #    define KRML_ALIGNED_MALLOC(X, Y) aligned_alloc(X, Y)
cpython-3.14>       |                                       ^~~~~~~~~~~~~

Though the upstream only bumped to 10.13 in Python 3.13

The minimum supported macOS version was changed from 10.9 to 10.13 (High Sierra). Older macOS versions will not be supported going forward

Stashing a ref to python/cpython#123748 (comment) which may be helpful

@zanieb

This comment was marked as outdated.

@indygreg
Copy link
Collaborator

If upstream bumped the minimum macOS version from 10.9, we should follow. (10.9 is ancient!)

In the past, upstream has failed to conditionally guard symbol usage from newer SDK versions. This is one of the reasons I added the compiler flag to turn unguarded availability warnings into hard errors.

IMO upstream should validate the minimum SDK is no less than supported at configure time. They should also turn unguarded availability warnings into errors. I'm unsure if they do either.

@zanieb
Copy link
Member Author

zanieb commented Dec 19, 2024

If upstream bumped the minimum macOS version from 10.9, we should follow. (10.9 is ancient!)

They bumped to 10.13 for the macOS installer but I believe older versions are still supported when building from source.

I'm tempted to bump to 10.15 regardless, but... it sounds like we're catching legitimate mistakes upstream here.

See zanieb#6 (comment) for similar experience with the 3.13 builds.

In the past, upstream has failed to conditionally guard symbol usage from newer SDK versions. This is one of the reasons I added the compiler flag to turn unguarded availability warnings into hard errors.

Yeah that makes sense, I'll investigate upstream.

@zanieb
Copy link
Member Author

zanieb commented Dec 19, 2024

Okay now the macOS x86_64 builds are just failing validation with

error: wanted platform tag macosx-10.9-x86_64; got darwin-x86_64

And the Linux v2/v3/v4 PGO builds are failing in the test suite with

test_datetime failed

@zanieb
Copy link
Member Author

zanieb commented Dec 19, 2024

And.. after fighting the test suite to let me get verbose output on PGO failures

cpython-3.14> test_system_transitions (test.datetimetester.ZoneInfoTest_Fast.test_system_transitions) ... ok
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDate_Fast.test_strftime_y2k) (year=1, specifier='F')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '1-01-01' != '0001-01-01'
cpython-3.14> - 1-01-01
cpython-3.14> + 0001-01-01
cpython-3.14> ? +++
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDate_Fast.test_strftime_y2k) (year=1, specifier='C')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '0' != '00'
cpython-3.14> - 0
cpython-3.14> + 00
cpython-3.14> ? +
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDate_Fast.test_strftime_y2k) (year=48, specifier='F')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '48-01-01' != '0048-01-01'
cpython-3.14> - 48-01-01
cpython-3.14> + 0048-01-01
cpython-3.14> ? ++
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDate_Fast.test_strftime_y2k) (year=48, specifier='C')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '0' != '00'
cpython-3.14> - 0
cpython-3.14> + 00
cpython-3.14> ? +
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDate_Fast.test_strftime_y2k) (year=70, specifier='F')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '70-01-01' != '0070-01-01'
cpython-3.14> - 70-01-01
cpython-3.14> + 0070-01-01
cpython-3.14> ? ++
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDate_Fast.test_strftime_y2k) (year=70, specifier='C')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '0' != '00'
cpython-3.14> - 0
cpython-3.14> + 00
cpython-3.14> ? +
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDate_Fast.test_strftime_y2k) (year=99, specifier='F')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '99-01-01' != '0099-01-01'
cpython-3.14> - 99-01-01
cpython-3.14> + 0099-01-01
cpython-3.14> ? ++
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDate_Fast.test_strftime_y2k) (year=99, specifier='C')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '0' != '00'
cpython-3.14> - 0
cpython-3.14> + 00
cpython-3.14> ? +
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDate_Fast.test_strftime_y2k) (year=99, specifier='F')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '99-01-01' != '0099-01-01'
cpython-3.14> - 99-01-01
cpython-3.14> + 0099-01-01
cpython-3.14> ? ++
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDate_Fast.test_strftime_y2k) (year=99, specifier='C')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '0' != '00'
cpython-3.14> - 0
cpython-3.14> + 00
cpython-3.14> ? +
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDate_Fast.test_strftime_y2k) (year=999, specifier='F')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '999-01-01' != '0999-01-01'
cpython-3.14> - 999-01-01
cpython-3.14> + 0999-01-01
cpython-3.14> ? +
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDate_Fast.test_strftime_y2k) (year=999, specifier='C')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '9' != '09'
cpython-3.14> - 9
cpython-3.14> + 09
cpython-3.14> ? +
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDateTime_Fast.test_strftime_y2k) (year=1, specifier='F')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '1-01-01' != '0001-01-01'
cpython-3.14> - 1-01-01
cpython-3.14> + 0001-01-01
cpython-3.14> ? +++
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDateTime_Fast.test_strftime_y2k) (year=1, specifier='C')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '0' != '00'
cpython-3.14> - 0
cpython-3.14> + 00
cpython-3.14> ? +
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDateTime_Fast.test_strftime_y2k) (year=48, specifier='F')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '48-01-01' != '0048-01-01'
cpython-3.14> - 48-01-01
cpython-3.14> + 0048-01-01
cpython-3.14> ? ++
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDateTime_Fast.test_strftime_y2k) (year=48, specifier='C')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '0' != '00'
cpython-3.14> - 0
cpython-3.14> + 00
cpython-3.14> ? +
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDateTime_Fast.test_strftime_y2k) (year=70, specifier='F')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '70-01-01' != '0070-01-01'
cpython-3.14> - 70-01-01
cpython-3.14> + 0070-01-01
cpython-3.14> ? ++
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDateTime_Fast.test_strftime_y2k) (year=70, specifier='C')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '0' != '00'
cpython-3.14> - 0
cpython-3.14> + 00
cpython-3.14> ? +
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDateTime_Fast.test_strftime_y2k) (year=99, specifier='F')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '99-01-01' != '0099-01-01'
cpython-3.14> - 99-01-01
cpython-3.14> + 0099-01-01
cpython-3.14> ? ++
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDateTime_Fast.test_strftime_y2k) (year=99, specifier='C')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '0' != '00'
cpython-3.14> - 0
cpython-3.14> + 00
cpython-3.14> ? +
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDateTime_Fast.test_strftime_y2k) (year=99, specifier='F')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '99-01-01' != '0099-01-01'
cpython-3.14> - 99-01-01
cpython-3.14> + 0099-01-01
cpython-3.14> ? ++
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDateTime_Fast.test_strftime_y2k) (year=99, specifier='C')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '0' != '00'
cpython-3.14> - 0
cpython-3.14> + 00
cpython-3.14> ? +
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDateTime_Fast.test_strftime_y2k) (year=999, specifier='F')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '999-01-01' != '0999-01-01'
cpython-3.14> - 999-01-01
cpython-3.14> + 0999-01-01
cpython-3.14> ? +
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDateTime_Fast.test_strftime_y2k) (year=999, specifier='C')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '9' != '09'
cpython-3.14> - 9
cpython-3.14> + 09
cpython-3.14> ? +
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDateTimeTZ_Fast.test_strftime_y2k) (year=1, specifier='F')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '1-01-01' != '0001-01-01'
cpython-3.14> - 1-01-01
cpython-3.14> + 0001-01-01
cpython-3.14> ? +++
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDateTimeTZ_Fast.test_strftime_y2k) (year=1, specifier='C')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '0' != '00'
cpython-3.14> - 0
cpython-3.14> + 00
cpython-3.14> ? +
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDateTimeTZ_Fast.test_strftime_y2k) (year=48, specifier='F')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '48-01-01' != '0048-01-01'
cpython-3.14> - 48-01-01
cpython-3.14> + 0048-01-01
cpython-3.14> ? ++
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDateTimeTZ_Fast.test_strftime_y2k) (year=48, specifier='C')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '0' != '00'
cpython-3.14> - 0
cpython-3.14> + 00
cpython-3.14> ? +
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDateTimeTZ_Fast.test_strftime_y2k) (year=70, specifier='F')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '70-01-01' != '0070-01-01'
cpython-3.14> - 70-01-01
cpython-3.14> + 0070-01-01
cpython-3.14> ? ++
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDateTimeTZ_Fast.test_strftime_y2k) (year=70, specifier='C')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '0' != '00'
cpython-3.14> - 0
cpython-3.14> + 00
cpython-3.14> ? +
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDateTimeTZ_Fast.test_strftime_y2k) (year=99, specifier='F')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '99-01-01' != '0099-01-01'
cpython-3.14> - 99-01-01
cpython-3.14> + 0099-01-01
cpython-3.14> ? ++
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDateTimeTZ_Fast.test_strftime_y2k) (year=99, specifier='C')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '0' != '00'
cpython-3.14> - 0
cpython-3.14> + 00
cpython-3.14> ? +
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDateTimeTZ_Fast.test_strftime_y2k) (year=99, specifier='F')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '99-01-01' != '0099-01-01'
cpython-3.14> - 99-01-01
cpython-3.14> + 0099-01-01
cpython-3.14> ? ++
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDateTimeTZ_Fast.test_strftime_y2k) (year=99, specifier='C')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '0' != '00'
cpython-3.14> - 0
cpython-3.14> + 00
cpython-3.14> ? +
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDateTimeTZ_Fast.test_strftime_y2k) (year=999, specifier='F')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '999-01-01' != '0999-01-01'
cpython-3.14> - 999-01-01
cpython-3.14> + 0999-01-01
cpython-3.14> ? +
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestDateTimeTZ_Fast.test_strftime_y2k) (year=999, specifier='C')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '9' != '09'
cpython-3.14> - 9
cpython-3.14> + 09
cpython-3.14> ? +
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestSubclassDateTime_Fast.test_strftime_y2k) (year=1, specifier='F')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '1-01-01' != '0001-01-01'
cpython-3.14> - 1-01-01
cpython-3.14> + 0001-01-01
cpython-3.14> ? +++
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestSubclassDateTime_Fast.test_strftime_y2k) (year=1, specifier='C')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '0' != '00'
cpython-3.14> - 0
cpython-3.14> + 00
cpython-3.14> ? +
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestSubclassDateTime_Fast.test_strftime_y2k) (year=48, specifier='F')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '48-01-01' != '0048-01-01'
cpython-3.14> - 48-01-01
cpython-3.14> + 0048-01-01
cpython-3.14> ? ++
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestSubclassDateTime_Fast.test_strftime_y2k) (year=48, specifier='C')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '0' != '00'
cpython-3.14> - 0
cpython-3.14> + 00
cpython-3.14> ? +
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestSubclassDateTime_Fast.test_strftime_y2k) (year=70, specifier='F')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '70-01-01' != '0070-01-01'
cpython-3.14> - 70-01-01
cpython-3.14> + 0070-01-01
cpython-3.14> ? ++
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestSubclassDateTime_Fast.test_strftime_y2k) (year=70, specifier='C')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '0' != '00'
cpython-3.14> - 0
cpython-3.14> + 00
cpython-3.14> ? +
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestSubclassDateTime_Fast.test_strftime_y2k) (year=99, specifier='F')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '99-01-01' != '0099-01-01'
cpython-3.14> - 99-01-01
cpython-3.14> + 0099-01-01
cpython-3.14> ? ++
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestSubclassDateTime_Fast.test_strftime_y2k) (year=99, specifier='C')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '0' != '00'
cpython-3.14> - 0
cpython-3.14> + 00
cpython-3.14> ? +
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestSubclassDateTime_Fast.test_strftime_y2k) (year=99, specifier='F')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '99-01-01' != '0099-01-01'
cpython-3.14> - 99-01-01
cpython-3.14> + 0099-01-01
cpython-3.14> ? ++
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestSubclassDateTime_Fast.test_strftime_y2k) (year=99, specifier='C')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '0' != '00'
cpython-3.14> - 0
cpython-3.14> + 00
cpython-3.14> ? +
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestSubclassDateTi
cpython-3.14> me_Fast.test_strftime_y2k) (year=999, specifier='F')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '999-01-01' != '0999-01-01'
cpython-3.14> - 999-01-01
cpython-3.14> + 0999-01-01
cpython-3.14> ? +
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ======================================================================
cpython-3.14> FAIL: test_strftime_y2k (test.datetimetester.TestSubclassDateTime_Fast.test_strftime_y2k) (year=999, specifier='C')
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Traceback (most recent call last):
cpython-3.14>   File "/build/Python-3.14.0a3/Lib/test/datetimetester.py", line 1814, in test_strftime_y2k
cpython-3.14>     self.assertEqual(d.strftime(f"%{specifier}"), expected)
cpython-3.14>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpython-3.14> AssertionError: '9' != '09'
cpython-3.14> - 9
cpython-3.14> + 09
cpython-3.14> ? +
cpython-3.14> 
cpython-3.14> 
cpython-3.14> ----------------------------------------------------------------------
cpython-3.14> Ran 1058 tests in 3.495s
cpython-3.14> 
cpython-3.14> FAILED (failures=48, skipped=52)
cpython-3.14> test test_datetime failed

I think we have to skip this test for now, ref python/cpython#128104

@zanieb zanieb marked this pull request as ready for review December 19, 2024 22:33
Comment on lines 49 to 64
+# The _PYTHON_HOST_PLATFORM environment variable is used to
+# override the platform name in distutils and sysconfig when
+# cross-compiling. On Apple, the platform name expansion logic
+# is non-trivial, including renaming MACHDEP=darwin to macosx
+# and including the deployment target (or current OS version if
+# not set). Here we always force an override based on the target
+# triple. We do this in all build configurations because historically
+# the automatic resolution has been brittle.
+case "$host" in
+aarch64-apple-darwin*)
+ _PYTHON_HOST_PLATFORM="macosx-${MACOSX_DEPLOYMENT_TARGET}-arm64"
+ ;;
+x86_64-apple-darwin*)
+ _PYTHON_HOST_PLATFORM="macosx-${MACOSX_DEPLOYMENT_TARGET}-x86_64"
+ ;;
+esac
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to remove this, but we still need it to avoid sys.platform() returning darwin — we assert that it matches this format in our validation.

Comment on lines -565 to +575
- '-mmacosx-version-min=10.9'
- '-mmacosx-version-min=10.15'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine, but we should also probably fix the upstream to use weak symbols here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See

We could revert this for the next alpha, if we wanted.

This is currently unconditional and applies to other CPython versions.

I think it's fine regardless.

Comment on lines +74 to +78
if (
filters.get("libc")
and entry.get("libc")
and entry["libc"] not in filters["libc"]
):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a bug that disabled the macOS builds in the matrix if libc labels were requested.

@@ -549,7 +552,11 @@ def derive_setup_local(
)

if target_match and (python_min_match and python_max_match):
line += f" -I{entry['path']}"
# TODO: Change to `include` and drop support for `path`
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the fence on this, but think we can just revisit it holistically separately.

Comment on lines +572 to +584
if targets := entry.get("targets", []):
target_match = any(re.match(p, target_triple) for p in targets)
else:
target_match = True

python_min_match = meets_python_minimum_version(
python_version, entry.get("minimum-python-version", "1.0")
)
python_max_match = meets_python_maximum_version(
python_version, entry.get("maximum-python-version", "100.0")
)

if target_match and (python_min_match and python_max_match):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copied from other cases where we support Python versions here.

@zanieb zanieb merged commit 01cfc3b into main Dec 20, 2024
35 checks passed
@zanieb zanieb deleted the zb/314-gnu branch December 20, 2024 19:50
zanieb added a commit that referenced this pull request Dec 20, 2024
Linux cross-compiles are failing on `main` @
01cfc3b
due to `readelf` missing. We drop this check as part of the Apple cross
compilation patch but since #443 we no longer apply that patch on Linux.
This moves the patch out into a separate file and applies it when
cross-compiling on Python <=3.12 where it is relevant.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch:x86_64 libc:gnu platform:darwin Specific to the macOS platform platform:linux Specific to the Linux platform python:3.14
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants