Skip to content

gh-145465: Move Mac dir into Platforms#145483

Open
smontanaro wants to merge 2 commits intopython:mainfrom
smontanaro:plat-mac
Open

gh-145465: Move Mac dir into Platforms#145483
smontanaro wants to merge 2 commits intopython:mainfrom
smontanaro:plat-mac

Conversation

@smontanaro
Copy link
Contributor

@smontanaro smontanaro commented Mar 3, 2026

First stab at moving Mac dir to Platforms/Mac. I did the easy stuff. ;-) I am not at all a Mac framework person though, so some tests are failing, the errors seemingly related to framework issues. I suspect these will probably be relatively shallow fixes for someone better versed in framework builds.

Configured and built like so:

git clean -fdx
./configure --enable-framework
make clean
make -j test

Resulting in these errors:

7 tests failed:
    test.test_asyncio.test_subprocess test.test_os.test_os
    test_frame_pointer_unwind test_popen test_subprocess test_venv
    test_zipfile

464 tests OK.

0:02:56 load avg: 4.94 Re-running 7 failed tests in verbose mode in subprocesses
0:02:56 load avg: 4.94 Run 7 tests in parallel using 7 worker processes (timeout: 10 min, worker timeout: 15 min)
0:02:56 load avg: 4.94 [1/7/1] test_popen failed (1 error)
Re-running test_popen in verbose mode (matching: test_popen)
test_contextmanager (test.test_popen.PopenTest.test_contextmanager) ... ok
test_iterating (test.test_popen.PopenTest.test_iterating) ... ok
test_keywords (test.test_popen.PopenTest.test_keywords) ... ok
test_popen (test.test_popen.PopenTest.test_popen) ... dyld[56223]: Library not loaded: /Library/Frameworks/Python.framework/Versions/3.15/Python
  Referenced from: <138B4888-CC6D-3D8D-A2F7-FD2D28865CED> /Users/skip/src/python/cpython/python.exe
  Reason: tried: '/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file), '/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file)
ERROR
test_return_code (test.test_popen.PopenTest.test_return_code) ... ok

======================================================================
ERROR: test_popen (test.test_popen.PopenTest.test_popen)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/skip/src/python/cpython/Lib/test/test_popen.py", line 35, in test_popen
    self._do_test_commandline(
    ~~~~~~~~~~~~~~~~~~~~~~~~~^
        "foo bar",
        ^^^^^^^^^^
        ["foo", "bar"]
        ^^^^^^^^^^^^^^
    )
    ^
  File "/Users/skip/src/python/cpython/Lib/test/test_popen.py", line 30, in _do_test_commandline
    got = eval(data)[1:] # strip off argv[0]
          ~~~~^^^^^^
  File "<string>", line 0
    
SyntaxError: invalid syntax

----------------------------------------------------------------------
Ran 5 tests in 0.062s

FAILED (errors=1)
test test_popen failed
0:02:56 load avg: 4.94 [2/7/2] test.test_asyncio.test_subprocess failed (1 failure)
Re-running test.test_asyncio.test_subprocess in verbose mode (matching: test_create_subprocess_env_shell)
test_create_subprocess_env_shell (test.test_asyncio.test_subprocess.SubprocessPidfdWatcherTests.test_create_subprocess_env_shell) ... skipped 'operating system does not support pidfds'
test_create_subprocess_env_shell (test.test_asyncio.test_subprocess.SubprocessThreadedWatcherTests.test_create_subprocess_env_shell) ... dyld[56226]: Library not loaded: /Library/Frameworks/Python.framework/Versions/3.15/Python
  Referenced from: <138B4888-CC6D-3D8D-A2F7-FD2D28865CED> /Users/skip/src/python/cpython/python.exe
  Reason: tried: '/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file), '/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file)
FAIL

======================================================================
FAIL: test_create_subprocess_env_shell (test.test_asyncio.test_subprocess.SubprocessThreadedWatcherTests.test_create_subprocess_env_shell)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/skip/src/python/cpython/Lib/test/test_asyncio/test_subprocess.py", line 753, in test_create_subprocess_env_shell
    self.loop.run_until_complete(self.check_stdout_output(main(), b'bar'))
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/skip/src/python/cpython/Lib/asyncio/base_events.py", line 719, in run_until_complete
    return future.result()
           ~~~~~~~~~~~~~^^
  File "/Users/skip/src/python/cpython/Lib/test/test_asyncio/test_subprocess.py", line 734, in check_stdout_output
    self.assertEqual(stdout, output)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
AssertionError: b'' != b'bar'

----------------------------------------------------------------------
Ran 2 tests in 0.013s

FAILED (failures=1, skipped=1)
test test.test_asyncio.test_subprocess failed
0:02:56 load avg: 4.94 [3/7/3] test_frame_pointer_unwind failed (1 failure)
Re-running test_frame_pointer_unwind in verbose mode (matching: test_manual_unwind_respects_frame_pointers)
test_manual_unwind_respects_frame_pointers (test.test_frame_pointer_unwind.FramePointerUnwindTests.test_manual_unwind_respects_frame_pointers) ... #00 0x103338c1c -> other
#01 0x10348156c -> other
#02 0x103483e0c -> other
#03 0x103481024 -> other
#04 0x103338c1c -> other
#05 0x1034819d0 -> other
#06 0x10348471c -> other
#07 0x103481024 -> other
#08 0x103338c1c -> other
#09 0x1034819d0 -> other
#10 0x10348471c -> other
#11 0x103481024 -> other
#12 0x103338c1c -> other
#13 0x1034819d0 -> other
#14 0x10348471c -> other
#15 0x103481024 -> other
#16 0x103338c1c -> other
#17 0x1034819d0 -> other
#18 0x10348471c -> other
#19 0x103481024 -> other
#20 0x103338c1c -> other
#21 0x1034819d0 -> other
#22 0x10348471c -> other
#23 0x103481024 -> other
#24 0x103338c1c -> other
#25 0x1034819d0 -> other
#26 0x10348471c -> other
#27 0x103481024 -> other
#28 0x103338c1c -> other
#29 0x1034819d0 -> other
#30 0x10348471c -> other
#31 0x103481024 -> other
#32 0x103338c1c -> other
#33 0x1034819d0 -> other
#34 0x10348471c -> other
#35 0x103481024 -> other
#36 0x103338c1c -> other
#37 0x1034819d0 -> other
#38 0x10348471c -> other
#39 0x103481024 -> other
#40 0x103338c1c -> other
#41 0x103338c1c -> other
#42 0x10348156c -> other
#43 0x103483e0c -> other
#44 0x103480ddc -> other
#45 0x103500f08 -> other
#46 0x1034fee88 -> other
#47 0x1034fec70 -> other
#48 0x103526bcc -> other
#49 0x103526fbc -> other
#50 0x10352705c -> other
#51 0x198691d54 -> other
#52 0x0 -> other
{"length": 53, "python_frames": 0, "jit_frames": 0, "other_frames": 53, "jit_backend": null}

  test_manual_unwind_respects_frame_pointers (test.test_frame_pointer_unwind.FramePointerUnwindTests.test_manual_unwind_respects_frame_pointers) (env={'PYTHON_JIT': '0'}) ... FAIL

======================================================================
FAIL: test_manual_unwind_respects_frame_pointers (test.test_frame_pointer_unwind.FramePointerUnwindTests.test_manual_unwind_respects_frame_pointers) (env={'PYTHON_JIT': '0'})
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/skip/src/python/cpython/Lib/test/test_frame_pointer_unwind.py", line 182, in test_manual_unwind_respects_frame_pointers
    self.assertGreater(
    ~~~~~~~~~~~~~~~~~~^
        python_frames,
        ^^^^^^^^^^^^^^
        0,
        ^^
        f"expected to find Python frames on {self.machine} with env {env}",
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
AssertionError: 0 not greater than 0 : expected to find Python frames on arm64 with env {'PYTHON_JIT': '0'}

----------------------------------------------------------------------
Ran 1 test in 0.091s

FAILED (failures=1)
test test_frame_pointer_unwind failed
0:02:56 load avg: 4.94 [4/7/4] test.test_os.test_os failed (1 failure)
Re-running test.test_os.test_os in verbose mode (matching: test_execve_env_concurrent_mutation_with_fspath_posix)
test_execve_env_concurrent_mutation_with_fspath_posix (test.test_os.test_os.ExecTests.test_execve_env_concurrent_mutation_with_fspath_posix) ... dyld[56234]: Library not loaded: /Library/Frameworks/Python.framework/Versions/3.15/Python
  Referenced from: <138B4888-CC6D-3D8D-A2F7-FD2D28865CED> /Users/skip/src/python/cpython/python.exe
  Reason: tried: '/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file), '/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file)
FAIL

======================================================================
FAIL: test_execve_env_concurrent_mutation_with_fspath_posix (test.test_os.test_os.ExecTests.test_execve_env_concurrent_mutation_with_fspath_posix)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/skip/src/python/cpython/Lib/test/test_os/test_os.py", line 2663, in test_execve_env_concurrent_mutation_with_fspath_posix
    _, out, _ = assert_python_ok('-c', code, **env)
                ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
  File "/Users/skip/src/python/cpython/Lib/test/support/script_helper.py", line 182, in assert_python_ok
    return _assert_python(True, *args, **env_vars)
  File "/Users/skip/src/python/cpython/Lib/test/support/script_helper.py", line 167, in _assert_python
    res.fail(cmd_line)
    ~~~~~~~~^^^^^^^^^^
  File "/Users/skip/src/python/cpython/Lib/test/support/script_helper.py", line 80, in fail
    raise AssertionError(f"Process return code is {exitcode}\n"
    ...<10 lines>...
                         f"---")
AssertionError: Process return code is -6 (SIGABRT)
command line: ['/Users/skip/src/python/cpython/python.exe', '-X', 'faulthandler', '-c', '\n        import os, sys\n\n        class MyPath:\n            def __fspath__(self):\n                mutated.clear()\n                return b"pwn"\n\n        mutated = KEYS = VALUES = [MyPath()]\n\n        class MyEnv:\n            def __getitem__(self): raise RuntimeError("must not be called")\n            def __len__(self): return 1\n            def keys(self): return KEYS\n            def values(self): return VALUES\n\n        args = [\'/bin/sh\', \'-c\', \'echo "hello from execve"\']\n        os.execve(args[0], args, MyEnv())\n        ']

stdout:
---

---

stderr:
---
dyld[56235]: Library not loaded: /Library/Frameworks/Python.framework/Versions/3.15/Python
  Referenced from: <138B4888-CC6D-3D8D-A2F7-FD2D28865CED> /Users/skip/src/python/cpython/python.exe
  Reason: tried: '/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file), '/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file)
---

----------------------------------------------------------------------
Ran 1 test in 0.026s

FAILED (failures=1)
test test.test_os.test_os failed
0:02:56 load avg: 4.94 [5/7/5] test_zipfile failed (2 errors)
Re-running test_zipfile in verbose mode (matching: test_execute_zip2, test_execute_zip64)
test_execute_zip2 (test.test_zipfile.test_core.TestExecutablePrependedZip.test_execute_zip2) ... dyld[56233]: Library not loaded: /Library/Frameworks/Python.framework/Versions/3.15/Python
  Referenced from: <138B4888-CC6D-3D8D-A2F7-FD2D28865CED> /Users/skip/src/python/cpython/python.exe
  Reason: tried: '/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file), '/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file)
ERROR
test_execute_zip64 (test.test_zipfile.test_core.TestExecutablePrependedZip.test_execute_zip64) ... dyld[56236]: Library not loaded: /Library/Frameworks/Python.framework/Versions/3.15/Python
  Referenced from: <138B4888-CC6D-3D8D-A2F7-FD2D28865CED> /Users/skip/src/python/cpython/python.exe
  Reason: tried: '/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file), '/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file)
ERROR

======================================================================
ERROR: test_execute_zip2 (test.test_zipfile.test_core.TestExecutablePrependedZip.test_execute_zip2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/skip/src/python/cpython/Lib/test/test_zipfile/test_core.py", line 3554, in test_execute_zip2
    output = subprocess.check_output([self.exe_zip, sys.executable])
  File "/Users/skip/src/python/cpython/Lib/subprocess.py", line 471, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
               **kwargs).stdout
               ^^^^^^^^^
  File "/Users/skip/src/python/cpython/Lib/subprocess.py", line 576, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/Users/skip/src/python/cpython/Lib/test/archivetestdata/exe_with_zip', '/Users/skip/src/python/cpython/python.exe']' died with <Signals.SIGABRT: 6>.

======================================================================
ERROR: test_execute_zip64 (test.test_zipfile.test_core.TestExecutablePrependedZip.test_execute_zip64)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/skip/src/python/cpython/Lib/test/test_zipfile/test_core.py", line 3562, in test_execute_zip64
    output = subprocess.check_output([self.exe_zip64, sys.executable])
  File "/Users/skip/src/python/cpython/Lib/subprocess.py", line 471, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
               **kwargs).stdout
               ^^^^^^^^^
  File "/Users/skip/src/python/cpython/Lib/subprocess.py", line 576, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/Users/skip/src/python/cpython/Lib/test/archivetestdata/exe_with_z64', '/Users/skip/src/python/cpython/python.exe']' died with <Signals.SIGABRT: 6>.

----------------------------------------------------------------------
Ran 2 tests in 0.041s

FAILED (errors=2)
test test_zipfile failed
0:02:57 load avg: 4.94 [6/7/6] test_subprocess failed (2 errors, 4 failures)
Re-running test_subprocess in verbose mode (matching: test_empty_env, test_empty_env, test_args_string, test_call_string, test_one_environment_variable, test_one_environment_variable)
test_args_string (test.test_subprocess.POSIXProcessTestCase.test_args_string) ... dyld[56227]: Library not loaded: /Library/Frameworks/Python.framework/Versions/3.15/Python
  Referenced from: <138B4888-CC6D-3D8D-A2F7-FD2D28865CED> /Users/skip/src/python/cpython/python.exe
  Reason: tried: '/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file), '/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file)
FAIL
test_call_string (test.test_subprocess.POSIXProcessTestCase.test_call_string) ... dyld[56237]: Library not loaded: /Library/Frameworks/Python.framework/Versions/3.15/Python
  Referenced from: <138B4888-CC6D-3D8D-A2F7-FD2D28865CED> /Users/skip/src/python/cpython/python.exe
  Reason: tried: '/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file), '/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file)
FAIL
test_empty_env (test.test_subprocess.ProcessTestCase.test_empty_env)
Verify that env={} is as empty as possible. ... dyld[56245]: Library not loaded: /Library/Frameworks/Python.framework/Versions/3.15/Python
  Referenced from: <138B4888-CC6D-3D8D-A2F7-FD2D28865CED> /Users/skip/src/python/cpython/python.exe
  Reason: tried: '/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file), '/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file)
ERROR
test_one_environment_variable (test.test_subprocess.ProcessTestCase.test_one_environment_variable) ... STDOUT: 
STDERR: dyld[56246]: Library not loaded: /Library/Frameworks/Python.framework/Versions/3.15/Python
  Referenced from: <138B4888-CC6D-3D8D-A2F7-FD2D28865CED> /Users/skip/src/python/cpython/python.exe
  Reason: tried: '/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file), '/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file)

FAIL
test_empty_env (test.test_subprocess.ProcessTestCaseNoPoll.test_empty_env)
Verify that env={} is as empty as possible. ... dyld[56247]: Library not loaded: /Library/Frameworks/Python.framework/Versions/3.15/Python
  Referenced from: <138B4888-CC6D-3D8D-A2F7-FD2D28865CED> /Users/skip/src/python/cpython/python.exe
  Reason: tried: '/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file), '/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file)
ERROR
test_one_environment_variable (test.test_subprocess.ProcessTestCaseNoPoll.test_one_environment_variable) ... STDOUT: 
STDERR: dyld[56248]: Library not loaded: /Library/Frameworks/Python.framework/Versions/3.15/Python
  Referenced from: <138B4888-CC6D-3D8D-A2F7-FD2D28865CED> /Users/skip/src/python/cpython/python.exe
  Reason: tried: '/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file), '/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file)

FAIL
test_call_string (test.test_subprocess.Win32ProcessTestCase.test_call_string) ... skipped 'Windows specific tests'

======================================================================
ERROR: test_empty_env (test.test_subprocess.ProcessTestCase.test_empty_env)
Verify that env={} is as empty as possible.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/skip/src/python/cpython/Lib/test/test_subprocess.py", line 842, in test_empty_env
    child_env_names = eval(stdout.strip())
  File "<string>", line 0
    
SyntaxError: invalid syntax

======================================================================
ERROR: test_empty_env (test.test_subprocess.ProcessTestCaseNoPoll.test_empty_env)
Verify that env={} is as empty as possible.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/skip/src/python/cpython/Lib/test/test_subprocess.py", line 842, in test_empty_env
    child_env_names = eval(stdout.strip())
  File "<string>", line 0
    
SyntaxError: invalid syntax

======================================================================
FAIL: test_args_string (test.test_subprocess.POSIXProcessTestCase.test_args_string)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/skip/src/python/cpython/Lib/test/test_subprocess.py", line 2500, in test_args_string
    self.assertEqual(p.returncode, 47)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
AssertionError: -6 != 47

======================================================================
FAIL: test_call_string (test.test_subprocess.POSIXProcessTestCase.test_call_string)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/skip/src/python/cpython/Lib/test/test_subprocess.py", line 2544, in test_call_string
    self.assertEqual(rc, 47)
    ~~~~~~~~~~~~~~~~^^^^^^^^
AssertionError: -6 != 47

======================================================================
FAIL: test_one_environment_variable (test.test_subprocess.ProcessTestCase.test_one_environment_variable)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/skip/src/python/cpython/Lib/test/test_subprocess.py", line 865, in test_one_environment_variable
    self.assertEqual(p.returncode, 0)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
AssertionError: -6 != 0

======================================================================
FAIL: test_one_environment_variable (test.test_subprocess.ProcessTestCaseNoPoll.test_one_environment_variable)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/skip/src/python/cpython/Lib/test/test_subprocess.py", line 865, in test_one_environment_variable
    self.assertEqual(p.returncode, 0)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
AssertionError: -6 != 0

----------------------------------------------------------------------
Ran 7 tests in 0.507s

FAILED (failures=4, errors=2, skipped=1)
test test_subprocess failed
0:02:58 load avg: 4.78 [7/7/7] test_venv failed (3 errors)
Re-running test_venv in verbose mode (matching: test_special_chars_bash, test_special_chars_csh, test_zippath_from_non_installed_posix)
test_special_chars_bash (test.test_venv.BasicTest.test_special_chars_bash)
Test that the template strings are quoted properly (bash) ... ERROR
test_special_chars_csh (test.test_venv.BasicTest.test_special_chars_csh)
Test that the template strings are quoted properly (csh) ... ERROR
test_zippath_from_non_installed_posix (test.test_venv.BasicTest.test_zippath_from_non_installed_posix)
Test that when create venv from non-installed python, the zip path ... dyld[56253]: Library not loaded: /Library/Frameworks/Python.framework/Versions/3.15/Python
  Referenced from: <138B4888-CC6D-3D8D-A2F7-FD2D28865CED> /private/var/folders/d6/rzq9g7qd7zn5pwbc3pj1sthc0000gn/T/test_python_kc90w2bb/tmpk_5mw0jj/bin/python.exe
  Reason: tried: '/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file), '/Library/Frameworks/Python.framework/Versions/3.15/Python' (no such file)
ERROR

======================================================================
ERROR: test_special_chars_bash (test.test_venv.BasicTest.test_special_chars_bash)
Test that the template strings are quoted properly (bash)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/skip/src/python/cpython/Lib/test/test_venv.py", line 514, in test_special_chars_bash
    self.assertTrue(env_name.encode() in lines[0])
                                         ~~~~~^^^
IndexError: list index out of range

======================================================================
ERROR: test_special_chars_csh (test.test_venv.BasicTest.test_special_chars_csh)
Test that the template strings are quoted properly (csh)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/skip/src/python/cpython/Lib/test/test_venv.py", line 542, in test_special_chars_csh
    self.assertTrue(env_name.encode() in lines[0])
                                         ~~~~~^^^
IndexError: list index out of range

======================================================================
ERROR: test_zippath_from_non_installed_posix (test.test_venv.BasicTest.test_zippath_from_non_installed_posix)
Test that when create venv from non-installed python, the zip path
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/skip/src/python/cpython/Lib/test/test_venv.py", line 750, in test_zippath_from_non_installed_posix
    subprocess.check_call(cmd, env=child_env)
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
  File "/Users/skip/src/python/cpython/Lib/subprocess.py", line 418, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/private/var/folders/d6/rzq9g7qd7zn5pwbc3pj1sthc0000gn/T/test_python_kc90w2bb/tmpk_5mw0jj/bin/python.exe', '-m', 'venv', '--without-pip', '--without-scm-ignore-files', '/private/var/folders/d6/rzq9g7qd7zn5pwbc3pj1sthc0000gn/T/test_python_kc90w2bb/tmpka1k0ebe']' died with <Signals.SIGABRT: 6>.

----------------------------------------------------------------------
Ran 3 tests in 1.970s

FAILED (errors=3)
test test_venv failed
7 tests failed again:
    test.test_asyncio.test_subprocess test.test_os.test_os
    test_frame_pointer_unwind test_popen test_subprocess test_venv
    test_zipfile

== Tests result: FAILURE then FAILURE ==

📚 Documentation preview 📚: https://cpython-previews--145483.org.readthedocs.build/

@smontanaro
Copy link
Contributor Author

Demonstrating that it is probably my lack of framework expertise at the heart of the problem, by adding a symlink for the framework to /Library/Frameworks

% ls -l /Library/Frameworks                      
total 0
lrwxr-xr-x@ 1 root  wheel  50 Feb  4 23:13 iTunesLibrary.framework -> /System/Library/Frameworks/iTunesLibrary.framework
lrwxr-xr-x  1 root  wheel  47 Mar  3 11:45 Python.framework -> /Users/skip/src/python/cpython/Python.framework

I reduced the number of errors to just one:

1 test failed:
    test_frame_pointer_unwind

470 tests OK.

0:02:24 load avg: 7.39 Re-running 1 failed tests in verbose mode in subprocesses
0:02:24 load avg: 7.39 Run 1 test in parallel using 1 worker process (timeout: 10 min, worker timeout: 15 min)
0:02:25 load avg: 7.39 [1/1/1] test_frame_pointer_unwind failed (1 failure)
Re-running test_frame_pointer_unwind in verbose mode (matching: test_manual_unwind_respects_frame_pointers)
test_manual_unwind_respects_frame_pointers (test.test_frame_pointer_unwind.FramePointerUnwindTests.test_manual_unwind_respects_frame_pointers) ... #00 0x105374c1c -> other
#01 0x1054bd56c -> other
#02 0x1054bfe0c -> other
#03 0x1054bd024 -> other
#04 0x105374c1c -> other
#05 0x1054bd9d0 -> other
#06 0x1054c071c -> other
#07 0x1054bd024 -> other
#08 0x105374c1c -> other
#09 0x1054bd9d0 -> other
#10 0x1054c071c -> other
#11 0x1054bd024 -> other
#12 0x105374c1c -> other
#13 0x1054bd9d0 -> other
#14 0x1054c071c -> other
#15 0x1054bd024 -> other
#16 0x105374c1c -> other
#17 0x1054bd9d0 -> other
#18 0x1054c071c -> other
#19 0x1054bd024 -> other
#20 0x105374c1c -> other
#21 0x1054bd9d0 -> other
#22 0x1054c071c -> other
#23 0x1054bd024 -> other
#24 0x105374c1c -> other
#25 0x1054bd9d0 -> other
#26 0x1054c071c -> other
#27 0x1054bd024 -> other
#28 0x105374c1c -> other
#29 0x1054bd9d0 -> other
#30 0x1054c071c -> other
#31 0x1054bd024 -> other
#32 0x105374c1c -> other
#33 0x1054bd9d0 -> other
#34 0x1054c071c -> other
#35 0x1054bd024 -> other
#36 0x105374c1c -> other
#37 0x1054bd9d0 -> other
#38 0x1054c071c -> other
#39 0x1054bd024 -> other
#40 0x105374c1c -> other
#41 0x105374c1c -> other
#42 0x1054bd56c -> other
#43 0x1054bfe0c -> other
#44 0x1054bcddc -> other
#45 0x10553cf08 -> other
#46 0x10553ae88 -> other
#47 0x10553ac70 -> other
#48 0x105562bcc -> other
#49 0x105562fbc -> other
#50 0x10556305c -> other
#51 0x198691d54 -> other
#52 0x0 -> other
{"length": 53, "python_frames": 0, "jit_frames": 0, "other_frames": 53, "jit_backend": null}

  test_manual_unwind_respects_frame_pointers (test.test_frame_pointer_unwind.FramePointerUnwindTests.test_manual_unwind_respects_frame_pointers) (env={'PYTHON_JIT': '0'}) ... FAIL

======================================================================
FAIL: test_manual_unwind_respects_frame_pointers (test.test_frame_pointer_unwind.FramePointerUnwindTests.test_manual_unwind_respects_frame_pointers) (env={'PYTHON_JIT': '0'})
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/skip/src/python/cpython/Lib/test/test_frame_pointer_unwind.py", line 182, in test_manual_unwind_respects_frame_pointers
    self.assertGreater(
    ~~~~~~~~~~~~~~~~~~^
        python_frames,
        ^^^^^^^^^^^^^^
        0,
        ^^
        f"expected to find Python frames on {self.machine} with env {env}",
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
AssertionError: 0 not greater than 0 : expected to find Python frames on arm64 with env {'PYTHON_JIT': '0'}

----------------------------------------------------------------------
Ran 1 test in 0.074s

FAILED (failures=1)
test test_frame_pointer_unwind failed
1 test failed again:
    test_frame_pointer_unwind

== Tests result: FAILURE then FAILURE ==

@smontanaro
Copy link
Contributor Author

An up-to-date framework build on main (also with that symlink in /Library/Frameworks) also fails test_frame_pointer_unwind. Maybe this is a preexisting problem with framework builds?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant