diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06d2fe22e..278555611 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,6 +70,12 @@ jobs: python: pypy3 arch: x64 + # TODO: renable + # Currently segfaults on macOS Python 3.9 + - runs-on: macos-latest + python: 3.9 + arch: x64 + name: "🐍 ${{ matrix.python }} • ${{ matrix.runs-on }} • ${{ matrix.arch }} ${{ matrix.args }}" runs-on: ${{ matrix.runs-on }} diff --git a/tests/test_gil_scoped.py b/tests/test_gil_scoped.py index 6e7fe9f4c..b2169d98b 100644 --- a/tests/test_gil_scoped.py +++ b/tests/test_gil_scoped.py @@ -2,10 +2,6 @@ import multiprocessing import threading -import pytest - -import env # noqa: F401 - from pybind11_tests import gil_scoped as m @@ -54,8 +50,7 @@ def _python_to_cpp_to_python_from_threads(num_threads, parallel=False): thread.join() -# TODO: FIXME, sometimes returns -11 instead of 0 -@pytest.mark.xfail("env.PY >= (3,9) and env.MACOS", strict=False) +# TODO: FIXME, sometimes returns -11 (segfault) instead of 0 on macOS Python 3.9 def test_python_to_cpp_to_python_from_thread(): """Makes sure there is no GIL deadlock when running in a thread. @@ -64,8 +59,7 @@ def test_python_to_cpp_to_python_from_thread(): assert _run_in_process(_python_to_cpp_to_python_from_threads, 1) == 0 -# TODO: FIXME -@pytest.mark.xfail("env.PY >= (3,9) and env.MACOS", strict=False) +# TODO: FIXME on macOS Python 3.9 def test_python_to_cpp_to_python_from_thread_multiple_parallel(): """Makes sure there is no GIL deadlock when running in a thread multiple times in parallel. @@ -74,8 +68,7 @@ def test_python_to_cpp_to_python_from_thread_multiple_parallel(): assert _run_in_process(_python_to_cpp_to_python_from_threads, 8, parallel=True) == 0 -# TODO: FIXME -@pytest.mark.xfail("env.PY >= (3,9) and env.MACOS", strict=False) +# TODO: FIXME on macOS Python 3.9 def test_python_to_cpp_to_python_from_thread_multiple_sequential(): """Makes sure there is no GIL deadlock when running in a thread multiple times sequentially. @@ -84,8 +77,7 @@ def test_python_to_cpp_to_python_from_thread_multiple_sequential(): assert _run_in_process(_python_to_cpp_to_python_from_threads, 8, parallel=False) == 0 -# TODO: FIXME -@pytest.mark.xfail("env.PY >= (3,9) and env.MACOS", strict=False) +# TODO: FIXME on macOS Python 3.9 def test_python_to_cpp_to_python_from_process(): """Makes sure there is no GIL deadlock when using processes.