Skip to content

DOC: make nightly download command one line so it works on Windows#31231

Merged
story645 merged 4 commits into
matplotlib:mainfrom
amishamehta99:fix-install-doc-windows-note
Mar 6, 2026
Merged

DOC: make nightly download command one line so it works on Windows#31231
story645 merged 4 commits into
matplotlib:mainfrom
amishamehta99:fix-install-doc-windows-note

Conversation

@amishamehta99
Copy link
Copy Markdown
Contributor

This PR adds a clarification note for Windows Command Prompt users
in the "Install a nightly build" section.

Windows CMD does not support line continuation using "".
Without this clarification, the multi-line pip command may fail
for Windows users.

This change improves clarity and avoids installation errors.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 3, 2026

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join us on gitter for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide.
Please let us know if (and how) you use AI, it will help us give you better feedback on your PR.

We strive to be a welcoming and open project. Please follow our Code of Conduct.

@story645
Copy link
Copy Markdown
Member

story645 commented Mar 3, 2026

Thanks for the PR! I think you should use tabs instead of the note: https://sphinx-design.readthedocs.io/en/latest/tabs.html

@QuLogic
Copy link
Copy Markdown
Member

QuLogic commented Mar 4, 2026

Windows should be able to use caret ^ for line continuations.

@anntzer
Copy link
Copy Markdown
Contributor

anntzer commented Mar 4, 2026

I would just always give the command as a single line to sidestep the issue and avoid transforming the docs into a cmd tutorial.

@timhoffm
Copy link
Copy Markdown
Member

timhoffm commented Mar 4, 2026

It's a bit of a trade-off. The command is so long that you won't be able to read it reasonably when viewing the docs.

An improvement could be auto-wrapping. Should be possible by adding a :calls: attribute to the .. code:: directive and defining appropriate CSS. That way it's still readable, but copying results in a single line.

@amishamehta99
Copy link
Copy Markdown
Contributor Author

I would just always give the command as a single line to sidestep the issue and avoid transforming the docs into a cmd tutorial.

Thanks for the suggestion! I’ve updated the documentation to use a single-line pip command to avoid the Windows CMD line continuation issue.

@amishamehta99
Copy link
Copy Markdown
Contributor Author

Thanks for the suggestions! I updated the PR to use a single-line command based on the earlier recommendation. I'm happy to adjust it further if using the Windows caret (^) continuation would be preferred instead.

Comment thread doc/install/index.rst Outdated
Comment on lines +106 to +109
On Windows Command Prompt, line continuation using ``\`` is not supported.
Run the above command as a single line instead, e.g.:

``python -m pip install --upgrade --pre --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple --extra-index-url https://pypi.org/simple matplotlib``
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure the suggestion for using one line was so that you could use the same command for Linux and windows.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But now we no longre need L103-109?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the whole thing gets replaced w/:

python -m pip install --upgrade --pre --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple --extra-index-url https://pypi.org/simple matplotlib

Comment thread doc/install/index.rst Outdated
@timhoffm
Copy link
Copy Markdown
Member

timhoffm commented Mar 6, 2026

Five core developers have looked at this and waiting that the author removes some lines.

Since this wasn't moving, I took the liberty to remove the unnecessary part. IMHO this is not a devaluation of the work of the PR author, but a necessary means of efficiency: @amishamehta99 Thanks for the work, it's almost there, we've covered the last remaining minor issue so that we can merge and move on.

The (optional) CSS styling can be done in a follow-up PR.

@timhoffm timhoffm dismissed story645’s stale review March 6, 2026 15:02

I've taken care of the issue.

@rcomer rcomer changed the title DOC: Clarify Windows CMD behavior for multi-line pip command DOC: make nightly download command one line so it works on Windows Mar 6, 2026
@story645 story645 merged commit 64cf757 into matplotlib:main Mar 6, 2026
20 checks passed
@QuLogic QuLogic added this to the v3.11.0 milestone Mar 6, 2026
@timhoffm
Copy link
Copy Markdown
Member

timhoffm commented Mar 9, 2026

The one-line version now looks like this:
grafik

I think that's ok and introducing wrapping would make the code more confusing:
grafik

So I suggest not to do any follow up.

@rcomer
Copy link
Copy Markdown
Member

rcomer commented Mar 10, 2026

I think before we started using sphinx-copybutton (#12997) it would have been awkward to copy/paste the long line, but now it doesn't really matter.

@QuLogic QuLogic mentioned this pull request Jun 4, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants