Closed mkmoisen closed 11 months ago
Building from source on 2.0.2 also does not work:
wget https://github.com/python-greenlet/greenlet/archive/refs/tags/2.0.2.zip
unzip 2.0.2.zip
cd greenlet-2.0.2
python3.12 setup.py install
Results in:
running build_ext
building 'greenlet._greenlet' extension
creating build/temp.linux-x86_64-cpython-312
creating build/temp.linux-x86_64-cpython-312/src
creating build/temp.linux-x86_64-cpython-312/src/greenlet
gcc -pthread -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I/home/suml/Python3.12/include/python3.12 -c src/greenlet/greenlet.cpp -o build/temp.linux-x86_64-cpython-312/src/greenlet/greenlet.o
In file included from src/greenlet/greenlet_internal.hpp:20,
from src/greenlet/greenlet.cpp:19:
src/greenlet/greenlet_greenlet.hpp: In member function ‘void greenlet::PythonState::operator<<(const PyThreadState*)’:
src/greenlet/greenlet_greenlet.hpp:831:41: error: ‘_PyCFrame’ {aka ‘struct _PyCFrame’} has no member named ‘use_tracing’
this->use_tracing = tstate->cframe->use_tracing;
^~~~~~~~~~~
src/greenlet/greenlet_greenlet.hpp:834:37: error: ‘const PyThreadState’ {aka ‘const struct _ts’} has no member named ‘recursion_limit’; did you mean ‘py_recursion_limit’?
this->recursion_depth = tstate->recursion_limit - tstate->recursion_remaining;
^~~~~~~~~~~~~~~
py_recursion_limit
src/greenlet/greenlet_greenlet.hpp:834:63: error: ‘const PyThreadState’ {aka ‘const struct _ts’} has no member named ‘recursion_remaining’; did you mean ‘c_recursion_remaining’?
this->recursion_depth = tstate->recursion_limit - tstate->recursion_remaining;
^~~~~~~~~~~~~~~~~~~
c_recursion_remaining
src/greenlet/greenlet_greenlet.hpp:848:42: error: ‘const PyThreadState’ {aka ‘const struct _ts’} has no member named ‘trash_delete_nesting’
this->trash_delete_nesting = tstate->trash_delete_nesting;
^~~~~~~~~~~~~~~~~~~~
src/greenlet/greenlet_greenlet.hpp: In member function ‘void greenlet::PythonState::operator>>(PyThreadState*)’:
src/greenlet/greenlet_greenlet.hpp:867:21: error: ‘_PyCFrame’ {aka ‘struct _PyCFrame’} has no member named ‘use_tracing’
tstate->cframe->use_tracing = this->use_tracing;
^~~~~~~~~~~
src/greenlet/greenlet_greenlet.hpp:870:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘recursion_remaining’; did you mean ‘c_recursion_remaining’?
tstate->recursion_remaining = tstate->recursion_limit - this->recursion_depth;
^~~~~~~~~~~~~~~~~~~
c_recursion_remaining
src/greenlet/greenlet_greenlet.hpp:870:43: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘recursion_limit’; did you mean ‘py_recursion_limit’?
tstate->recursion_remaining = tstate->recursion_limit - this->recursion_depth;
^~~~~~~~~~~~~~~
py_recursion_limit
src/greenlet/greenlet_greenlet.hpp:881:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘trash_delete_nesting’
tstate->trash_delete_nesting = this->trash_delete_nesting;
^~~~~~~~~~~~~~~~~~~~
src/greenlet/greenlet_greenlet.hpp: In member function ‘void greenlet::PythonState::will_switch_from(PyThreadState*)’:
src/greenlet/greenlet_greenlet.hpp:891:48: error: ‘_PyCFrame’ {aka ‘struct _PyCFrame’} has no member named ‘use_tracing’
this->use_tracing = origin_tstate->cframe->use_tracing;
^~~~~~~~~~~
src/greenlet/greenlet_greenlet.hpp: In member function ‘void greenlet::PythonState::set_initial_state(const PyThreadState*)’:
src/greenlet/greenlet_greenlet.hpp:899:37: error: ‘const PyThreadState’ {aka ‘const struct _ts’} has no member named ‘recursion_limit’; did you mean ‘py_recursion_limit’?
this->recursion_depth = tstate->recursion_limit - tstate->recursion_remaining;
^~~~~~~~~~~~~~~
py_recursion_limit
src/greenlet/greenlet_greenlet.hpp:899:63: error: ‘const PyThreadState’ {aka ‘const struct _ts’} has no member named ‘recursion_remaining’; did you mean ‘c_recursion_remaining’?
this->recursion_depth = tstate->recursion_limit - tstate->recursion_remaining;
^~~~~~~~~~~~~~~~~~~
c_recursion_remaining
src/greenlet/greenlet.cpp: In function ‘PyObject* mod_get_tstate_trash_delete_nesting(PyObject*)’:
src/greenlet/greenlet.cpp:3095:36: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘trash_delete_nesting’
return PyLong_FromLong(tstate->trash_delete_nesting);
^~~~~~~~~~~~~~~~~~~~
error: command '/usr/bin/gcc' failed with exit code 1
The only way to get it working is by installing the 3.0.0rc3 release candidate:
pip3.12 install greenlet==3.0.0.rc3
Looks like the current version 2.0.2 of greenlet is not ready for Python3.12.0.
I was able to install the prerelease of
greenlet==3.0.0rc3
successfully.When will greenlet release the official 3.0.0 version? Every project that has greenlet as a dependency will not be able to upgrade to Python3.12.0.
Thanks!
Results in: