pybind / pybind11

Seamless operability between C++11 and Python
https://pybind11.readthedocs.io/
Other
15.39k stars 2.07k forks source link

tests: run on pyodide #4745

Closed henryiii closed 1 month ago

henryiii commented 1 year ago

Adding WebAssembly testing on Pyodide.

Description

Suggested changelog entry:

* Adding WASM testing.
rwgk commented 1 year ago

Do you already understand the Python 3.12 failures? When I saw them previously I decided to trigger a CI run with master as-is (#3939) and I don't see any errors there.

henryiii commented 1 year ago

I don't understand how this could be adding errors on 3.12. No code changes that I see. 🤷

rwgk commented 1 year ago

I don't understand how this could be adding errors on 3.12. No code changes that I see. 🤷

My best guess: some change in the environment triggers a latent bug in 3.12 (or how we use 3.12).

Could tests/pyproject.toml have something to do with it?

henryiii commented 2 months ago

Importing pytest or sys (probably pytest) inside test_embed causes Python 3.12 to segfault. b9b391c9 fixed the issues - we don't really need to do it, since we are avoiding these anyway on Pyodide. But why? How?

henryiii commented 2 months ago

And the interesting question: Should we add -fexceptions when building on emscripten in our CMake helpers? Is there a reason someone wouldn't want them (using them, which we do a lot, would cause crashes). @hoodmane?