Bug 2342563

Summary: python-starlette fails to build with Python 3.14: DeprecationWarning: 'asyncio.iscoroutinefunction' is deprecated and slated for removal in Python 3.16
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-starletteAssignee: Ben Beasley <code>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: code, ksurma, mhroncok, paul.wouters, rominf
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-starlette-0.45.0-3.fc42 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-01-28 13:02:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2322407    

Description Karolina Surma 2025-01-28 11:17:14 UTC
python-starlette fails to build with Python 3.14.0a4.

__________________ ERROR collecting tests/test_testclient.py ___________________
tests/test_testclient.py:31: in <module>
    mock_service = Starlette(routes=[Route("/", endpoint=mock_service_endpoint)])
starlette/routing.py:230: in __init__
    self.app = request_response(endpoint)
starlette/routing.py:66: in request_response
    func if is_async_callable(func) else functools.partial(run_in_threadpool, func)  # type:ignore
starlette/_utils.py:39: in is_async_callable
    return asyncio.iscoroutinefunction(obj) or (callable(obj) and asyncio.iscoroutinefunction(obj.__call__))
/usr/lib64/python3.14/asyncio/coroutines.py:23: in iscoroutinefunction
    warnings._deprecated("asyncio.iscoroutinefunction",
/usr/lib64/python3.14/warnings.py:668: in _deprecated
    warn(msg, DeprecationWarning, stacklevel=3)
E   DeprecationWarning: 'asyncio.iscoroutinefunction' is deprecated and slated for removal in Python 3.16; use inspect.iscoroutinefunction() instead

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

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.14/fedora-rawhide-x86_64/08578732-python-starlette/

For all our attempts to build python-starlette with Python 3.14, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/package/python-starlette/

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.14:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/

Let us know here if you have any questions.

Python 3.14 is planned to be included in Fedora 43.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.14.
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 Fedora Update System 2025-01-28 12:58:34 UTC
FEDORA-2025-eb75aa5f7c (python-starlette-0.45.0-3.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-eb75aa5f7c

Comment 2 Fedora Update System 2025-01-28 13:02:22 UTC
FEDORA-2025-eb75aa5f7c (python-starlette-0.45.0-3.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.