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

Fail to build with Python 3.13 #392

Closed
boasmeier opened this issue Dec 12, 2023 · 7 comments
Closed

Fail to build with Python 3.13 #392

boasmeier opened this issue Dec 12, 2023 · 7 comments

Comments

@boasmeier
Copy link

Description

The package cannot be built on Python 3.13.

Expected Behavior

The package can be built successfully when running pip install greenlet

Actual Behavior

Collecting greenlet
  Using cached greenlet-3.0.2.tar.gz (175 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... 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
  ╰─> [194 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-313
      creating build/lib.linux-x86_64-cpython-313/greenlet
      copying src/greenlet/__init__.py -> build/lib.linux-x86_64-cpython-313/greenlet
      creating build/lib.linux-x86_64-cpython-313/greenlet/platform
      copying src/greenlet/platform/__init__.py -> build/lib.linux-x86_64-cpython-313/greenlet/platform
      creating build/lib.linux-x86_64-cpython-313/greenlet/tests
      copying src/greenlet/tests/fail_initialstub_already_started.py -> build/lib.linux-x86_64-cpython-313/greenlet/tests
      copying src/greenlet/tests/test_stack_saved.py -> build/lib.linux-x86_64-cpython-313/greenlet/tests
      copying src/greenlet/tests/fail_cpp_exception.py -> build/lib.linux-x86_64-cpython-313/greenlet/tests
      copying src/greenlet/tests/fail_switch_two_greenlets.py -> build/lib.linux-x86_64-cpython-313/greenlet/tests
      copying src/greenlet/tests/__init__.py -> build/lib.linux-x86_64-cpython-313/greenlet/tests
      copying src/greenlet/tests/test_contextvars.py -> build/lib.linux-x86_64-cpython-313/greenlet/tests
      copying src/greenlet/tests/fail_slp_switch.py -> build/lib.linux-x86_64-cpython-313/greenlet/tests
      copying src/greenlet/tests/test_tracing.py -> build/lib.linux-x86_64-cpython-313/greenlet/tests
      copying src/greenlet/tests/test_greenlet.py -> build/lib.linux-x86_64-cpython-313/greenlet/tests
      copying src/greenlet/tests/test_extension_interface.py -> build/lib.linux-x86_64-cpython-313/greenlet/tests
      copying src/greenlet/tests/test_generator_nested.py -> build/lib.linux-x86_64-cpython-313/greenlet/tests
      copying src/greenlet/tests/test_generator.py -> build/lib.linux-x86_64-cpython-313/greenlet/tests
      copying src/greenlet/tests/test_greenlet_trash.py -> build/lib.linux-x86_64-cpython-313/greenlet/tests
      copying src/greenlet/tests/fail_switch_three_greenlets2.py -> build/lib.linux-x86_64-cpython-313/greenlet/tests
      copying src/greenlet/tests/leakcheck.py -> build/lib.linux-x86_64-cpython-313/greenlet/tests
      copying src/greenlet/tests/test_leaks.py -> build/lib.linux-x86_64-cpython-313/greenlet/tests
      copying src/greenlet/tests/test_version.py -> build/lib.linux-x86_64-cpython-313/greenlet/tests
      copying src/greenlet/tests/test_cpp.py -> build/lib.linux-x86_64-cpython-313/greenlet/tests
      copying src/greenlet/tests/fail_switch_three_greenlets.py -> build/lib.linux-x86_64-cpython-313/greenlet/tests
      copying src/greenlet/tests/test_weakref.py -> build/lib.linux-x86_64-cpython-313/greenlet/tests
      copying src/greenlet/tests/test_gc.py -> build/lib.linux-x86_64-cpython-313/greenlet/tests
      copying src/greenlet/tests/fail_clearing_run_switches.py -> build/lib.linux-x86_64-cpython-313/greenlet/tests
      copying src/greenlet/tests/test_throw.py -> build/lib.linux-x86_64-cpython-313/greenlet/tests
      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/TBrokenGreenlet.cpp -> build/lib.linux-x86_64-cpython-313/greenlet
      copying src/greenlet/TExceptionState.cpp -> build/lib.linux-x86_64-cpython-313/greenlet
      copying src/greenlet/TGreenlet.cpp -> build/lib.linux-x86_64-cpython-313/greenlet
      copying src/greenlet/TGreenletGlobals.cpp -> build/lib.linux-x86_64-cpython-313/greenlet
      copying src/greenlet/TMainGreenlet.cpp -> build/lib.linux-x86_64-cpython-313/greenlet
      copying src/greenlet/TPythonState.cpp -> build/lib.linux-x86_64-cpython-313/greenlet
      copying src/greenlet/TStackState.cpp -> build/lib.linux-x86_64-cpython-313/greenlet
      copying src/greenlet/TThreadStateDestroy.cpp -> build/lib.linux-x86_64-cpython-313/greenlet
      copying src/greenlet/TUserGreenlet.cpp -> build/lib.linux-x86_64-cpython-313/greenlet
      copying src/greenlet/greenlet.cpp -> build/lib.linux-x86_64-cpython-313/greenlet
      copying src/greenlet/greenlet.h -> build/lib.linux-x86_64-cpython-313/greenlet
      copying src/greenlet/greenlet_allocator.hpp -> build/lib.linux-x86_64-cpython-313/greenlet
      copying src/greenlet/greenlet_compiler_compat.hpp -> build/lib.linux-x86_64-cpython-313/greenlet
      copying src/greenlet/greenlet_cpython_add_pending.hpp -> build/lib.linux-x86_64-cpython-313/greenlet
      copying src/greenlet/greenlet_cpython_compat.hpp -> build/lib.linux-x86_64-cpython-313/greenlet
      copying src/greenlet/greenlet_exceptions.hpp -> build/lib.linux-x86_64-cpython-313/greenlet
      copying src/greenlet/greenlet_greenlet.hpp -> build/lib.linux-x86_64-cpython-313/greenlet
      copying src/greenlet/greenlet_internal.hpp -> build/lib.linux-x86_64-cpython-313/greenlet
      copying src/greenlet/greenlet_refs.hpp -> build/lib.linux-x86_64-cpython-313/greenlet
      copying src/greenlet/greenlet_slp_switch.hpp -> build/lib.linux-x86_64-cpython-313/greenlet
      copying src/greenlet/greenlet_thread_state.hpp -> build/lib.linux-x86_64-cpython-313/greenlet
      copying src/greenlet/greenlet_thread_state_dict_cleanup.hpp -> build/lib.linux-x86_64-cpython-313/greenlet
      copying src/greenlet/greenlet_thread_support.hpp -> build/lib.linux-x86_64-cpython-313/greenlet
      copying src/greenlet/slp_platformselect.h -> build/lib.linux-x86_64-cpython-313/greenlet
      copying src/greenlet/platform/setup_switch_x64_masm.cmd -> build/lib.linux-x86_64-cpython-313/greenlet/platform
      copying src/greenlet/platform/switch_aarch64_gcc.h -> build/lib.linux-x86_64-cpython-313/greenlet/platform
      copying src/greenlet/platform/switch_alpha_unix.h -> build/lib.linux-x86_64-cpython-313/greenlet/platform
      copying src/greenlet/platform/switch_amd64_unix.h -> build/lib.linux-x86_64-cpython-313/greenlet/platform
      copying src/greenlet/platform/switch_arm32_gcc.h -> build/lib.linux-x86_64-cpython-313/greenlet/platform
      copying src/greenlet/platform/switch_arm32_ios.h -> build/lib.linux-x86_64-cpython-313/greenlet/platform
      copying src/greenlet/platform/switch_arm64_masm.asm -> build/lib.linux-x86_64-cpython-313/greenlet/platform
      copying src/greenlet/platform/switch_arm64_masm.obj -> build/lib.linux-x86_64-cpython-313/greenlet/platform
      copying src/greenlet/platform/switch_arm64_msvc.h -> build/lib.linux-x86_64-cpython-313/greenlet/platform
      copying src/greenlet/platform/switch_csky_gcc.h -> build/lib.linux-x86_64-cpython-313/greenlet/platform
      copying src/greenlet/platform/switch_loongarch64_linux.h -> build/lib.linux-x86_64-cpython-313/greenlet/platform
      copying src/greenlet/platform/switch_m68k_gcc.h -> build/lib.linux-x86_64-cpython-313/greenlet/platform
      copying src/greenlet/platform/switch_mips_unix.h -> build/lib.linux-x86_64-cpython-313/greenlet/platform
      copying src/greenlet/platform/switch_ppc64_aix.h -> build/lib.linux-x86_64-cpython-313/greenlet/platform
      copying src/greenlet/platform/switch_ppc64_linux.h -> build/lib.linux-x86_64-cpython-313/greenlet/platform
      copying src/greenlet/platform/switch_ppc_aix.h -> build/lib.linux-x86_64-cpython-313/greenlet/platform
      copying src/greenlet/platform/switch_ppc_linux.h -> build/lib.linux-x86_64-cpython-313/greenlet/platform
      copying src/greenlet/platform/switch_ppc_macosx.h -> build/lib.linux-x86_64-cpython-313/greenlet/platform
      copying src/greenlet/platform/switch_ppc_unix.h -> build/lib.linux-x86_64-cpython-313/greenlet/platform
      copying src/greenlet/platform/switch_riscv_unix.h -> build/lib.linux-x86_64-cpython-313/greenlet/platform
      copying src/greenlet/platform/switch_s390_unix.h -> build/lib.linux-x86_64-cpython-313/greenlet/platform
      copying src/greenlet/platform/switch_sparc_sun_gcc.h -> build/lib.linux-x86_64-cpython-313/greenlet/platform
      copying src/greenlet/platform/switch_x32_unix.h -> build/lib.linux-x86_64-cpython-313/greenlet/platform
      copying src/greenlet/platform/switch_x64_masm.asm -> build/lib.linux-x86_64-cpython-313/greenlet/platform
      copying src/greenlet/platform/switch_x64_masm.obj -> build/lib.linux-x86_64-cpython-313/greenlet/platform
      copying src/greenlet/platform/switch_x64_msvc.h -> build/lib.linux-x86_64-cpython-313/greenlet/platform
      copying src/greenlet/platform/switch_x86_msvc.h -> build/lib.linux-x86_64-cpython-313/greenlet/platform
      copying src/greenlet/platform/switch_x86_unix.h -> build/lib.linux-x86_64-cpython-313/greenlet/platform
      copying src/greenlet/tests/_test_extension.c -> build/lib.linux-x86_64-cpython-313/greenlet/tests
      copying src/greenlet/tests/_test_extension_cpp.cpp -> build/lib.linux-x86_64-cpython-313/greenlet/tests
      running build_ext
      building 'greenlet._greenlet' extension
      creating build/temp.linux-x86_64-cpython-313
      creating build/temp.linux-x86_64-cpython-313/src
      creating build/temp.linux-x86_64-cpython-313/src/greenlet
      x86_64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/home/boas/git/ng-ansible/.venv/include -I/usr/include/python3.13 -c src/greenlet/greenlet.cpp -o build/temp.linux-x86_64-cpython-313/src/greenlet/greenlet.o
      In file included from src/greenlet/greenlet_greenlet.hpp:26,
                       from src/greenlet/greenlet_internal.hpp:20,
                       from src/greenlet/greenlet.cpp:19:
      /usr/include/python3.13/internal/pycore_frame.h:8:4: error: #error "this header requires Py_BUILD_CORE define"
          8 | #  error "this header requires Py_BUILD_CORE define"
            |    ^~~~~
      In file included from /usr/include/python3.13/internal/pycore_frame.h:13,
                       from src/greenlet/greenlet_greenlet.hpp:26,
                       from src/greenlet/greenlet_internal.hpp:20,
                       from src/greenlet/greenlet.cpp:19:
      /usr/include/python3.13/internal/pycore_code.h:8:4: error: #error "this header requires Py_BUILD_CORE define"
          8 | #  error "this header requires Py_BUILD_CORE define"
            |    ^~~~~
      In file included from src/greenlet/greenlet_internal.hpp:20,
                       from src/greenlet/greenlet.cpp:19:
      src/greenlet/greenlet_greenlet.hpp:104:9: error: ‘_PyCFrame’ does not name a type; did you mean ‘_frame’?
        104 |         _PyCFrame* cframe;
            |         ^~~~~~~~~
            |         _frame
      src/greenlet/greenlet_greenlet.hpp:138:29: error: ‘_PyCFrame’ has not been declared
        138 |         void set_new_cframe(_PyCFrame& frame) noexcept;
            |                             ^~~~~~~~~
      In file included from src/greenlet/greenlet.cpp:33:
      src/greenlet/TUserGreenlet.cpp: In member function ‘virtual greenlet::Greenlet::switchstack_result_t greenlet::UserGreenlet::g_initialstub(void*)’:
      src/greenlet/TUserGreenlet.cpp:280:5: error: ‘_PyCFrame’ was not declared in this scope; did you mean ‘_frame’?
        280 |     _PyCFrame trace_info;
            |     ^~~~~~~~~
            |     _frame
      src/greenlet/TUserGreenlet.cpp:282:39: error: ‘trace_info’ was not declared in this scope
        282 |     this->python_state.set_new_cframe(trace_info);
            |                                       ^~~~~~~~~~
      In file included from src/greenlet/greenlet.cpp:36:
      src/greenlet/TPythonState.cpp: In constructor ‘greenlet::PythonState::PythonState()’:
      src/greenlet/TPythonState.cpp:12:6: error: class ‘greenlet::PythonState’ does not have any field named ‘cframe’
         12 |     ,cframe(nullptr)
            |      ^~~~~~
      src/greenlet/TPythonState.cpp:82:11: error: ‘class greenlet::PythonState’ has no member named ‘cframe’
         82 |     this->cframe = &PyThreadState_GET()->root_cframe;
            |           ^~~~~~
      src/greenlet/TPythonState.cpp:82:42: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘root_cframe’
         82 |     this->cframe = &PyThreadState_GET()->root_cframe;
            |                                          ^~~~~~~~~~~
      src/greenlet/TPythonState.cpp: In member function ‘void greenlet::PythonState::operator<<(const PyThreadState*)’:
      src/greenlet/TPythonState.cpp:128:11: error: ‘class greenlet::PythonState’ has no member named ‘cframe’
        128 |     this->cframe = tstate->cframe;
            |           ^~~~~~
      src/greenlet/TPythonState.cpp:128:28: error: ‘const PyThreadState’ {aka ‘const struct _ts’} has no member named ‘cframe’
        128 |     this->cframe = tstate->cframe;
            |                            ^~~~~~
      src/greenlet/TPythonState.cpp:136:31: error: ‘C_RECURSION_LIMIT’ was not declared in this scope; did you mean ‘Py_C_RECURSION_LIMIT’?
        136 |     this->c_recursion_depth = C_RECURSION_LIMIT - tstate->c_recursion_remaining;
            |                               ^~~~~~~~~~~~~~~~~
            |                               Py_C_RECURSION_LIMIT
      src/greenlet/TPythonState.cpp:140:35: error: ‘const PyThreadState’ {aka ‘const struct _ts’} has no member named ‘cframe’
        140 |     this->current_frame = tstate->cframe->current_frame;
            |                                   ^~~~~~
      src/greenlet/TPythonState.cpp: In member function ‘void greenlet::PythonState::operator>>(PyThreadState*)’:
      src/greenlet/TPythonState.cpp:175:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘cframe’
        175 |     tstate->cframe = this->cframe;
            |             ^~~~~~
      src/greenlet/TPythonState.cpp:175:28: error: ‘class greenlet::PythonState’ has no member named ‘cframe’
        175 |     tstate->cframe = this->cframe;
            |                            ^~~~~~
      src/greenlet/TPythonState.cpp:189:37: error: ‘C_RECURSION_LIMIT’ was not declared in this scope; did you mean ‘Py_C_RECURSION_LIMIT’?
        189 |     tstate->c_recursion_remaining = C_RECURSION_LIMIT - this->c_recursion_depth;
            |                                     ^~~~~~~~~~~~~~~~~
            |                                     Py_C_RECURSION_LIMIT
      src/greenlet/TPythonState.cpp:200:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘cframe’
        200 |     tstate->cframe->current_frame = this->current_frame;
            |             ^~~~~~
      src/greenlet/TPythonState.cpp: At global scope:
      src/greenlet/TPythonState.cpp:266:6: error: variable or field ‘set_new_cframe’ declared void
        266 | void PythonState::set_new_cframe(_PyCFrame& frame) noexcept
            |      ^~~~~~~~~~~
      src/greenlet/TPythonState.cpp:266:34: error: ‘_PyCFrame’ was not declared in this scope; did you mean ‘_frame’?
        266 | void PythonState::set_new_cframe(_PyCFrame& frame) noexcept
            |                                  ^~~~~~~~~
            |                                  _frame
      src/greenlet/TPythonState.cpp:266:45: error: ‘frame’ was not declared in this scope; did you mean ‘_frame’?
        266 | void PythonState::set_new_cframe(_PyCFrame& frame) noexcept
            |                                             ^~~~~
            |                                             _frame
      error: command '/usr/bin/x86_64-linux-gnu-gcc' 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: Could not build wheels for greenlet, which is required to install pyproject.toml-based projects

Stepts to reproduce

pip install greenlet

Environment

  • Ubuntu 22.04
  • Python 3.13
  • pip 23.3.1
@jamadden
Copy link
Contributor

Python 3.13 is in early phases of development and obviously internal details have changed. It will take porting work to make that happen. I don't usually track pre-release versions until the beta phase --- I just don't have the time anymore --- but if you want to submit a PR that makes the alpha versions work, and if you'll commit to keeping the alpha versions working on every new release, I'd be happy to take a look.

I don't want to add a pre-release interpreter to our CI if there's a decent chance that the next pre-release will break it again, as that makes releases unnecessarily complicated. Hence the need for a commitment to keep all the alphas working once added.

@boasmeier
Copy link
Author

boasmeier commented Dec 16, 2023

Thanks for the quick reply. I see, it is totally reasonable to me to not support pre-release versions. Probably I won't find the time to prepare a PR with the commitment to keep all the alphas working. However, should I nevertheless start such an endeavor I would mention it here so others know that someone is working on it.

vstinner added a commit to vstinner/greenlet that referenced this issue Feb 14, 2024
* Replace C_RECURSION_LIMIT with Py_C_RECURSION_LIMIT.
* Add Py_C_RECURSION_LIMIT for Python 3.12 and older.
* Disable GREENLET_USE_CFRAME on Python 3.13.
* Define Py_BUILD_CORE to include pycore_frame.h.
@vstinner
Copy link
Contributor

@boasmeier:

I see, it is totally reasonable to me to not support pre-release versions. Probably I won't find the time to prepare a PR with the commitment to keep all the alphas working. However, should I nevertheless start such an endeavor I would mention it here so others know that someone is working on it.

Hi, I wrote #396 which ports greenlet to Python 3.13.

@vstinner
Copy link
Contributor

vstinner commented Sep 5, 2024

@jamadden jamadden closed this as completed

Congrats! Cool :-) Thank you @jamadden!

jamadden pushed a commit to samschlegel/greenlet that referenced this issue Sep 9, 2024
* Replace C_RECURSION_LIMIT with Py_C_RECURSION_LIMIT.
* Add Py_C_RECURSION_LIMIT for Python 3.12 and older.
* Disable GREENLET_USE_CFRAME on Python 3.13.
* Define Py_BUILD_CORE to include pycore_frame.h.
@ravi005e
Copy link

doesnt work on windows using
Microsoft Visual Studio 2022
python 3.13

  copying src\greenlet\tests\_test_extension_cpp.cpp -> build\lib.win-amd64-cpython-313\greenlet\tests
  running build_ext
  building 'greenlet._greenlet' extension
  creating build\temp.win-amd64-cpython-313\Release\src\greenlet
  "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.41.34120\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DWIN32=1

-IC:\Users\ravi0\AppData\Local\Programs\Python\Python313\include -IC:..\AppData\Local\Programs\Python\Python313\Include "-IC:\Program Files\Microsoft
Visual Studio\2022\Professional\VC\Tools\MSVC\14.41.34120\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.41.34120\ATLMFC
\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\u
crt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared" "-IC:\Program
Files (x86)\Windows Kits\10\include\10.0.22621.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tpsrc/greenlet/greenlet.cpp /Fobuild\temp.win-amd64-cpython-313\Release\src/greenlet/greenlet.obj /EHsr /GT
greenlet.cpp
C:..\AppData\Local\Programs\Python\Python313\include\internal/pycore_frame.h(8): fatal error C1189: #error: "this header requires Py_BUILD_CORE define"
error: command 'C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.41.34120\bin\HostX86\x64\cl.exe' failed with exit code 2
[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

@Eimis
Copy link

Eimis commented Oct 30, 2024

Doesn't build on Mac OS X with Docker and docker-compose and python:3.13.0-slim base Docker image:

4.630   - Installing tzdata (2023.4)
9.604
9.604   ChefBuildError
9.604
9.604   Backend subprocess exited when trying to invoke build_wheel
9.604
9.604   running bdist_wheel
9.604   running build
9.604   running build_py
9.604   creating build/lib.linux-aarch64-cpython-313/greenlet
9.604   copying src/greenlet/__init__.py -> build/lib.linux-aarch64-cpython-313/greenlet
9.604   creating build/lib.linux-aarch64-cpython-313/greenlet/tests
9.604   copying src/greenlet/tests/test_version.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests
9.604   copying src/greenlet/tests/fail_cpp_exception.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests
9.604   copying src/greenlet/tests/fail_slp_switch.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests
9.604   copying src/greenlet/tests/test_tracing.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests
9.604   copying src/greenlet/tests/test_cpp.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests
9.604   copying src/greenlet/tests/leakcheck.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests
9.604   copying src/greenlet/tests/fail_switch_three_greenlets.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests
9.604   copying src/greenlet/tests/fail_switch_two_greenlets.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests
9.604   copying src/greenlet/tests/test_throw.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests
9.604   copying src/greenlet/tests/test_stack_saved.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests
9.604   copying src/greenlet/tests/test_contextvars.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests
9.604   copying src/greenlet/tests/test_generator_nested.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests
9.604   copying src/greenlet/tests/test_extension_interface.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests
9.604   copying src/greenlet/tests/test_gc.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests
9.604   copying src/greenlet/tests/__init__.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests
9.604   copying src/greenlet/tests/fail_clearing_run_switches.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests
9.604   copying src/greenlet/tests/test_weakref.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests
9.604   copying src/greenlet/tests/test_greenlet.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests
9.604   copying src/greenlet/tests/fail_initialstub_already_started.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests
9.604   copying src/greenlet/tests/test_leaks.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests
9.604   copying src/greenlet/tests/fail_switch_three_greenlets2.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests
9.604   copying src/greenlet/tests/test_generator.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests
9.604   copying src/greenlet/tests/test_greenlet_trash.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests
9.604   creating build/lib.linux-aarch64-cpython-313/greenlet/platform
9.604   copying src/greenlet/platform/__init__.py -> build/lib.linux-aarch64-cpython-313/greenlet/platform
9.604   running egg_info
9.604   writing src/greenlet.egg-info/PKG-INFO
9.604   writing dependency_links to src/greenlet.egg-info/dependency_links.txt
9.604   writing requirements to src/greenlet.egg-info/requires.txt
9.604   writing top-level names to src/greenlet.egg-info/top_level.txt
9.604   reading manifest file 'src/greenlet.egg-info/SOURCES.txt'
9.604   reading manifest template 'MANIFEST.in'
9.604   warning: no previously-included files found matching 'benchmarks/*.json'
9.604   no previously-included directories found matching 'docs/_build'
9.604   warning: no files found matching '*.py' under directory 'appveyor'
9.604   warning: no previously-included files matching '*.pyc' found anywhere in distribution
9.604   warning: no previously-included files matching '*.pyd' found anywhere in distribution
9.604   warning: no previously-included files matching '*.so' found anywhere in distribution
9.604   warning: no previously-included files matching '.coverage' found anywhere in distribution
9.604   adding license file 'LICENSE'
9.604   adding license file 'LICENSE.PSF'
9.604   adding license file 'AUTHORS'
9.604   writing manifest file 'src/greenlet.egg-info/SOURCES.txt'
9.604   copying src/greenlet/TBrokenGreenlet.cpp -> build/lib.linux-aarch64-cpython-313/greenlet
9.604   copying src/greenlet/TExceptionState.cpp -> build/lib.linux-aarch64-cpython-313/greenlet
9.604   copying src/greenlet/TGreenlet.cpp -> build/lib.linux-aarch64-cpython-313/greenlet
9.604   copying src/greenlet/TGreenletGlobals.cpp -> build/lib.linux-aarch64-cpython-313/greenlet
9.604   copying src/greenlet/TMainGreenlet.cpp -> build/lib.linux-aarch64-cpython-313/greenlet
9.604   copying src/greenlet/TPythonState.cpp -> build/lib.linux-aarch64-cpython-313/greenlet
9.604   copying src/greenlet/TStackState.cpp -> build/lib.linux-aarch64-cpython-313/greenlet
9.604   copying src/greenlet/TThreadStateDestroy.cpp -> build/lib.linux-aarch64-cpython-313/greenlet
9.604   copying src/greenlet/TUserGreenlet.cpp -> build/lib.linux-aarch64-cpython-313/greenlet
9.604   copying src/greenlet/greenlet.cpp -> build/lib.linux-aarch64-cpython-313/greenlet
9.604   copying src/greenlet/greenlet.h -> build/lib.linux-aarch64-cpython-313/greenlet
9.604   copying src/greenlet/greenlet_allocator.hpp -> build/lib.linux-aarch64-cpython-313/greenlet
9.604   copying src/greenlet/greenlet_compiler_compat.hpp -> build/lib.linux-aarch64-cpython-313/greenlet
9.604   copying src/greenlet/greenlet_cpython_add_pending.hpp -> build/lib.linux-aarch64-cpython-313/greenlet
9.604   copying src/greenlet/greenlet_cpython_compat.hpp -> build/lib.linux-aarch64-cpython-313/greenlet
9.604   copying src/greenlet/greenlet_exceptions.hpp -> build/lib.linux-aarch64-cpython-313/greenlet
9.604   copying src/greenlet/greenlet_greenlet.hpp -> build/lib.linux-aarch64-cpython-313/greenlet
9.604   copying src/greenlet/greenlet_internal.hpp -> build/lib.linux-aarch64-cpython-313/greenlet
9.604   copying src/greenlet/greenlet_refs.hpp -> build/lib.linux-aarch64-cpython-313/greenlet
9.604   copying src/greenlet/greenlet_slp_switch.hpp -> build/lib.linux-aarch64-cpython-313/greenlet
9.604   copying src/greenlet/greenlet_thread_state.hpp -> build/lib.linux-aarch64-cpython-313/greenlet
9.604   copying src/greenlet/greenlet_thread_state_dict_cleanup.hpp -> build/lib.linux-aarch64-cpython-313/greenlet
9.604   copying src/greenlet/greenlet_thread_support.hpp -> build/lib.linux-aarch64-cpython-313/greenlet
9.604   copying src/greenlet/slp_platformselect.h -> build/lib.linux-aarch64-cpython-313/greenlet
9.604   copying src/greenlet/tests/_test_extension.c -> build/lib.linux-aarch64-cpython-313/greenlet/tests
9.604   copying src/greenlet/tests/_test_extension_cpp.cpp -> build/lib.linux-aarch64-cpython-313/greenlet/tests
9.604   copying src/greenlet/platform/setup_switch_x64_masm.cmd -> build/lib.linux-aarch64-cpython-313/greenlet/platform
9.604   copying src/greenlet/platform/switch_aarch64_gcc.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform
9.604   copying src/greenlet/platform/switch_alpha_unix.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform
9.604   copying src/greenlet/platform/switch_amd64_unix.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform
9.604   copying src/greenlet/platform/switch_arm32_gcc.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform
9.604   copying src/greenlet/platform/switch_arm32_ios.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform
9.604   copying src/greenlet/platform/switch_arm64_masm.asm -> build/lib.linux-aarch64-cpython-313/greenlet/platform
9.604   copying src/greenlet/platform/switch_arm64_masm.obj -> build/lib.linux-aarch64-cpython-313/greenlet/platform
9.604   copying src/greenlet/platform/switch_arm64_msvc.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform
9.604   copying src/greenlet/platform/switch_csky_gcc.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform
9.604   copying src/greenlet/platform/switch_loongarch64_linux.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform
9.604   copying src/greenlet/platform/switch_m68k_gcc.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform
9.604   copying src/greenlet/platform/switch_mips_unix.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform
9.604   copying src/greenlet/platform/switch_ppc64_aix.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform
9.604   copying src/greenlet/platform/switch_ppc64_linux.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform
9.604   copying src/greenlet/platform/switch_ppc_aix.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform
9.604   copying src/greenlet/platform/switch_ppc_linux.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform
9.604   copying src/greenlet/platform/switch_ppc_macosx.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform
9.604   copying src/greenlet/platform/switch_ppc_unix.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform
9.604   copying src/greenlet/platform/switch_riscv_unix.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform
9.604   copying src/greenlet/platform/switch_s390_unix.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform
9.604   copying src/greenlet/platform/switch_sparc_sun_gcc.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform
9.604   copying src/greenlet/platform/switch_x32_unix.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform
9.604   copying src/greenlet/platform/switch_x64_masm.asm -> build/lib.linux-aarch64-cpython-313/greenlet/platform
9.604   copying src/greenlet/platform/switch_x64_masm.obj -> build/lib.linux-aarch64-cpython-313/greenlet/platform
9.604   copying src/greenlet/platform/switch_x64_msvc.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform
9.604   copying src/greenlet/platform/switch_x86_msvc.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform
9.604   copying src/greenlet/platform/switch_x86_unix.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform
9.604   running build_ext
9.604   building 'greenlet._greenlet' extension
9.604   creating build/temp.linux-aarch64-cpython-313/src/greenlet
9.604   g++ -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I/tmp/tmpup_g05sd/.venv/include -I/usr/local/include/python3.13 -c src/greenlet/greenlet.cpp -o build/temp.linux-aarch64-cpython-313/src/greenlet/greenlet.o
9.604   In file included from src/greenlet/greenlet_greenlet.hpp:26,
9.604                    from src/greenlet/greenlet_internal.hpp:20,
9.604                    from src/greenlet/greenlet.cpp:19:
9.604   /usr/local/include/python3.13/internal/pycore_frame.h:8:4: error: #error "this header requires Py_BUILD_CORE define"
9.604       8 | #  error "this header requires Py_BUILD_CORE define"
9.604         |    ^~~~~
9.604   In file included from /usr/local/include/python3.13/internal/pycore_frame.h:13:
9.604   /usr/local/include/python3.13/internal/pycore_code.h:8:4: error: #error "this header requires Py_BUILD_CORE define"
9.604       8 | #  error "this header requires Py_BUILD_CORE define"
9.604         |    ^~~~~
9.604   In file included from /usr/local/include/python3.13/internal/pycore_code.h:11:
9.604   /usr/local/include/python3.13/internal/pycore_lock.h:13:4: error: #error "this header requires Py_BUILD_CORE define"
9.604      13 | #  error "this header requires Py_BUILD_CORE define"
9.604         |    ^~~~~
9.604   In file included from /usr/local/include/python3.13/internal/pycore_code.h:12:
9.604   /usr/local/include/python3.13/internal/pycore_backoff.h:9:4: error: #error "this header requires Py_BUILD_CORE define"
9.604       9 | #  error "this header requires Py_BUILD_CORE define"
9.604         |    ^~~~~
9.604   src/greenlet/greenlet_greenlet.hpp:104:9: error: ‘_PyCFrame’ does not name a type; did you mean ‘_frame’?
9.604     104 |         _PyCFrame* cframe;
9.604         |         ^~~~~~~~~
9.604         |         _frame
9.604   src/greenlet/greenlet_greenlet.hpp:147:29: error: ‘_PyCFrame’ has not been declared
9.604     147 |         void set_new_cframe(_PyCFrame& frame) noexcept;
9.604         |                             ^~~~~~~~~
9.604   In file included from src/greenlet/greenlet.cpp:33:
9.604   src/greenlet/TUserGreenlet.cpp: In member function ‘virtual greenlet::Greenlet::switchstack_result_t greenlet::UserGreenlet::g_initialstub(void*)’:
9.604   src/greenlet/TUserGreenlet.cpp:280:5: error: ‘_PyCFrame’ was not declared in this scope; did you mean ‘_frame’?
9.604     280 |     _PyCFrame trace_info;
9.604         |     ^~~~~~~~~
9.604         |     _frame
9.604   src/greenlet/TUserGreenlet.cpp:282:39: error: ‘trace_info’ was not declared in this scope
9.604     282 |     this->python_state.set_new_cframe(trace_info);
9.604         |                                       ^~~~~~~~~~
9.604   In file included from src/greenlet/greenlet.cpp:36:
9.604   src/greenlet/TPythonState.cpp: In constructor ‘greenlet::PythonState::PythonState()’:
9.604   src/greenlet/TPythonState.cpp:12:6: error: class ‘greenlet::PythonState’ does not have any field named ‘cframe’
9.604      12 |     ,cframe(nullptr)
9.604         |      ^~~~~~
9.604   src/greenlet/TPythonState.cpp:79:11: error: ‘class greenlet::PythonState’ has no member named ‘cframe’
9.604      79 |     this->cframe = &PyThreadState_GET()->root_cframe;
9.604         |           ^~~~~~
9.604   src/greenlet/TPythonState.cpp:79:42: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘root_cframe’
9.604      79 |     this->cframe = &PyThreadState_GET()->root_cframe;
9.604         |                                          ^~~~~~~~~~~
9.604   src/greenlet/TPythonState.cpp: In member function ‘void greenlet::PythonState::operator<<(const PyThreadState*)’:
9.604   src/greenlet/TPythonState.cpp:125:11: error: ‘class greenlet::PythonState’ has no member named ‘cframe’
9.604     125 |     this->cframe = tstate->cframe;
9.604         |           ^~~~~~
9.604   src/greenlet/TPythonState.cpp:125:28: error: ‘const PyThreadState’ {aka ‘const struct _ts’} has no member named ‘cframe’
9.604     125 |     this->cframe = tstate->cframe;
9.604         |                            ^~~~~~
9.604   src/greenlet/TPythonState.cpp:133:31: error: ‘C_RECURSION_LIMIT’ was not declared in this scope; did you mean ‘Py_C_RECURSION_LIMIT’?
9.604     133 |     this->c_recursion_depth = C_RECURSION_LIMIT - tstate->c_recursion_remaining;
9.604         |                               ^~~~~~~~~~~~~~~~~
9.604         |                               Py_C_RECURSION_LIMIT
9.604   src/greenlet/TPythonState.cpp:137:35: error: ‘const PyThreadState’ {aka ‘const struct _ts’} has no member named ‘cframe’
9.604     137 |     this->current_frame = tstate->cframe->current_frame;
9.604         |                                   ^~~~~~
9.604   src/greenlet/TPythonState.cpp:147:42: error: ‘const PyThreadState’ {aka ‘const struct _ts’} has no member named ‘trash’
9.604     147 |     this->trash_delete_nesting = tstate->trash.delete_nesting;
9.604         |                                          ^~~~~
9.604   src/greenlet/TPythonState.cpp: In member function ‘void greenlet::PythonState::operator>>(PyThreadState*)’:
9.604   src/greenlet/TPythonState.cpp:188:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘cframe’
9.604     188 |     tstate->cframe = this->cframe;
9.604         |             ^~~~~~
9.604   src/greenlet/TPythonState.cpp:188:28: error: ‘class greenlet::PythonState’ has no member named ‘cframe’
9.604     188 |     tstate->cframe = this->cframe;
9.604         |                            ^~~~~~
9.604   src/greenlet/TPythonState.cpp:202:37: error: ‘C_RECURSION_LIMIT’ was not declared in this scope; did you mean ‘Py_C_RECURSION_LIMIT’?
9.604     202 |     tstate->c_recursion_remaining = C_RECURSION_LIMIT - this->c_recursion_depth;
9.604         |                                     ^~~~~~~~~~~~~~~~~
9.604         |                                     Py_C_RECURSION_LIMIT
9.604   src/greenlet/TPythonState.cpp:207:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘cframe’
9.604     207 |     tstate->cframe->current_frame = this->current_frame;
9.604         |             ^~~~~~
9.604   src/greenlet/TPythonState.cpp:213:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘trash’
9.604     213 |     tstate->trash.delete_nesting = this->trash_delete_nesting;
9.604         |             ^~~~~
9.604   src/greenlet/TPythonState.cpp: At global scope:
9.604   src/greenlet/TPythonState.cpp:273:6: error: variable or field ‘set_new_cframe’ declared void
9.604     273 | void PythonState::set_new_cframe(_PyCFrame& frame) noexcept
9.604         |      ^~~~~~~~~~~
9.604   src/greenlet/TPythonState.cpp:273:34: error: ‘_PyCFrame’ was not declared in this scope; did you mean ‘_frame’?
9.604     273 | void PythonState::set_new_cframe(_PyCFrame& frame) noexcept
9.604         |                                  ^~~~~~~~~
9.604         |                                  _frame
9.604   src/greenlet/TPythonState.cpp:273:45: error: ‘frame’ was not declared in this scope; did you mean ‘_frame’?
9.604     273 | void PythonState::set_new_cframe(_PyCFrame& frame) noexcept
9.604         |                                             ^~~~~
9.604         |                                             _frame
9.604   src/greenlet/greenlet.cpp: In function ‘PyObject* mod_get_tstate_trash_delete_nesting(PyObject*)’:
9.604   src/greenlet/greenlet.cpp:1341:36: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘trash’
9.604    1341 |     return PyLong_FromLong(tstate->trash.delete_nesting);
9.604         |                                    ^~~~~
9.604   error: command '/usr/bin/g++' failed with exit code 1
9.604
9.604
9.604   at /usr/local/lib/python3.13/site-packages/poetry/installation/chef.py:164 in _prepare
9.606       160│
9.607       161│                 error = ChefBuildError("\n\n".join(message_parts))
9.607       162│
9.607       163│             if error is not None:
9.607     → 164│                 raise error from None
9.607       165│
9.607       166│             return path
9.607       167│
9.607       168│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:
9.607
9.607 Note: This error originates from the build backend, and is likely not a problem with poetry but with greenlet (3.0.3) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "greenlet (==3.0.3)"'.
9.607
------
failed to solve: process "/bin/sh -c if [ \"$ENV\" = \"dev\" ]; then         poetry install --no-ansi --no-interaction --no-root --with dev;     else         poetry install --no-ansi --no-interaction --no-root --without dev;     fi" did not complete successfully: exit code: 1

@jamadden
Copy link
Contributor

@Eimis That's because you're trying to install greenlet < 3.1, which doesn't support Python 3.13. You must use greenlet >= 3.1.x.

Same for you @ravi005e .

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

No branches or pull requests

5 participants