Three call sites construct asyncio.Future objects via asyncio.get_event_loop().create_future() from inside coroutines: src/arcp/_client/handles.py:28 builds the terminal future for every JobHandle, src/arcp/_client/ops.py:72 builds the accept future for every submit_job, and src/arcp/_runtime/_accept.py:60 builds the heartbeat-outcome future at session start. asyncio.get_event_loop() is deprecated when called without a running loop since Python 3.10, emits a DeprecationWarning on 3.12 in some scenarios, and is scheduled to raise inside coroutines on 3.14 per CPython issue gh-100160. The project's pytest config sets filterwarnings = ["error", "ignore::DeprecationWarning"] at pyproject.toml:117, so this warning is suppressed in CI and will surface only when downstream consumers turn warnings into errors or upgrade to 3.14. Every one of these call sites is reached from inside async def, so the correct API is asyncio.get_running_loop().create_future(), which fails fast instead of falling back to thread-local loop policies.
Fix prompt: Replace asyncio.get_event_loop() with asyncio.get_running_loop() at src/arcp/_client/handles.py:28, src/arcp/_client/ops.py:72, and src/arcp/_runtime/_accept.py:60. Verify there are no other call sites with grep -rn "get_event_loop" src tests examples. Construct JobHandle._terminal lazily on first access if the handle must remain constructible outside an async context for tests; otherwise document that JobHandle.__init__ must be called from within a running loop. Add a unit test that constructs ARCPClient, submits via the in-memory transport, and asserts no DeprecationWarning is emitted when run with -W error::DeprecationWarning.
Three call sites construct
asyncio.Futureobjects viaasyncio.get_event_loop().create_future()from inside coroutines:src/arcp/_client/handles.py:28builds the terminal future for everyJobHandle,src/arcp/_client/ops.py:72builds the accept future for everysubmit_job, andsrc/arcp/_runtime/_accept.py:60builds the heartbeat-outcome future at session start.asyncio.get_event_loop()is deprecated when called without a running loop since Python 3.10, emits aDeprecationWarningon 3.12 in some scenarios, and is scheduled to raise inside coroutines on 3.14 per CPython issue gh-100160. The project's pytest config setsfilterwarnings = ["error", "ignore::DeprecationWarning"]atpyproject.toml:117, so this warning is suppressed in CI and will surface only when downstream consumers turn warnings into errors or upgrade to 3.14. Every one of these call sites is reached from insideasync def, so the correct API isasyncio.get_running_loop().create_future(), which fails fast instead of falling back to thread-local loop policies.Fix prompt: Replace
asyncio.get_event_loop()withasyncio.get_running_loop()atsrc/arcp/_client/handles.py:28,src/arcp/_client/ops.py:72, andsrc/arcp/_runtime/_accept.py:60. Verify there are no other call sites withgrep -rn "get_event_loop" src tests examples. ConstructJobHandle._terminallazily on first access if the handle must remain constructible outside an async context for tests; otherwise document thatJobHandle.__init__must be called from within a running loop. Add a unit test that constructsARCPClient, submits via the in-memory transport, and asserts noDeprecationWarningis emitted when run with-W error::DeprecationWarning.