Thanks to visit codestin.com
Credit goes to github.com

Skip to content

TST: test_extending failures on free-threaded Windows wheel build #22039

@tylerjereddy

Description

@tylerjereddy

Observed for a test wheel build in gh-22024; sample log for the three test failures: https://github.com/scipy/scipy/actions/runs/12240251798/job/34142804841?pr=22024

  FAILED linalg/tests/test_extending.py::test_cython - subprocess.CalledProcessError: Command '['meson', 'compile', '-vv']' returned non-zero exit status 1.
  FAILED optimize/tests/test_extending.py::test_cython - subprocess.CalledProcessError: Command '['meson', 'compile', '-vv']' returned non-zero exit status 1.
  FAILED special/tests/test_extending.py::test_cython - subprocess.CalledProcessError: Command '['meson', 'compile', '-vv']' returned non-zero exit status 1.

A sample of 1 of the 3 tracebacks is below the fold. Each failure scenario seems to ultimately involve a missing .pxd file it seems.

Details
_________________________________ test_cython _________________________________
  ..\venv-test\Lib\site-packages\scipy\special\tests\test_extending.py:19: in test_cython
      extensions, extensions_cpp = _test_cython_extension(tmp_path, srcdir)
          srcdir     = 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-hxclyq60\\cp313t-win_amd64\\venv-test\\Lib\\site-packages\\scipy\\special'
          tmp_path   = WindowsPath('C:/Users/runneradmin/AppData/Local/Temp/pytest-of-runneradmin/pytest-0/test_cython2')
  ..\venv-test\Lib\site-packages\scipy\_lib\_testutils.py:316: in _test_cython_extension
      subprocess.check_call(["meson", "compile", "-vv"], cwd=target_dir)
          build_dir  = WindowsPath('C:/Users/runneradmin/AppData/Local/Temp/pytest-of-runneradmin/pytest-0/test_cython2/3216/special/tests/_cython_examples')
          f          = <_io.TextIOWrapper name='C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pytest-of-runneradmin\\pytest-0\\test_cython2\\3216\\special\\tests\\_cython_examples\\interpreter-native-file.ini' mode='w' encoding='cp1252'>
          mod_name   = 'special'
          native_file = 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pytest-of-runneradmin\\pytest-0\\test_cython2\\3216\\special\\tests\\_cython_examples\\interpreter-native-file.ini'
          pytest     = <module 'pytest' from 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-hxclyq60\\cp313t-win_amd64\\venv-test\\Lib\\site-packages\\pytest\\__init__.py'>
          srcdir     = 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-hxclyq60\\cp313t-win_amd64\\venv-test\\Lib\\site-packages\\scipy\\special'
          target_dir = WindowsPath('C:/Users/runneradmin/AppData/Local/Temp/pytest-of-runneradmin/pytest-0/test_cython2/3216/special/tests/_cython_examples/build')
          tmp_path   = WindowsPath('C:/Users/runneradmin/AppData/Local/Temp/pytest-of-runneradmin/pytest-0/test_cython2/3216')
  ..\..\..\..\pypa\cibuildwheel\Cache\nuget-cpython\python-freethreaded.3.13.0\tools\Lib\subprocess.py:419: in check_call
      raise CalledProcessError(retcode, cmd)
  E   subprocess.CalledProcessError: Command '['meson', 'compile', '-vv']' returned non-zero exit status 1.
          cmd        = ['meson', 'compile', '-vv']
          kwargs     = {'cwd': WindowsPath('C:/Users/runneradmin/AppData/Local/Temp/pytest-of-runneradmin/pytest-0/test_cython2/3216/special/tests/_cython_examples/build')}
          popenargs  = (['meson', 'compile', '-vv'],)
          retcode    = 1
  ---------------------------- Captured stdout call -----------------------------
  1.6.99
  
  The Meson build system
  
  Version: 1.6.99
  
  Source dir: C:\Users\runneradmin\AppData\Local\Temp\pytest-of-runneradmin\pytest-0\test_cython2\3216\special\tests\_cython_examples
  
  Build dir: C:\Users\runneradmin\AppData\Local\Temp\pytest-of-runneradmin\pytest-0\test_cython2\3216\special\tests\_cython_examples\build
  
  Build type: native build
  
  Project name: random-build-examples
  
  Project version: undefined
  
  Activating VS 16.11.42
  
  C compiler for the host machine: cl (msvc 19.29.30157 "Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30157 for x64")
  
  C linker for the host machine: link link 14.29.30157.0
  
  C++ compiler for the host machine: cl (msvc 19.29.30157 "Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30157 for x64")
  
  C++ linker for the host machine: link link 14.29.30157.0
  
  Cython compiler for the host machine: cython (cython 3.1.0)
  
  Host machine cpu family: x86_64
  
  Host machine cpu: x86_64
  
  Program python found: YES (C:\Users\runneradmin\AppData\Local\Temp\cibw-run-hxclyq60\cp313t-win_amd64\venv-test\Scripts\python.exe)
  
  Run-time dependency python found: YES 3.13
  
  Build targets in project: 3
  
  
  
  random-build-examples undefined
  
  
  
    User defined options
  
      Native files: C:\Users\runneradmin\AppData\Local\Temp\pytest-of-runneradmin\pytest-0\test_cython2\3216\special\tests\_cython_examples\interpreter-native-file.ini
  
      buildtype   : release
  
      vsenv       : true
  
  
  
  Found ninja-1.11.1.git.kitware.jobserver-1 at C:\Users\runneradmin\AppData\Local\Temp\cibw-run-hxclyq60\cp313t-win_amd64\build\venv\Scripts\ninja.EXE
  
  
  
  Visual Studio environment is needed to run Ninja. It is recommended to use Meson wrapper:
  
  C:\Users\runneradmin\AppData\Local\Temp\cibw-run-hxclyq60\cp313t-win_amd64\build\venv\Scripts\meson compile -C .
  
  [1/7] "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-hxclyq60\cp313t-win_amd64\build\venv\Scripts\meson" "--internal" "copy" "../extending.pyx" "extending_cpp.pyx"
  
  [2/7] "cython" "-M" "--fast-fail" "-3" C:/Users/runneradmin/AppData/Local/Temp/pytest-of-runneradmin/pytest-0/test_cython2/3216/special/tests/_cython_examples/extending.pyx -o extending.cp313t-win_amd64.pyd.p/extending.pyx.c
  
  FAILED: extending.cp313t-win_amd64.pyd.p/extending.pyx.c 
  
  "cython" "-M" "--fast-fail" "-3" C:/Users/runneradmin/AppData/Local/Temp/pytest-of-runneradmin/pytest-0/test_cython2/3216/special/tests/_cython_examples/extending.pyx -o extending.cp313t-win_amd64.pyd.p/extending.pyx.c
  
  
  Error compiling Cython file:
  
  ------------------------------------------------------------
  
  ...
  
  #!/usr/bin/env python3
  
  #cython: language_level=3
  
  #cython: boundscheck=False
  
  #cython: wraparound=False
  
  
  
  from scipy.special.cython_special cimport beta, gamma
  
  ^
  
  ------------------------------------------------------------
  
  
  
  C:\Users\runneradmin\AppData\Local\Temp\pytest-of-runneradmin\pytest-0\test_cython2\3216\special\tests\_cython_examples\extending.pyx:6:0: 'scipy\special\cython_special.pxd' not found
  
  [3/7] "cython" "-M" "--fast-fail" "-3" "--cplus" extending_cpp.pyx -o extending_cpp.cp313t-win_amd64.pyd.p/extending_cpp.pyx.cpp
  FAILED: extending_cpp.cp313t-win_amd64.pyd.p/extending_cpp.pyx.cpp 
  "cython" "-M" "--fast-fail" "-3" "--cplus" extending_cpp.pyx -o extending_cpp.cp313t-win_amd64.pyd.p/extending_cpp.pyx.cpp
  
  
  Error compiling Cython file:
  
  ------------------------------------------------------------
  
  
  ...
  
  
  #!/usr/bin/env python3
  
  
  #cython: language_level=3
  
  
  #cython: boundscheck=False
  
  
  #cython: wraparound=False
  
  
  
  
  
  from scipy.special.cython_special cimport beta, gamma
  
  
  ^
  
  
  ------------------------------------------------------------
  
  
  
  
  
  extending_cpp.pyx:6:0: 'scipy\special\cython_special.pxd' not found
  
  
  ninja: build stopped: subcommand failed.
  
  Activating VS 16.11.42
  
  INFO: automatically activated MSVC compiler environment
  
  INFO: autodetecting backend as ninja
  
  INFO: calculating backend command to run: C:\Users\runneradmin\AppData\Local\Temp\cibw-run-hxclyq60\cp313t-win_amd64\build\venv\Scripts\ninja.EXE -v

The "regular" (not free threaded) 3.13 + Windows version of the wheel build is green. That doesn't necessarily mean that it is a thread-safety issue though, it could also relate to some other aspect -- i.e., free-threaded wheel builds have build isolation disabled, or some other subtle difference in workflow/dep version.

Metadata

Metadata

Assignees

Labels

free-threadingItems related to supporting free-threaded (a.k.a. "no-GIL") builds of CPythonmaintenanceItems related to regular maintenance tasks

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions