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

Tests crash with 32-bit (x86) Python 3.12 + Cython 3.0.2 on Windows #692

Closed
rgommers opened this issue Sep 17, 2023 · 1 comment
Closed
Labels

Comments

@rgommers
Copy link
Member

There's a problem with Python 3.12 + Cython 3.0.2 + 32-bit Python on Windows. For now I'm going to limit to Cython<3.0 on Windows. This needs investigation at some point, but that's tricky to do on CI. Almost certainly a Cython bug.

The cibuildwheel job crashes with:

 ..............                                                           [ 84%]
  tests\test_multidim.py ...........................                       [ 87%]
  tests\test_multilevel.py ............................................... [ 91%]
  ...................                                                      [ 93%]
  tests\test_perfect_reconstruction.py .                                   [ 93%]
  tests\test_swt.py ........F....F..........FFF                            [ 96%]
  tests\test_thresholding.py ...                                           [ 96%]
  tests\test_wavelet.py ......                                             [ 97%]
  tests\test_wp.py ...........                                             [ 98%]
  Traceback (most recent call last):
    File "<frozen runpy>", line 198, in _run_module_as_main
    File "<frozen runpy>", line 88, in _run_code
    File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Scripts\pytest.exe\__main__.py", line 7, in <module>
    File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\_pytest\config\__init__.py", line 192, in console_main
      code = main()
             ^^^^^^
    File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\_pytest\config\__init__.py", line 169, in main
      ret: Union[ExitCode, int] = config.hook.pytest_cmdline_main(
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\pluggy\_hooks.py", line 493, in __call__
      return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\pluggy\_manager.py", line 115, in _hookexec
      return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\pluggy\_callers.py", line 113, in _multicall
      raise exception.with_traceback(exception.__traceback__)
    File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\pluggy\_callers.py", line 77, in _multicall
      res = hook_impl.function(*args)
            ^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\_pytest\main.py", line 318, in pytest_cmdline_main
      return wrap_session(config, _main)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\_pytest\main.py", line 306, in wrap_session
      config.hook.pytest_sessionfinish(
    File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\pluggy\_hooks.py", line 493, in __call__
      return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\pluggy\_manager.py", line 115, in _hookexec
      return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\pluggy\_callers.py", line 130, in _multicall
      teardown[0].send(outcome)
    File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\_pytest\terminal.py", line 857, in pytest_sessionfinish
      outcome.get_result()
    File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\pluggy\_result.py", line 114, in get_result
      raise exc.with_traceback(exc.__traceback__)
    File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\pluggy\_callers.py", line 77, in _multicall
      res = hook_impl.function(*args)
            ^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\_pytest\cacheprovider.py", line 451, in pytest_sessionfinish
      config.cache.set("cache/nodeids", sorted(self.cached_nodeids))
    File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\_pytest\cacheprovider.py", line 190, in set
      data = json.dumps(value, ensure_ascii=False, indent=2)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\runneradmin\AppData\Local\pypa\cibuildwheel\Cache\nuget-cpython\pythonx86.3.12.0-rc1\tools\Lib\json\__init__.py", line 238, in dumps
      **kw).encode(obj)
            ^^^^^^^^^^^
    File "C:\Users\runneradmin\AppData\Local\pypa\cibuildwheel\Cache\nuget-cpython\pythonx86.3.12.0-rc1\tools\Lib\json\encoder.py", line 203, in encode
      return ''.join(chunks)
             ^^^^^^^^^^^^^^^
  MemoryError
  tests\test_wp2d.py .......
  INTERNALERROR> Traceback (most recent call last):
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\_pytest\main.py", line 271, in wrap_session
  INTERNALERROR>     session.exitstatus = doit(config, session) or 0
  INTERNALERROR>                          ^^^^^^^^^^^^^^^^^^^^^
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\_pytest\main.py", line 325, in _main
  INTERNALERROR>     config.hook.pytest_runtestloop(session=session)
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\pluggy\_hooks.py", line 493, in __call__
  INTERNALERROR>     return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
  INTERNALERROR>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\pluggy\_manager.py", line 115, in _hookexec
  INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  INTERNALERROR>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\pluggy\_callers.py", line 152, in _multicall
  INTERNALERROR>     return outcome.get_result()
  INTERNALERROR>            ^^^^^^^^^^^^^^^^^^^^
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\pluggy\_result.py", line 114, in get_result
  INTERNALERROR>     raise exc.with_traceback(exc.__traceback__)
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\pluggy\_callers.py", line 77, in _multicall
  INTERNALERROR>     res = hook_impl.function(*args)
  INTERNALERROR>           ^^^^^^^^^^^^^^^^^^^^^^^^^
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\_pytest\main.py", line 350, in pytest_runtestloop
  INTERNALERROR>     item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\pluggy\_hooks.py", line 493, in __call__
  INTERNALERROR>     return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
  INTERNALERROR>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\pluggy\_manager.py", line 115, in _hookexec
  INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  INTERNALERROR>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\pluggy\_callers.py", line 152, in _multicall
  INTERNALERROR>     return outcome.get_result()
  INTERNALERROR>            ^^^^^^^^^^^^^^^^^^^^
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\pluggy\_result.py", line 114, in get_result
  INTERNALERROR>     raise exc.with_traceback(exc.__traceback__)
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\pluggy\_callers.py", line 77, in _multicall
  INTERNALERROR>     res = hook_impl.function(*args)
  INTERNALERROR>           ^^^^^^^^^^^^^^^^^^^^^^^^^
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\_pytest\runner.py", line 114, in pytest_runtest_protocol
  INTERNALERROR>     runtestprotocol(item, nextitem=nextitem)
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\_pytest\runner.py", line 133, in runtestprotocol
  INTERNALERROR>     reports.append(call_and_report(item, "call", log))
  INTERNALERROR>                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\_pytest\runner.py", line 224, in call_and_report
  INTERNALERROR>     report: TestReport = hook.pytest_runtest_makereport(item=item, call=call)
  INTERNALERROR>                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\pluggy\_hooks.py", line 493, in __call__
  INTERNALERROR>     return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
  INTERNALERROR>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\pluggy\_manager.py", line 115, in _hookexec
  INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  INTERNALERROR>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\pluggy\_callers.py", line 130, in _multicall
  INTERNALERROR>     teardown[0].send(outcome)
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\_pytest\skipping.py", line 266, in pytest_runtest_makereport
  INTERNALERROR>     rep = outcome.get_result()
  INTERNALERROR>           ^^^^^^^^^^^^^^^^^^^^
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\pluggy\_result.py", line 114, in get_result
  INTERNALERROR>     raise exc.with_traceback(exc.__traceback__)
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\pluggy\_callers.py", line 77, in _multicall
  INTERNALERROR>     res = hook_impl.function(*args)
  INTERNALERROR>           ^^^^^^^^^^^^^^^^^^^^^^^^^
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\_pytest\runner.py", line 368, in pytest_runtest_makereport
  INTERNALERROR>     return TestReport.from_item_and_call(item, call)
  INTERNALERROR>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\_pytest\reports.py", line 362, in from_item_and_call
  INTERNALERROR>     longrepr = item.repr_failure(excinfo)
  INTERNALERROR>                ^^^^^^^^^^^^^^^^^^^^^^^^^^
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\_pytest\python.py", line 1833, in repr_failure
  INTERNALERROR>     return self._repr_failure_py(excinfo, style=style)
  INTERNALERROR>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\_pytest\nodes.py", line 486, in _repr_failure_py
  INTERNALERROR>     return excinfo.getrepr(
  INTERNALERROR>            ^^^^^^^^^^^^^^^^
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\_pytest\_code\code.py", line 701, in getrepr
  INTERNALERROR>     return fmt.repr_excinfo(self)
  INTERNALERROR>            ^^^^^^^^^^^^^^^^^^^^^^
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\_pytest\_code\code.py", line 989, in repr_excinfo
  INTERNALERROR>     reprtraceback = self.repr_traceback(excinfo_)
  INTERNALERROR>                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\_pytest\_code\code.py", line 914, in repr_traceback
  INTERNALERROR>     self.repr_traceback_entry(entry, excinfo if last == entry else None)
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\_pytest\_code\code.py", line 852, in repr_traceback_entry
  INTERNALERROR>     source = self._getentrysource(entry)
  INTERNALERROR>              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\_pytest\_code\code.py", line 754, in _getentrysource
  INTERNALERROR>     source = entry.getsource(self.astcache)
  INTERNALERROR>              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\_pytest\_code\code.py", line 262, in getsource
  INTERNALERROR>     astnode, _, end = getstatementrange_ast(
  INTERNALERROR>                       ^^^^^^^^^^^^^^^^^^^^^^
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\_pytest\_code\source.py", line 180, in getstatementrange_ast
  INTERNALERROR>     content = str(source)
  INTERNALERROR>               ^^^^^^^^^^^
  INTERNALERROR>   File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-9coiodt8\cp312-win32\venv-test\Lib\site-packages\_pytest\_code\source.py", line 111, in __str__
  INTERNALERROR>     return "\n".join(self.lines)
  INTERNALERROR>            ^^^^^^^^^^^^^^^^^^^^^
  INTERNALERROR> MemoryError
Error: Command pytest --pyargs pywt failed with code 1. None
@rgommers
Copy link
Member Author

This seems to have been resolved in Cython; the 1.5.0 release built successfully with Cython 3.0.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant