-
-
Notifications
You must be signed in to change notification settings - Fork 87
Fix hot reloading for Python 3.9 #182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After four months, the CI is finally green! ✅
|
@AA-Turner @hugovk requesting a review. |
|
I'm not a maintainer here, but Python 3.9 is only receiving security updates and is EOL in October: https://devguide.python.org/versions/ And Sphinx itself supports 3.11+: https://www.sphinx-doc.org/en/master/internals/release-process.html#python-version-support-policy Can you upgrade to a newer Python? |
|
Thank you for your comment.
I would appreciate it if a maintainer could review the changes. |
Because Sphinx is an application for generating docs, and not a library dependency, projects can build docs with a single (recent) Python version, even if they support the full 3.9-3.13 range. I've opened #189 as an alternative to match the same versions as Sphinx itself, in case the maintainers wish to keep parity.
Yes, these sound useful. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to consider a PR with just these tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll do that since it's a good opportunity :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I opened this #191
Fixes #178
1. Move
asyncio.Eventcreation to lifespanThis PR moves the creation of the
asyncio.EventfromRebuildServer.__init__toRebuildServer.lifespan. This ensuresasyncio.Eventis created within the event loop context, resolving the relevant error.Note
The error does not occur in Python>=3.10 because the implementation was changed by python/cpython#86558.
2. Add rebuild test
Since there was no rebuild test, I added one.
refreshmessages from/websocket-reloadafter modifying theindex.rstfile.TestClientuses threads, whileRebuildServeruses multiprocessing. In my view, this affected the rebuild test execution and cause it to fail. (0662fc9)TestClienttohttp.AsyncClient. (ref)asgi-lifespanandhttpx-wsrequired for testing lifespan and WebSocket.