Skip to content

BUG: flaky test under pytest-run-parallel #31112

@ngoldbaum

Description

@ngoldbaum
==================================== ERRORS ====================================
___________ ERROR at call of test_real_imag_ufunc_minimal[imag-imag] ___________

ufunc = <ufunc 'imag'>, attr = 'imag'

    @pytest.mark.parametrize("ufunc,attr", [
        (np._core.umath.real, "real"), (np._core.umath.imag, "imag")])
    def test_real_imag_ufunc_minimal(ufunc, attr):
        with pytest.raises(TypeError):
            ufunc(np.array([1, 2, 3]))  # non-complex or object raises
    
        arr = np.array([1 + 2j, 3 + 4j])
>       res = ufunc(arr)
              ^^^^^^^^^^
E       RecursionError: Stack overflow (used 16364 kB) in __subclasscheck__

arr        = array([1.+2.j, 3.+4.j])
attr       = 'imag'
ufunc      = <ufunc 'imag'>

As seen here: https://github.com/numpy/numpy/actions/runs/23796435549/job/69344855092?pr=31108#step:9:47471

Almost certainly fallout from merging #30984. I'm going to try to reproduce this locally and understand what's happening.

Ping @seberg @kumaraditya303

Metadata

Metadata

Assignees

No one assigned

    Labels

    00 - Bug39 - free-threadingPRs and issues related to support for free-threading CPython (a.k.a. no-GIL, PEP 703)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions