sanitizers / sanitizers/patchback-github-app
🚨 Python 3.14 compat status
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14
- Forks
- 10
- Avg merge
- 4m
- Merged PRs (30d)
- 3
Description
So I tried bumping the OpenShift deployment runtime from Python 3.12 to Python 3.14 and it backfired like so:
$ python3.14 -Im venv some-venv-py314
$ some-venv-py314/bin/python -Im pip install -r requirements.in -c requirements.txt
$ some-venv-py314/bin/python -m patchback
DEBUG:octomachinery.app.server.runner:================ App version: 0.1.dev140+g3797d86 =================
Traceback (most recent call last):
File "<frozen runpy>", line 203, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "~/src/github/sanitizers/patchback-github-app/patchback/__main__.py", line 9, in <module>
__name__ == '__main__' and run_app( # pylint: disable=expression-not-assigned
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
name='Patchback-Bot',
^^^^^^^^^^^^^^^^^^^^^
version=get_version_from_scm_tag(root='..', relative_to=__file__),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
url='https://github.com/apps/patchback',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "~/src/github/sanitizers/patchback-github-app/some-venv-py314/lib/python3.14/site-packages/octomachinery/app/server/runner.py", line 71, in run
run_until_complete(run_server_forever, config, event_routers)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/src/github/sanitizers/patchback-github-app/some-venv-py314/lib/python3.14/site-packages/anyio/__init__.py", line 72, in run
return asynclib.run(func, *args, **backend_options) # type: ignore
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/src/github/sanitizers/patchback-github-app/some-venv-py314/lib/python3.14/site-packages/anyio/_backends/_asyncio.py", line 104, in run
loop = asyncio.get_event_loop()
File "/usr/lib/python3.14/asyncio/events.py", line 718, in get_event_loop
raise RuntimeError('There is no current event loop in thread %r.'
% threading.current_thread().name)
RuntimeError: There is no current event loop in thread 'MainThread'.
This is probably because anyio is pinned to v1.4 (transitively, due to octomachinery capping it below v2.0 as I never got to properly implementing support for newer versions). This has to be investigated and fixed.
But for now, I'm documenting this for future exploration.
The problem also concerns the Chronographer deployment, of course.
I've, rolled it back to Python 3.13 meanwhile, which is an improvement regardless.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the Python 3.14 commands in the report and begin at patchback/main.py, then inspect the octomachinery/anyio runner path named in the traceback. Done means the Patchback app starts under Python 3.14 without this event-loop error and the Chronographer deployment is covered as well.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100