-
Notifications
You must be signed in to change notification settings - Fork 162
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
GitHub: Run unit tests with pypy #625
Conversation
@@ -11,7 +11,7 @@ jobs: | |||
strategy: | |||
matrix: | |||
os: [ubuntu-latest, windows-latest] | |||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.8", "pypy3.9", "pypy3.10"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pypy3.8 on Linux fails with this error while building grpcio:
src/python/grpcio/grpc/_cython/cygrpc.cpp: In function ‘int __Pyx_async_gen_init_hooks(__pyx_PyAsyncGenObject*)’:
src/python/grpcio/grpc/_cython/cygrpc.cpp:141280:17: error: ‘_PyEval_GetAsyncGenFinalizer’ was not declared in this scope
141280 | finalizer = _PyEval_GetAsyncGenFinalizer();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/python/grpcio/grpc/_cython/cygrpc.cpp:141290:17: error: ‘_PyEval_GetAsyncGenFirstiter’ was not declared in this scope
141290 | firstiter = _PyEval_GetAsyncGenFirstiter();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/python/grpcio/grpc/_cython/cygrpc.cpp: In function ‘void __pyx_f_4grpc_7_cython_6cygrpc__unified_socket_write(int)’:
src/python/grpcio/grpc/_cython/cygrpc.cpp:65538:15: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
65538 | (void)(write(__pyx_v_fd, ((char *)"1"), 1));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It looks like this function was added to PyPy in version 7.3.12: https://doc.pypy.org/en/latest/release-v7.3.12.html
The GitHub runners have
- 3.8.16 [PyPy 7.3.11]
- 3.9.19 [PyPy 7.3.16]
- 3.10.14 [PyPy 7.3.16]
@@ -11,7 +11,7 @@ jobs: | |||
strategy: | |||
matrix: | |||
os: [ubuntu-latest, windows-latest] | |||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.8", "pypy3.9", "pypy3.10"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pypy3.10 on Linux fails with this error while building grpcio-tools:
gcc -pthread -DNDEBUG -O2 -fPIC -DHAVE_PTHREAD=1 -I. -Igrpc_root -Igrpc_root/include -Ithird_party/protobuf/src -I/tmp/tmpduijp0zi/.venv/include -I/opt/hostedtoolcache/PyPy/3.10.14/x64/include/pypy3.10 -c third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_message_field.cc -o build/temp.linux-x86_64-pypy310/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_message_field.o -std=c++14 -fno-wrapv -frtti
grpc_tools/_protoc_compiler.cpp:5271:1: error: too many initializers for ‘PyTypeObject’ {aka ‘_typeobject’}
5271 | };
| ^
grpc_tools/_protoc_compiler.cpp:5388:1: error: too many initializers for ‘PyTypeObject’ {aka ‘_typeobject’}
5388 | };
| ^
grpc_tools/_protoc_compiler.cpp:5506:1: error: too many initializers for ‘PyTypeObject’ {aka ‘_typeobject’}
5506 | };
| ^
grpc_tools/_protoc_compiler.cpp:5623:1: error: too many initializers for ‘PyTypeObject’ {aka ‘_typeobject’}
5623 | };
| ^
grpc_tools/_protoc_compiler.cpp:8109:1: error: too many initializers for ‘PyTypeObject’ {aka ‘_typeobject’}
8109 | };
| ^
grpc_tools/_protoc_compiler.cpp:10426:1: error: too many initializers for ‘PyTypeObject’ {aka ‘_typeobject’}
10426 | };
| ^
Perhaps upgrading grpcio-tools would fix it? However, we don't want to upgrade grpcio-tools unless we need to, because the grpcio-tools output requires the corresponding grpcio version or later.
Test Results 11 files - 23 11 suites - 23 4m 17s ⏱️ - 47m 32s Results for commit 26ca6d8. ± Comparison against base commit 56feb61. This pull request removes 2138 tests.
|
@@ -11,7 +11,7 @@ jobs: | |||
strategy: | |||
matrix: | |||
os: [ubuntu-latest, windows-latest] | |||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.8", "pypy3.9", "pypy3.10"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pypy3.10 on Windows fails to run the installdriver command:
Run poetry run nidaqmx installdriver --help
<frozen importlib._bootstrap>:241: Warning: Numpy built with MINGW-W64 on Windows 64 bits is experimental, and only available for
testing. You are advised not to use it for production.
CRASHES ARE TO BE EXPECTED - PLEASE REPORT THEM TO NUMPY DEVELOPERS
D:\a\nidaqmx-python\nidaqmx-python\.venv\lib\site-packages\numpy\_core\getlimits.py:227: RuntimeWarning: invalid value encountered in exp2
epsneg_f128 = exp2(ld(-113))
D:\a\nidaqmx-python\nidaqmx-python\.venv\lib\site-packages\numpy\_core\getlimits.py:228: RuntimeWarning: invalid value encountered in exp2
tiny_f128 = exp2(ld(-16382))
D:\a\nidaqmx-python\nidaqmx-python\.venv\lib\site-packages\numpy\_core\getlimits.py:242: RuntimeWarning: invalid value encountered in exp2
eps=exp2(ld(-112)),
D:\a\nidaqmx-python\nidaqmx-python\.venv\lib\site-packages\numpy\_core\getlimits.py:41: RuntimeWarning: invalid value encountered in nextafter
self._smallest_subnormal = nextafter(
D:\a\nidaqmx-python\nidaqmx-python\.venv\lib\site-packages\numpy\_core\getlimits.py:52: RuntimeWarning: invalid value encountered in log[10](https://github.com/ni/nidaqmx-python/actions/runs/10291434282/job/28483715065?pr=625#step:7:11)
self.precision = int(-log10(self.eps))
Error: Process completed with exit code 1.
@@ -11,7 +11,7 @@ jobs: | |||
strategy: | |||
matrix: | |||
os: [ubuntu-latest, windows-latest] | |||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.8", "pypy3.9", "pypy3.10"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pypy3.8 on Windows fails to install Poetry:
Installing Poetry (1.8.3): Creating script
Installing Poetry (1.8.3): An error occurred. Removing partial environment.
Traceback (most recent call last):
File "D:\a\_temp\ae8289e4-95d3-4371-a75e-8b2681e097[32](https://github.com/ni/nidaqmx-python/actions/runs/10291434282/job/28483714525?pr=625#step:4:33)", line 945, in <module>
sys.exit(main())
File "D:\a\_temp\ae8289e4-95d3-4371-a75e-8b2681e09732", line 923, in main
return installer.run()
File "D:\a\_temp\ae8289e4-95d3-4371-a75e-8b2681e09732", line 560, in run
self.install(version)
File "D:\a\_temp\ae8289e4-95d3-4[37](https://github.com/ni/nidaqmx-python/actions/runs/10291434282/job/28483714525?pr=625#step:4:38)1-a75e-8b2681e09732", line 583, in install
self.make_bin(version, env)
File "D:\a\_temp\ae8289e4-95d3-4371-a75e-8b2681e09732", line 669, in make_bin
self.bin_dir.joinpath(script).symlink_to(target_script)
File "C:\hostedtoolcache\windows\PyPy\3.8.16\x86\Lib\pathlib.py", line 1[38](https://github.com/ni/nidaqmx-python/actions/runs/10291434282/job/28483714525?pr=625#step:4:39)4, in symlink_to
self._accessor.symlink(target, self, target_is_directory)
NotImplementedError: symlink() is not implemented for PyPy on Windows
Error: The process 'C:\hostedtoolcache\windows\PyPy\3.8.16\x86\python.exe' failed with exit code 1
@@ -11,7 +11,7 @@ jobs: | |||
strategy: | |||
matrix: | |||
os: [ubuntu-latest, windows-latest] | |||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.8", "pypy3.9", "pypy3.10"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pypy3.9 on Windows takes 24 minutes to install packages and then fails with no output other than "Chef build error".
24m 46s
Run poetry install
Installing dependencies from lock file
Package operations: 44 installs, [1](https://github.com/ni/nidaqmx-python/actions/runs/10291434282/job/28483714820?pr=625#step:8:1) update, 0 removals
- Installing markupsafe (2.1.5)
- Installing mccabe (0.7.0)
- Installing mypy-extensions (1.0.0)
- Installing pathspec (0.12.1)
- Installing platformdirs (4.2.2)
- Installing pycodestyle (2.9.1)
- Installing pyflakes (2.5.0)
- Installing snowballstemmer (2.2.0)
- Installing tomli (2.0.1)
- Installing typing-extensions (4.12.2)
- Installing black (24.4.2)
- Installing distlib (0.3.8)
- Installing exceptiongroup (1.2.1)
- Installing filelock (3.15.1)
- Installing flake8 (5.0.4)
- Installing iniconfig (2.0.0)
- Installing pluggy (1.5.0)
- Installing pydocstyle (6.3.0)
- Downgrading setuptools (70.1.0 -> 70.0.0)
- Installing cachetools (5.3.3)
- Installing chardet (5.2.0)
- Installing coverage (7.5.3)
- Installing flake8-black (0.3.6)
- Installing flake8-docstrings (1.7.0)
- Installing flake8-import-order (0.18.2)
- Installing grpcio (1.64.1)
- Installing isort (5.13.2)
- Installing pep8-naming (0.14.1)
- Installing protobuf (4.25.3)
- Installing pyproject-api (1.6.1)
- Installing pytest (8.2.2)
- Installing toml (0.[10](https://github.com/ni/nidaqmx-python/actions/runs/10291434282/job/28483714820?pr=625#step:8:11).2)
- Installing types-protobuf (4.25.0.20240417)
- Installing virtualenv (20.26.2)
ChefBuildError
Simply enabling pypy support is not enough, so I filed an issue: #626 "And all our best-laid plans, they crumbled in our hands" --Okkervil River, "The Velocity of Saul at the Time of His Conversion" |
What does this Pull Request accomplish?
Update the GitHub workflows to run unit tests with PyPy.
The list of version numbers is based on what's currently available on the GitHub ubuntu-latest and windows-latest runner images.
Why should this Pull Request be merged?
This project doesn't run any automated tests with PyPy.
What testing has been done?
PR build