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

Add Python 3.13 support #580

Open
Siryu6 opened this issue Oct 14, 2024 · 1 comment
Open

Add Python 3.13 support #580

Siryu6 opened this issue Oct 14, 2024 · 1 comment

Comments

@Siryu6
Copy link

Siryu6 commented Oct 14, 2024

Due to greenlet version pinned to 3.0.3, PgSync is not able to run on Python 3.13.

Python 3.13support has been added in greenlet:3.1.0 (see CHANGELOG)

Error log :

building 'greenlet._greenlet' extension
17.39       creating build/temp.linux-aarch64-cpython-313/src/greenlet
17.39       g++ -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I//home/pgsync/code/venv/include -I/usr/local/include/python3.13 -c src/greenlet/greenlet.cpp -o build/temp.linux-aarch64-cpython-313/src/greenlet/greenlet.o
17.39       In file included from src/greenlet/greenlet_greenlet.hpp:26,
17.39                        from src/greenlet/greenlet_internal.hpp:20,
17.39                        from src/greenlet/greenlet.cpp:19:
17.39       /usr/local/include/python3.13/internal/pycore_frame.h:8:4: error: #error "this header requires Py_BUILD_CORE define"
17.39           8 | #  error "this header requires Py_BUILD_CORE define"
17.39             |    ^~~~~
17.39       In file included from /usr/local/include/python3.13/internal/pycore_frame.h:13:
17.39       /usr/local/include/python3.13/internal/pycore_code.h:8:4: error: #error "this header requires Py_BUILD_CORE define"
17.39           8 | #  error "this header requires Py_BUILD_CORE define"
17.39             |    ^~~~~
17.39       In file included from /usr/local/include/python3.13/internal/pycore_code.h:11:
17.39       /usr/local/include/python3.13/internal/pycore_lock.h:13:4: error: #error "this header requires Py_BUILD_CORE define"
17.39          13 | #  error "this header requires Py_BUILD_CORE define"
17.39             |    ^~~~~
17.39       In file included from /usr/local/include/python3.13/internal/pycore_code.h:12:
17.39       /usr/local/include/python3.13/internal/pycore_backoff.h:9:4: error: #error "this header requires Py_BUILD_CORE define"
17.39           9 | #  error "this header requires Py_BUILD_CORE define"
17.39             |    ^~~~~
17.39       src/greenlet/greenlet_greenlet.hpp:104:9: error: ‘_PyCFrame’ does not name a type; did you mean ‘_frame’?
17.39         104 |         _PyCFrame* cframe;
17.39             |         ^~~~~~~~~
17.39             |         _frame
17.39       src/greenlet/greenlet_greenlet.hpp:147:29: error: ‘_PyCFrame’ has not been declared
17.39         147 |         void set_new_cframe(_PyCFrame& frame) noexcept;
17.39             |                             ^~~~~~~~~
17.39       In file included from src/greenlet/greenlet.cpp:33:
17.39       src/greenlet/TUserGreenlet.cpp: In member function ‘virtual greenlet::Greenlet::switchstack_result_t greenlet::UserGreenlet::g_initialstub(void*)’:
17.39       src/greenlet/TUserGreenlet.cpp:280:5: error: ‘_PyCFrame’ was not declared in this scope; did you mean ‘_frame’?
17.39         280 |     _PyCFrame trace_info;
17.39             |     ^~~~~~~~~
17.39             |     _frame
17.39       src/greenlet/TUserGreenlet.cpp:282:39: error: ‘trace_info’ was not declared in this scope
17.39         282 |     this->python_state.set_new_cframe(trace_info);
17.39             |                                       ^~~~~~~~~~
17.39       In file included from src/greenlet/greenlet.cpp:36:
17.39       src/greenlet/TPythonState.cpp: In constructor ‘greenlet::PythonState::PythonState()’:
17.39       src/greenlet/TPythonState.cpp:12:6: error: class ‘greenlet::PythonState’ does not have any field named ‘cframe’
17.39          12 |     ,cframe(nullptr)
17.39             |      ^~~~~~
17.39       src/greenlet/TPythonState.cpp:79:11: error: ‘class greenlet::PythonState’ has no member named ‘cframe’
17.39          79 |     this->cframe = &PyThreadState_GET()->root_cframe;
17.39             |           ^~~~~~
17.39       src/greenlet/TPythonState.cpp:79:42: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘root_cframe’
17.39          79 |     this->cframe = &PyThreadState_GET()->root_cframe;
17.39             |                                          ^~~~~~~~~~~
17.39       src/greenlet/TPythonState.cpp: In member function ‘void greenlet::PythonState::operator<<(const PyThreadState*)’:
17.39       src/greenlet/TPythonState.cpp:125:11: error: ‘class greenlet::PythonState’ has no member named ‘cframe’
17.39         125 |     this->cframe = tstate->cframe;
17.39             |           ^~~~~~
17.39       src/greenlet/TPythonState.cpp:125:28: error: ‘const PyThreadState’ {aka ‘const struct _ts’} has no member named ‘cframe’
17.39         125 |     this->cframe = tstate->cframe;
17.39             |                            ^~~~~~
17.39       src/greenlet/TPythonState.cpp:133:31: error: ‘C_RECURSION_LIMIT’ was not declared in this scope; did you mean ‘Py_C_RECURSION_LIMIT’?
17.39         133 |     this->c_recursion_depth = C_RECURSION_LIMIT - tstate->c_recursion_remaining;
17.39             |                               ^~~~~~~~~~~~~~~~~
17.39             |                               Py_C_RECURSION_LIMIT
17.39       src/greenlet/TPythonState.cpp:137:35: error: ‘const PyThreadState’ {aka ‘const struct _ts’} has no member named ‘cframe’
17.39         137 |     this->current_frame = tstate->cframe->current_frame;
17.39             |                                   ^~~~~~
17.39       src/greenlet/TPythonState.cpp:147:42: error: ‘const PyThreadState’ {aka ‘const struct _ts’} has no member named ‘trash’
17.39         147 |     this->trash_delete_nesting = tstate->trash.delete_nesting;
17.39             |                                          ^~~~~
17.39       src/greenlet/TPythonState.cpp: In member function ‘void greenlet::PythonState::operator>>(PyThreadState*)’:
17.39       src/greenlet/TPythonState.cpp:188:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘cframe’
17.39         188 |     tstate->cframe = this->cframe;
17.39             |             ^~~~~~
17.39       src/greenlet/TPythonState.cpp:188:28: error: ‘class greenlet::PythonState’ has no member named ‘cframe’
17.39         188 |     tstate->cframe = this->cframe;
17.39             |                            ^~~~~~
17.39       src/greenlet/TPythonState.cpp:202:37: error: ‘C_RECURSION_LIMIT’ was not declared in this scope; did you mean ‘Py_C_RECURSION_LIMIT’?
17.39         202 |     tstate->c_recursion_remaining = C_RECURSION_LIMIT - this->c_recursion_depth;
17.39             |                                     ^~~~~~~~~~~~~~~~~
17.39             |                                     Py_C_RECURSION_LIMIT
17.39       src/greenlet/TPythonState.cpp:207:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘cframe’
17.39         207 |     tstate->cframe->current_frame = this->current_frame;
17.39             |             ^~~~~~
17.39       src/greenlet/TPythonState.cpp:213:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘trash’
17.39         213 |     tstate->trash.delete_nesting = this->trash_delete_nesting;
17.39             |             ^~~~~
17.39       src/greenlet/TPythonState.cpp: At global scope:
17.39       src/greenlet/TPythonState.cpp:273:6: error: variable or field ‘set_new_cframe’ declared void
17.39         273 | void PythonState::set_new_cframe(_PyCFrame& frame) noexcept
17.39             |      ^~~~~~~~~~~
17.39       src/greenlet/TPythonState.cpp:273:34: error: ‘_PyCFrame’ was not declared in this scope; did you mean ‘_frame’?
17.39         273 | void PythonState::set_new_cframe(_PyCFrame& frame) noexcept
17.39             |                                  ^~~~~~~~~
17.39             |                                  _frame
17.39       src/greenlet/TPythonState.cpp:273:45: error: ‘frame’ was not declared in this scope; did you mean ‘_frame’?
17.39         273 | void PythonState::set_new_cframe(_PyCFrame& frame) noexcept
17.39             |                                             ^~~~~
17.39             |                                             _frame
17.39       src/greenlet/greenlet.cpp: In function ‘PyObject* mod_get_tstate_trash_delete_nesting(PyObject*)’:
17.39       src/greenlet/greenlet.cpp:1341:36: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘trash’
17.39        1341 |     return PyLong_FromLong(tstate->trash.delete_nesting);
17.39             |                                    ^~~~~
17.39       error: command '/usr/bin/g++' failed with exit code 1
17.39       [end of output]
@toluaina
Copy link
Owner

toluaina commented Nov 6, 2024

should be fixed now. text you please try again

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

No branches or pull requests

2 participants