You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When serving the documentation with make -C Doc/ serve, we can not specify the path of the python binary.
My use case, I wanted to debug the wsgiref.simple_server method, used by Tools/scripts/serve.py. It's just impossible because we use the default python3 binary from the system or from the virtualenv (pyenv. etc...)
Personally, I'd prefer removing the 'serve' target completely. make -C Doc htmlview should already cover most of its use cases. There is no deprecation period needed and there is already a replacement (and IMO better) for it.
Personally, I'd prefer removing the 'serve' target completely. make -C
Doc htmlview should already cover most of its use cases. There is no
deprecation period needed and there is already a replacement (and IMO
better) for it.
Hi Berker,
When I have read your message, I was surprised because this target
already exists since 2010. It's true we can run the makefile with
my current workflow is
make -C Doc/ venv && make -C Doc/ html serve and open my browser at http://localhost:8000
but with your suggestion, I think it's better for us and also for the
contributors, just make -C Doc/ venv htmlview. This target will open the
browser with the result of the html build.
So, I have discussed with @julien Palard and he told me that he did not
use the 'serve' target and he discovered the target via my issue.
But there will be an other issue, in the devguide, there is also a
'serve' target in the Makefile with a copy of tools/serve.py.
But there is no htmlview target.
For the moment, we have a common solution for the two project if we want
to show the result to the user, make serve.
We could:
remove 'make serve' from CPython and Devguide
remove tools/serve.py from CPython and Devguide
add htmlview to the DevGuide
update the documentation
+1 for removing the serve.py script and use htmlview.
I use that with a default port forwarding on my ssh session (aka ssh -L 8088:localhost:8088 or equivalent in your .ssh/config) to my development systems.
I rarely have the ability for a development system to run a web browser or automatically tell my desktop browser full of important authentications where to go. In general as risk mitigation, but also in part because I'm happy using remote dev environments and ChromeOS.
Activity
matrixise commentedon Mar 17, 2019
When serving the documentation with
make -C Doc/ serve, we can not specify the path of the python binary.My use case, I wanted to debug the wsgiref.simple_server method, used by Tools/scripts/serve.py. It's just impossible because we use the default python3 binary from the system or from the virtualenv (pyenv. etc...)
JulienPalard commentedon Mar 18, 2019
New changeset 09a9f17 by Julien Palard (Stéphane Wirtel) in branch 'master':
bpo-36329: Declare the version of Python to use for Tools/scripts/serve.py (bpo-12385)
09a9f17
berkerpeksag commentedon Apr 30, 2019
Personally, I'd prefer removing the 'serve' target completely. make -C Doc htmlview should already cover most of its use cases. There is no deprecation period needed and there is already a replacement (and IMO better) for it.
matrixise commentedon May 1, 2019
Hi Berker,
When I have read your message, I was surprised because this target
already exists since 2010. It's true we can run the makefile with
my current workflow is
make -C Doc/ venv && make -C Doc/ html serve and open my browser at
http://localhost:8000
but with your suggestion, I think it's better for us and also for the
contributors, just make -C Doc/ venv htmlview. This target will open the
browser with the result of the html build.
So, I have discussed with @julien Palard and he told me that he did not
use the 'serve' target and he discovered the target via my issue.
But there will be an other issue, in the devguide, there is also a
'serve' target in the Makefile with a copy of tools/serve.py.
But there is no htmlview target.
For the moment, we have a common solution for the two project if we want
to show the result to the user, make serve.
We could:
+1 for removing the serve.py script and use htmlview.
berkerpeksag commentedon May 1, 2019
Yeah, we can add htmlview to devguide. I’ve even added it to Django after I
discovered it in CPython :)
--Berker
hugovk commentedon Apr 6, 2022
I've made PRs for this:
Also set this bpo for Python 3.11.
gpshead commentedon Mar 29, 2024
For those seeking the old "serve" ability, after
make -C Doc htmlrun:python -m http.server -b localhost -p HTTP/1.1 -d Doc/build/html/ 8088I use that with a default port forwarding on my ssh session (aka
ssh -L 8088:localhost:8088or equivalent in your .ssh/config) to my development systems.I rarely have the ability for a development system to run a web browser or automatically tell my desktop browser full of important authentications where to go. In general as risk mitigation, but also in part because I'm happy using remote dev environments and ChromeOS.
hugovk commentedon Mar 29, 2024
We also have
make -C Doc htmllivethat serves, rebuilds and reloads using https://github.com/sphinx-doc/sphinx-autobuild.sphinx-autobuild has
--portand--hostoptions which could set viaSPHINXOPTS(make sure to re-add the existing options if needed) but no--protocol.cpython/Doc/Makefile
Lines 147 to 150 in d9cfe7e