Installing pgsync fails under Python 3.12 due to its dependency to greenlet==2.0.2:
Building wheels for collected packages: pgsync, greenlet, psycopg2-binary
Building wheel for pgsync (pyproject.toml): started
Building wheel for pgsync (pyproject.toml): finished with status 'done'
Created wheel for pgsync: filename=pgsync-2.5.1-py3-none-any.whl size=62686 sha256=18b74e79d45a73f6b290591943992af0ecb3a0db29b88e702ab864b671a1ef6f
Stored in directory: /tmp/pip-ephem-wheel-cache-l79juo8e/wheels/24/66/56/3ac42cc06b3d7619b585f2016d42077e88be6d2433e008de67
Building wheel for greenlet (setup.py): started
Building wheel for greenlet (setup.py): finished with status 'error'
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [143 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-312
creating build/lib.linux-x86_64-cpython-312/greenlet
copying src/greenlet/__init__.py -> build/lib.linux-x86_64-cpython-312/greenlet
creating build/lib.linux-x86_64-cpython-312/greenlet/tests
[...]
899 | 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:[309](https://gitlab.com/pickyourskills/pys/-/jobs/5342585466#L309)5:36: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘trash_delete_nesting’
3095 | return PyLong_FromLong(tstate->trash_delete_nesting);
| ^~~~~~~~~~~~~~~~~~~~
error: command '/usr/bin/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
Installing pgsync fails under Python 3.12 due to its dependency to
greenlet==2.0.2
:This issue has been fixed in greenlet >= 3.0 : https://github.com/python-greenlet/greenlet/blob/master/CHANGES.rst#L107
This is an inderect dependency of
sqlalchemy==1.4.49
, but SQLAlchemy only requiresgreenlet != 0.4.17
(source) so bumping to greenlet 3.0 is fine.Would it be possible to bump the dependency to
greenlet>=3.0
, and to addpy312
to target versions inpyproject.toml
?Thanks!