Skip to content
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

shutil.which() docs reference os.environ as :data: #124494

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

twm
Copy link
Contributor

@twm twm commented Sep 25, 2024

The shutil.which() docs referenced os.environ using :func:`os.environ` , which renders as "os.environ()" — nonsensical, as the mapping is not callable. The correct notation is :data:`os.environ` .

screenshot of os.environ()

I also made use of :envvar: when talking about PATH and PATHEXT, following the pattern in the venv docs.

I did not file an issue, nor create a blurb (the previous PR here didn't), as this change seems trivial. Happy to do so, though! I did reword the paragraph a bit, though most of the diff is caused by re-wrapping lines.


📚 Documentation preview 📚: https://cpython-previews--124494.org.readthedocs.build/en/124494/library/shutil.html

And make use of :envvar: when talking about PATH and PATHEXT.
Copy link

cpython-cla-bot bot commented Sep 25, 2024

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app bedevere-app bot added awaiting review docs Documentation in the Doc dir skip news labels Sep 25, 2024
@AA-Turner AA-Turner added skip issue needs backport to 3.12 bug and security fixes needs backport to 3.13 bugs and security fixes labels Sep 25, 2024
@AA-Turner AA-Turner merged commit 0d38409 into python:main Sep 25, 2024
30 checks passed
@miss-islington-app
Copy link

Thanks @twm for the PR, and @AA-Turner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 25, 2024
@bedevere-app
Copy link

bedevere-app bot commented Sep 25, 2024

GH-124497 is a backport of this pull request to the 3.13 branch.

@miss-islington-app
Copy link

Sorry, @twm and @AA-Turner, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 0d38409f422b7be158a45e59766d8f4605dfa5df 3.12

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Sep 25, 2024
@AA-Turner
Copy link
Member

AA-Turner commented Sep 25, 2024

Thanks Tom, are you able to handle backports to 3.12? Let me know if you have any problems with cherry_picker.

A

@twm
Copy link
Contributor Author

twm commented Sep 25, 2024

@AA-Turner Sure, I will give it a try this evening!

Yhg1s pushed a commit that referenced this pull request Sep 26, 2024
…il.which()`` (GH-124494) (#124497)

Doc: Improve documentation for the ``path`` argument in ``shutil.which()`` (GH-124494)
(cherry picked from commit 0d38409)

Co-authored-by: Tom Most <[email protected]>
twm added a commit to twm/cpython that referenced this pull request Sep 26, 2024
@bedevere-app
Copy link

bedevere-app bot commented Sep 26, 2024

GH-124576 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Sep 26, 2024
twm added a commit to twm/cpython that referenced this pull request Sep 26, 2024
@bedevere-app
Copy link

bedevere-app bot commented Sep 26, 2024

GH-124576 is a backport of this pull request to the 3.12 branch.

AA-Turner pushed a commit that referenced this pull request Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip issue skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants