Bug 2423897 - python-sqlalchemy1.4 fails to build with Python 3.15: TypeError: greenlet context must be a contextvars.Context or None
Summary: python-sqlalchemy1.4 fails to build with Python 3.15: TypeError: greenlet con...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-sqlalchemy1.4
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nils Philippsen
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.15
TreeView+ depends on / blocked
 
Reported: 2025-12-19 15:30 UTC by Karolina Surma
Modified: 2026-01-14 10:53 UTC (History)
3 users (show)

Fixed In Version: python-greenlet-3.3.0-1.fc44
Clone Of:
Environment:
Last Closed: 2026-01-14 10:32:17 UTC
Type: Bug
Embargoed:
fedora-admin-xmlrpc: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FC-2829 0 None None None 2025-12-19 15:30:40 UTC

Description Karolina Surma 2025-12-19 15:30:13 UTC
python-sqlalchemy1.4 fails to build with Python 3.15.0a3.

+ /usr/bin/pytest test -k 'not aaa_profiling'
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/usr/lib/python3.15/site-packages/_pytest/main.py", line 287, in wrap_session
INTERNALERROR>     config.hook.pytest_sessionstart(session=session)
INTERNALERROR>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/usr/lib/python3.15/site-packages/pluggy/_hooks.py", line 512, in __call__
INTERNALERROR>     return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
INTERNALERROR>            ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/usr/lib/python3.15/site-packages/pluggy/_manager.py", line 120, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>            ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/usr/lib/python3.15/site-packages/pluggy/_callers.py", line 167, in _multicall
INTERNALERROR>     raise exception
INTERNALERROR>   File "/usr/lib/python3.15/site-packages/pluggy/_callers.py", line 121, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/builddir/build/BUILD/python-sqlalchemy1.4-1.4.54-build/sqlalchemy-1.4.54/test/../lib/sqlalchemy/testing/plugin/pytestplugin.py", line 129, in pytest_sessionstart
INTERNALERROR>     asyncio._assume_async(plugin_base.post_begin)
INTERNALERROR>     ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/builddir/build/BUILD/python-sqlalchemy1.4-1.4.54-build/sqlalchemy-1.4.54/lib/sqlalchemy/testing/asyncio.py", line 55, in _assume_async
INTERNALERROR>     return _async_util.run_in_greenlet(fn, *args, **kwargs)
INTERNALERROR>            ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/builddir/build/BUILD/python-sqlalchemy1.4-1.4.54-build/sqlalchemy-1.4.54/lib/sqlalchemy/util/concurrency.py", line 63, in run_in_greenlet
INTERNALERROR>     return self.runner.run(greenlet_spawn(fn, *args, **kwargs))
INTERNALERROR>            ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/usr/lib64/python3.15/asyncio/runners.py", line 127, in run
INTERNALERROR>     return self._loop.run_until_complete(task)
INTERNALERROR>            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
INTERNALERROR>   File "/usr/lib64/python3.15/asyncio/base_events.py", line 719, in run_until_complete
INTERNALERROR>     return future.result()
INTERNALERROR>            ~~~~~~~~~~~~~^^
INTERNALERROR>   File "/builddir/build/BUILD/python-sqlalchemy1.4-1.4.54-build/sqlalchemy-1.4.54/lib/sqlalchemy/util/_concurrency_py3k.py", line 115, in greenlet_spawn
INTERNALERROR>     context = _AsyncIoGreenlet(fn, greenlet.getcurrent())
INTERNALERROR>   File "/builddir/build/BUILD/python-sqlalchemy1.4-1.4.54-build/sqlalchemy-1.4.54/lib/sqlalchemy/util/_concurrency_py3k.py", line 51, in __init__
INTERNALERROR>     self.gr_context = driver.gr_context
INTERNALERROR>     ^^^^^^^^^^^^^^^
INTERNALERROR> TypeError: greenlet context must be a contextvars.Context or None


https://docs.python.org/3.15/whatsnew/3.15.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.15/fedora-rawhide-x86_64/09935434-python-sqlalchemy1.4/

For all our attempts to build python-sqlalchemy1.4 with Python 3.15, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.15/package/python-sqlalchemy1.4/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.15:
https://copr.fedorainfracloud.org/coprs/g/python/python3.15/

Let us know here if you have any questions.

Python 3.15 is planned to be included in Fedora 45.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.15.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Nils Philippsen 2026-01-14 10:32:17 UTC
This seems to be fixed now (local mock build also works): https://copr.fedorainfracloud.org/coprs/g/python/python3.15/build/9975356/


Note You need to log in before you can comment on or make changes to this bug.