Skip to content

bpo-46826: document prefixes argument on site.getsitepackages #31546

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

asnelling
Copy link

@asnelling asnelling commented Feb 24, 2022

Adding prefixes argument from code below to site.getsitepackages docs.

cpython/Lib/site.py

Lines 346 to 352 in 7fce106

def getsitepackages(prefixes=None):
"""Returns a list containing all global site-packages directories.
For each directory present in ``prefixes`` (or the global ``PREFIXES``),
this function will find its `site-packages` subdirectory depending on the
system environment, and will return a list of full paths.
"""

Introduced in commit 7ded1f0

https://bugs.python.org/issue46826

@bedevere-bot bedevere-bot added the docs Documentation in the Doc dir label Feb 24, 2022
Return a list containing all global :file:`site-packages` directories.

For each directory present in *prefixes* (or :data:`PREFIXES` if *prefixes*
is None), this function will find its :file:`site-packages` subdirectory
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
is None), this function will find its :file:`site-packages` subdirectory
is ``None``), this function will find its :file:`site-packages` subdirectory

@@ -0,0 +1 @@
document prefixes argument on site.getsitepackages
Copy link
Contributor

@slateny slateny Oct 2, 2022

Choose a reason for hiding this comment

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

As it's a doc change I'd say you can remove this file

Actually, since it documents a new parameter it might be useful to have the news.

Suggested change
document prefixes argument on site.getsitepackages
Document prefixes argument for :func:`~site.getsitepackages`.

@slateny
Copy link
Contributor

slateny commented Dec 6, 2022

@asnelling Would you still be interested in giving the PR a quick update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review docs Documentation in the Doc dir skip news
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

5 participants