EnricoMi / publish-unit-test-result-action

GitHub Action to publish unit test results on GitHub
Apache License 2.0
625 stars 184 forks source link

Python 3.13 support #630

Closed akb825 closed 1 month ago

akb825 commented 1 month ago

When running on a macOS runner with the macos-latest tag, it currently uses Python 3.13 by default and has the following errors when trying to run publish-unit-test-result-action:

  Building wheels for collected packages: lxml, cffi
    Building wheel for lxml (pyproject.toml): started
    Building wheel for lxml (pyproject.toml): finished with status 'done'
    Created wheel for lxml: filename=lxml-5.1.0-cp313-cp313-macosx_14_0_arm64.whl size=1595644 sha256=959de9c98b1c8ead73a0c5182182a7ab6d03419877245a8e763b8ae39c09d60d
    Stored in directory: /Users/runner/Library/Caches/pip/wheels/61/ee/c7/8efaa07f329bd1007fb1f352458a424aa2e7358b1ff215f374
    Building wheel for cffi (pyproject.toml): started
    Building wheel for cffi (pyproject.toml): finished with status 'error'
    error: subprocess-exited-with-error

    × Building wheel for cffi (pyproject.toml) did not run successfully.
    │ exit code: 1
    ╰─> [48 lines of output]
        running bdist_wheel
        running build
        running build_py
        creating build/lib.macosx-14.0-arm64-cpython-313/cffi
        copying src/cffi/_imp_emulation.py -> build/lib.macosx-14.0-arm64-cpython-313/cffi
        copying src/cffi/backend_ctypes.py -> build/lib.macosx-14.0-arm64-cpython-313/cffi
        copying src/cffi/error.py -> build/lib.macosx-14.0-arm64-cpython-313/cffi
        copying src/cffi/setuptools_ext.py -> build/lib.macosx-14.0-arm64-cpython-313/cffi
        copying src/cffi/_shimmed_dist_utils.py -> build/lib.macosx-14.0-arm64-cpython-313/cffi
        copying src/cffi/__init__.py -> build/lib.macosx-14.0-arm64-cpython-313/cffi
        copying src/cffi/cffi_opcode.py -> build/lib.macosx-14.0-arm64-cpython-313/cffi
        copying src/cffi/vengine_gen.py -> build/lib.macosx-14.0-arm64-cpython-313/cffi
        copying src/cffi/pkgconfig.py -> build/lib.macosx-14.0-arm64-cpython-313/cffi
        copying src/cffi/model.py -> build/lib.macosx-14.0-arm64-cpython-313/cffi
        copying src/cffi/ffiplatform.py -> build/lib.macosx-14.0-arm64-cpython-313/cffi
        copying src/cffi/api.py -> build/lib.macosx-14.0-arm64-cpython-313/cffi
        copying src/cffi/vengine_cpy.py -> build/lib.macosx-14.0-arm64-cpython-313/cffi
        copying src/cffi/commontypes.py -> build/lib.macosx-14.0-arm64-cpython-313/cffi
        copying src/cffi/lock.py -> build/lib.macosx-14.0-arm64-cpython-313/cffi
        copying src/cffi/recompiler.py -> build/lib.macosx-14.0-arm64-cpython-313/cffi
        copying src/cffi/cparser.py -> build/lib.macosx-14.0-arm64-cpython-313/cffi
        copying src/cffi/verifier.py -> build/lib.macosx-14.0-arm64-cpython-313/cffi
        copying src/cffi/_cffi_include.h -> build/lib.macosx-14.0-arm64-cpython-313/cffi
        copying src/cffi/parse_c_type.h -> build/lib.macosx-14.0-arm64-cpython-313/cffi
        copying src/cffi/_embedding.h -> build/lib.macosx-14.0-arm64-cpython-313/cffi
        copying src/cffi/_cffi_errors.h -> build/lib.macosx-14.0-arm64-cpython-313/cffi
        running build_ext
        building '_cffi_backend' extension
        creating build/temp.macosx-14.0-arm64-cpython-313/src/c
        clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -DFFI_BUILDING=1 -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/ffi -I/Users/runner/work/DeepSea/DeepSea/enricomi-publish-action-venv/include -I/opt/homebrew/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/include/python3.13 -c src/c/_cffi_backend.c -o build/temp.macosx-14.0-arm64-cpython-313/src/c/_cffi_backend.o -iwithsysroot/usr/include/ffi
        src/c/_cffi_backend.c:4532:22: warning: 'Py_FileSystemDefaultEncoding' is deprecated [-Wdeprecated-declarations]
                             Py_FileSystemDefaultEncoding, &filename_or_null, &flags))
                             ^
        /opt/homebrew/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/include/python3.13/fileobject.h:22:1: note: 'Py_FileSystemDefaultEncoding' has been explicitly marked deprecated here
        Py_DEPRECATED(3.12) PyAPI_DATA(const char *) Py_FileSystemDefaultEncoding;
        ^
        /opt/homebrew/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/include/python3.13/pyport.h:251:54: note: expanded from macro 'Py_DEPRECATED'
        #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                             ^
        src/c/_cffi_backend.c:6121:9: error: call to undeclared function '_PyErr_WriteUnraisableMsg'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                _PyErr_WriteUnraisableMsg(PyText_AS_UTF8(s), NULL);
                ^
        src/c/_cffi_backend.c:6121:9: note: did you mean 'PyErr_WriteUnraisable'?
        /opt/homebrew/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/include/python3.13/pyerrors.h:233:18: note: 'PyErr_WriteUnraisable' declared here
        PyAPI_FUNC(void) PyErr_WriteUnraisable(PyObject *);
                         ^
        1 warning and 1 error generated.
        error: command '/usr/bin/clang' failed with exit code 1
        [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
    ERROR: Failed building wheel for cffi
  Successfully built lxml
  Failed to build cffi
  ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (cffi)

This appears to be in the cffi dependency, which added support for Python 3.13 in 1.17.

EnricoMi commented 1 month ago

Thanks for pointing this out!

EnricoMi commented 1 month ago

Fix has been released.

akb825 commented 1 month ago

Thanks, I have verified that the latest release works as expected.