Skip to content

Compatibility with Python3.11 (again) #288

Closed
@tacaswell

Description

@tacaswell

python/cpython#30590 made changes to the way exceptions are stored on the thread stucts and greenlet does not compile

$ gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/tcaswell/.virtualenvs/bleeding/include -I/home/tcaswell/.pybuild/bleedin
g/include/python3.11 -c src/greenlet/greenlet.cpp -o build/temp.linux-x86_64-3.11/src/greenlet/greenlet.o
In file included from src/greenlet/greenlet_internal.hpp:19,
                 from src/greenlet/greenlet.cpp:17:
src/greenlet/greenlet_greenlet.hpp: In member function ‘void greenlet::ExceptionState::operator<<(const PyThreadState*)’:
src/greenlet/greenlet_greenlet.hpp:640:31: error: ‘const PyThreadState’ {aka ‘const struct _ts’} has no member named ‘exc_state’; did you mean ‘_exc_state’?
  640 |     this->exc_state = tstate->exc_state;
      |                               ^~~~~~~~~
      |                               _exc_state
src/greenlet/greenlet_greenlet.hpp: In member function ‘void greenlet::ExceptionState::operator>>(PyThreadState*)’:
src/greenlet/greenlet_greenlet.hpp:645:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_state’; did you mean ‘_exc_state’?
  645 |     tstate->exc_state = this->exc_state;
      |             ^~~~~~~~~
      |             _exc_state
src/greenlet/greenlet_greenlet.hpp:647:52: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_state’; did you mean ‘_exc_state’?
  647 |         this->exc_info ? this->exc_info : &tstate->exc_state;
      |                                                    ^~~~~~~~~
      |                                                    _exc_state
src/greenlet/greenlet_greenlet.hpp: In constructor ‘greenlet::PythonState::PythonState()’:
src/greenlet/greenlet_greenlet.hpp:797:42: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘root_cframe’; did you mean ‘_root_cframe’?
  797 |     this->cframe = &PyThreadState_GET()->root_cframe;
      |                                          ^~~~~~~~~~~
      |                                          _root_cframe
src/greenlet/greenlet_greenlet.hpp: In member function ‘void greenlet::PythonState::set_new_cframe(CFrame&)’:
src/greenlet/greenlet_greenlet.hpp:919:52: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘root_cframe’; did you mean ‘_root_cframe’?
  919 |     this->cframe->previous = &PyThreadState_GET()->root_cframe;
      |                                                    ^~~~~~~~~~~
      |                                                    _root_cframe

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