Skip to content

greenlet can't build with python 3.14.0a7 #440

@zzzeek

Description

@zzzeek

hi greenlet -

greenlet was working for 3.14.0a5 and 3.14.0a6, but it looks like we're out of luck again for a7 just released today:

$ ~/.venv314/bin/pip install greenlet --force --no-cache
Collecting greenlet
  Downloading greenlet-3.1.1.tar.gz (186 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: greenlet
  Building wheel for greenlet (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for greenlet (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [209 lines of output]
      /tmp/pip-build-env-ywn3tht3/overlay/lib/python3.14/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
      !!
      
              ********************************************************************************
              Please consider removing the following classifiers in favor of a SPDX license expression:
      
              License :: OSI Approved :: MIT License
      
              See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
              ********************************************************************************
      
      !!
        self._finalize_license_expression()
      running bdist_wheel
      running build
      running build_py
      creating build/lib.linux-x86_64-cpython-314/greenlet
      copying src/greenlet/__init__.py -> build/lib.linux-x86_64-cpython-314/greenlet
      creating build/lib.linux-x86_64-cpython-314/greenlet/tests
      copying src/greenlet/tests/test_weakref.py -> build/lib.linux-x86_64-cpython-314/greenlet/tests
      copying src/greenlet/tests/test_version.py -> build/lib.linux-x86_64-cpython-314/greenlet/tests
      copying src/greenlet/tests/test_tracing.py -> build/lib.linux-x86_64-cpython-314/greenlet/tests
      copying src/greenlet/tests/test_throw.py -> build/lib.linux-x86_64-cpython-314/greenlet/tests
      copying src/greenlet/tests/test_stack_saved.py -> build/lib.linux-x86_64-cpython-314/greenlet/tests
      copying src/greenlet/tests/test_leaks.py -> build/lib.linux-x86_64-cpython-314/greenlet/tests
      copying src/greenlet/tests/test_greenlet_trash.py -> build/lib.linux-x86_64-cpython-314/greenlet/tests
      copying src/greenlet/tests/test_greenlet.py -> build/lib.linux-x86_64-cpython-314/greenlet/tests
      copying src/greenlet/tests/test_generator_nested.py -> build/lib.linux-x86_64-cpython-314/greenlet/tests
      copying src/greenlet/tests/test_generator.py -> build/lib.linux-x86_64-cpython-314/greenlet/tests
      copying src/greenlet/tests/test_gc.py -> build/lib.linux-x86_64-cpython-314/greenlet/tests
      copying src/greenlet/tests/test_extension_interface.py -> build/lib.linux-x86_64-cpython-314/greenlet/tests
      copying src/greenlet/tests/test_cpp.py -> build/lib.linux-x86_64-cpython-314/greenlet/tests
      copying src/greenlet/tests/test_contextvars.py -> build/lib.linux-x86_64-cpython-314/greenlet/tests
      copying src/greenlet/tests/leakcheck.py -> build/lib.linux-x86_64-cpython-314/greenlet/tests
      copying src/greenlet/tests/fail_switch_two_greenlets.py -> build/lib.linux-x86_64-cpython-314/greenlet/tests
      copying src/greenlet/tests/fail_switch_three_greenlets2.py -> build/lib.linux-x86_64-cpython-314/greenlet/tests
      copying src/greenlet/tests/fail_switch_three_greenlets.py -> build/lib.linux-x86_64-cpython-314/greenlet/tests
      copying src/greenlet/tests/fail_slp_switch.py -> build/lib.linux-x86_64-cpython-314/greenlet/tests
      copying src/greenlet/tests/fail_initialstub_already_started.py -> build/lib.linux-x86_64-cpython-314/greenlet/tests
      copying src/greenlet/tests/fail_cpp_exception.py -> build/lib.linux-x86_64-cpython-314/greenlet/tests
      copying src/greenlet/tests/fail_clearing_run_switches.py -> build/lib.linux-x86_64-cpython-314/greenlet/tests
      copying src/greenlet/tests/__init__.py -> build/lib.linux-x86_64-cpython-314/greenlet/tests
      creating build/lib.linux-x86_64-cpython-314/greenlet/platform
      copying src/greenlet/platform/__init__.py -> build/lib.linux-x86_64-cpython-314/greenlet/platform
      running egg_info
      writing src/greenlet.egg-info/PKG-INFO
      writing dependency_links to src/greenlet.egg-info/dependency_links.txt
      writing requirements to src/greenlet.egg-info/requires.txt
      writing top-level names to src/greenlet.egg-info/top_level.txt
      reading manifest file 'src/greenlet.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no previously-included files found matching 'benchmarks/*.json'
      no previously-included directories found matching 'docs/_build'
      warning: no files found matching '*.py' under directory 'appveyor'
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      warning: no previously-included files matching '*.pyd' found anywhere in distribution
      warning: no previously-included files matching '*.so' found anywhere in distribution
      warning: no previously-included files matching '.coverage' found anywhere in distribution
      adding license file 'LICENSE'
      adding license file 'LICENSE.PSF'
      adding license file 'AUTHORS'
      writing manifest file 'src/greenlet.egg-info/SOURCES.txt'
      copying src/greenlet/CObjects.cpp -> build/lib.linux-x86_64-cpython-314/greenlet
      copying src/greenlet/PyGreenlet.cpp -> build/lib.linux-x86_64-cpython-314/greenlet
      copying src/greenlet/PyGreenlet.hpp -> build/lib.linux-x86_64-cpython-314/greenlet
      copying src/greenlet/PyGreenletUnswitchable.cpp -> build/lib.linux-x86_64-cpython-314/greenlet
      copying src/greenlet/PyModule.cpp -> build/lib.linux-x86_64-cpython-314/greenlet
      copying src/greenlet/TBrokenGreenlet.cpp -> build/lib.linux-x86_64-cpython-314/greenlet
      copying src/greenlet/TExceptionState.cpp -> build/lib.linux-x86_64-cpython-314/greenlet
      copying src/greenlet/TGreenlet.cpp -> build/lib.linux-x86_64-cpython-314/greenlet
      copying src/greenlet/TGreenlet.hpp -> build/lib.linux-x86_64-cpython-314/greenlet
      copying src/greenlet/TGreenletGlobals.cpp -> build/lib.linux-x86_64-cpython-314/greenlet
      copying src/greenlet/TMainGreenlet.cpp -> build/lib.linux-x86_64-cpython-314/greenlet
      copying src/greenlet/TPythonState.cpp -> build/lib.linux-x86_64-cpython-314/greenlet
      copying src/greenlet/TStackState.cpp -> build/lib.linux-x86_64-cpython-314/greenlet
      copying src/greenlet/TThreadState.hpp -> build/lib.linux-x86_64-cpython-314/greenlet
      copying src/greenlet/TThreadStateCreator.hpp -> build/lib.linux-x86_64-cpython-314/greenlet
      copying src/greenlet/TThreadStateDestroy.cpp -> build/lib.linux-x86_64-cpython-314/greenlet
      copying src/greenlet/TUserGreenlet.cpp -> build/lib.linux-x86_64-cpython-314/greenlet
      copying src/greenlet/greenlet.cpp -> build/lib.linux-x86_64-cpython-314/greenlet
      copying src/greenlet/greenlet.h -> build/lib.linux-x86_64-cpython-314/greenlet
      copying src/greenlet/greenlet_allocator.hpp -> build/lib.linux-x86_64-cpython-314/greenlet
      copying src/greenlet/greenlet_compiler_compat.hpp -> build/lib.linux-x86_64-cpython-314/greenlet
      copying src/greenlet/greenlet_cpython_add_pending.hpp -> build/lib.linux-x86_64-cpython-314/greenlet
      copying src/greenlet/greenlet_cpython_compat.hpp -> build/lib.linux-x86_64-cpython-314/greenlet
      copying src/greenlet/greenlet_exceptions.hpp -> build/lib.linux-x86_64-cpython-314/greenlet
      copying src/greenlet/greenlet_internal.hpp -> build/lib.linux-x86_64-cpython-314/greenlet
      copying src/greenlet/greenlet_refs.hpp -> build/lib.linux-x86_64-cpython-314/greenlet
      copying src/greenlet/greenlet_slp_switch.hpp -> build/lib.linux-x86_64-cpython-314/greenlet
      copying src/greenlet/greenlet_thread_support.hpp -> build/lib.linux-x86_64-cpython-314/greenlet
      copying src/greenlet/slp_platformselect.h -> build/lib.linux-x86_64-cpython-314/greenlet
      copying src/greenlet/tests/_test_extension.c -> build/lib.linux-x86_64-cpython-314/greenlet/tests
      copying src/greenlet/tests/_test_extension_cpp.cpp -> build/lib.linux-x86_64-cpython-314/greenlet/tests
      copying src/greenlet/platform/setup_switch_x64_masm.cmd -> build/lib.linux-x86_64-cpython-314/greenlet/platform
      copying src/greenlet/platform/switch_aarch64_gcc.h -> build/lib.linux-x86_64-cpython-314/greenlet/platform
      copying src/greenlet/platform/switch_alpha_unix.h -> build/lib.linux-x86_64-cpython-314/greenlet/platform
      copying src/greenlet/platform/switch_amd64_unix.h -> build/lib.linux-x86_64-cpython-314/greenlet/platform
      copying src/greenlet/platform/switch_arm32_gcc.h -> build/lib.linux-x86_64-cpython-314/greenlet/platform
      copying src/greenlet/platform/switch_arm32_ios.h -> build/lib.linux-x86_64-cpython-314/greenlet/platform
      copying src/greenlet/platform/switch_arm64_masm.asm -> build/lib.linux-x86_64-cpython-314/greenlet/platform
      copying src/greenlet/platform/switch_arm64_masm.obj -> build/lib.linux-x86_64-cpython-314/greenlet/platform
      copying src/greenlet/platform/switch_arm64_msvc.h -> build/lib.linux-x86_64-cpython-314/greenlet/platform
      copying src/greenlet/platform/switch_csky_gcc.h -> build/lib.linux-x86_64-cpython-314/greenlet/platform
      copying src/greenlet/platform/switch_loongarch64_linux.h -> build/lib.linux-x86_64-cpython-314/greenlet/platform
      copying src/greenlet/platform/switch_m68k_gcc.h -> build/lib.linux-x86_64-cpython-314/greenlet/platform
      copying src/greenlet/platform/switch_mips_unix.h -> build/lib.linux-x86_64-cpython-314/greenlet/platform
      copying src/greenlet/platform/switch_ppc64_aix.h -> build/lib.linux-x86_64-cpython-314/greenlet/platform
      copying src/greenlet/platform/switch_ppc64_linux.h -> build/lib.linux-x86_64-cpython-314/greenlet/platform
      copying src/greenlet/platform/switch_ppc_aix.h -> build/lib.linux-x86_64-cpython-314/greenlet/platform
      copying src/greenlet/platform/switch_ppc_linux.h -> build/lib.linux-x86_64-cpython-314/greenlet/platform
      copying src/greenlet/platform/switch_ppc_macosx.h -> build/lib.linux-x86_64-cpython-314/greenlet/platform
      copying src/greenlet/platform/switch_ppc_unix.h -> build/lib.linux-x86_64-cpython-314/greenlet/platform
      copying src/greenlet/platform/switch_riscv_unix.h -> build/lib.linux-x86_64-cpython-314/greenlet/platform
      copying src/greenlet/platform/switch_s390_unix.h -> build/lib.linux-x86_64-cpython-314/greenlet/platform
      copying src/greenlet/platform/switch_sh_gcc.h -> build/lib.linux-x86_64-cpython-314/greenlet/platform
      copying src/greenlet/platform/switch_sparc_sun_gcc.h -> build/lib.linux-x86_64-cpython-314/greenlet/platform
      copying src/greenlet/platform/switch_x32_unix.h -> build/lib.linux-x86_64-cpython-314/greenlet/platform
      copying src/greenlet/platform/switch_x64_masm.asm -> build/lib.linux-x86_64-cpython-314/greenlet/platform
      copying src/greenlet/platform/switch_x64_masm.obj -> build/lib.linux-x86_64-cpython-314/greenlet/platform
      copying src/greenlet/platform/switch_x64_msvc.h -> build/lib.linux-x86_64-cpython-314/greenlet/platform
      copying src/greenlet/platform/switch_x86_msvc.h -> build/lib.linux-x86_64-cpython-314/greenlet/platform
      copying src/greenlet/platform/switch_x86_unix.h -> build/lib.linux-x86_64-cpython-314/greenlet/platform
      running build_ext
      building 'greenlet._greenlet' extension
      creating build/temp.linux-x86_64-cpython-314/src/greenlet
      g++ -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I/home/classic/.venv314/include -I/opt/python-3.14.0a7/include/python3.14 -c src/greenlet/greenlet.cpp -o build/temp.linux-x86_64-cpython-314/src/greenlet/greenlet.o
      In file included from src/greenlet/greenlet.cpp:31:
      src/greenlet/TGreenlet.cpp: In member function ‘void greenlet::Greenlet::expose_frames()’:
      src/greenlet/TGreenlet.cpp:626:29: error: aggregate ‘_PyInterpreterFrame iframe_copy’ has incomplete type and cannot be defined
        626 |         _PyInterpreterFrame iframe_copy;
            |                             ^~~~~~~~~~~
      src/greenlet/TGreenlet.cpp:627:65: error: invalid application of ‘sizeof’ to incomplete type ‘_PyInterpreterFrame’
        627 |         this->stack_state.copy_from_stack(&iframe_copy, iframe, sizeof(*iframe));
            |                                                                 ^~~~~~~~~~~~~~~
      src/greenlet/TGreenlet.cpp:628:14: error: ‘_PyFrame_IsIncomplete’ was not declared in this scope
        628 |         if (!_PyFrame_IsIncomplete(&iframe_copy)) {
            |              ^~~~~~~~~~~~~~~~~~~~~
      src/greenlet/TGreenlet.cpp:654:24: error: invalid use of incomplete type ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
        654 |             if (!iframe->frame_obj) {
            |                        ^~
      In file included from /opt/python-3.14.0a7/include/python3.14/pyframe.h:19,
                       from /opt/python-3.14.0a7/include/python3.14/Python.h:104,
                       from src/greenlet/greenlet.cpp:16:
      /opt/python-3.14.0a7/include/python3.14/cpython/pyframe.h:25:8: note: forward declaration of ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
         25 | struct _PyInterpreterFrame;
            |        ^~~~~~~~~~~~~~~~~~~
      src/greenlet/TGreenlet.cpp:656:37: error: aggregate ‘_PyInterpreterFrame dummy_iframe’ has incomplete type and cannot be defined
        656 |                 _PyInterpreterFrame dummy_iframe;
            |                                     ^~~~~~~~~~~~
      src/greenlet/TGreenlet.cpp:661:38: error: ‘FRAME_OWNED_BY_GENERATOR’ was not declared in this scope
        661 |                 dummy_iframe.owner = FRAME_OWNED_BY_GENERATOR;
            |                                      ^~~~~~~~~~~~~~~~~~~~~~~~
      src/greenlet/TGreenlet.cpp:686:45: error: invalid use of incomplete type ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
        686 |                 memcpy(&last_complete_iframe->frame_obj->_f_frame_data[0],
            |                                             ^~
      /opt/python-3.14.0a7/include/python3.14/cpython/pyframe.h:25:8: note: forward declaration of ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
         25 | struct _PyInterpreterFrame;
            |        ^~~~~~~~~~~~~~~~~~~
      src/greenlet/TGreenlet.cpp:687:45: error: invalid use of incomplete type ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
        687 |                        &last_complete_iframe->previous, sizeof(void *));
            |                                             ^~
      /opt/python-3.14.0a7/include/python3.14/cpython/pyframe.h:25:8: note: forward declaration of ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
         25 | struct _PyInterpreterFrame;
            |        ^~~~~~~~~~~~~~~~~~~
      src/greenlet/TGreenlet.cpp:688:37: error: invalid use of incomplete type ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
        688 |                 last_complete_iframe->previous = iframe;
            |                                     ^~
      /opt/python-3.14.0a7/include/python3.14/cpython/pyframe.h:25:8: note: forward declaration of ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
         25 | struct _PyInterpreterFrame;
            |        ^~~~~~~~~~~~~~~~~~~
      src/greenlet/TGreenlet.cpp:705:37: error: invalid use of incomplete type ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
        705 |         memcpy(&last_complete_iframe->frame_obj->_f_frame_data[0],
            |                                     ^~
      /opt/python-3.14.0a7/include/python3.14/cpython/pyframe.h:25:8: note: forward declaration of ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
         25 | struct _PyInterpreterFrame;
            |        ^~~~~~~~~~~~~~~~~~~
      src/greenlet/TGreenlet.cpp:706:37: error: invalid use of incomplete type ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
        706 |                &last_complete_iframe->previous, sizeof(void *));
            |                                     ^~
      /opt/python-3.14.0a7/include/python3.14/cpython/pyframe.h:25:8: note: forward declaration of ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
         25 | struct _PyInterpreterFrame;
            |        ^~~~~~~~~~~~~~~~~~~
      src/greenlet/TGreenlet.cpp:707:29: error: invalid use of incomplete type ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
        707 |         last_complete_iframe->previous = nullptr;
            |                             ^~
      /opt/python-3.14.0a7/include/python3.14/cpython/pyframe.h:25:8: note: forward declaration of ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
         25 | struct _PyInterpreterFrame;
            |        ^~~~~~~~~~~~~~~~~~~
      In file included from src/greenlet/greenlet.cpp:36:
      src/greenlet/TPythonState.cpp: In member function ‘void greenlet::PythonState::unexpose_frames()’:
      src/greenlet/TPythonState.cpp:179:51: error: invalid use of incomplete type ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
        179 |         _PyInterpreterFrame *prev_exposed = iframe->previous;
            |                                                   ^~
      /opt/python-3.14.0a7/include/python3.14/cpython/pyframe.h:25:8: note: forward declaration of ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
         25 | struct _PyInterpreterFrame;
            |        ^~~~~~~~~~~~~~~~~~~
      src/greenlet/TPythonState.cpp:181:23: error: invalid use of incomplete type ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
        181 |         memcpy(&iframe->previous, &iframe->frame_obj->_f_frame_data[0],
            |                       ^~
      /opt/python-3.14.0a7/include/python3.14/cpython/pyframe.h:25:8: note: forward declaration of ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
         25 | struct _PyInterpreterFrame;
            |        ^~~~~~~~~~~~~~~~~~~
      src/greenlet/TPythonState.cpp:181:42: error: invalid use of incomplete type ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
        181 |         memcpy(&iframe->previous, &iframe->frame_obj->_f_frame_data[0],
            |                                          ^~
      /opt/python-3.14.0a7/include/python3.14/cpython/pyframe.h:25:8: note: forward declaration of ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
         25 | struct _PyInterpreterFrame;
            |        ^~~~~~~~~~~~~~~~~~~
      error: command '/usr/bin/g++' 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 greenlet
Failed to build greenlet
ERROR: Failed to build installable wheels for some pyproject.toml based projects (greenlet)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions