https://github.com/python/cpython/commit/af0e7a64906a1445c3e560cd36da6f03eb80988c
commit: af0e7a64906a1445c3e560cd36da6f03eb80988c
branch: 3.14
author: Miss Islington (bot) <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2026-08-13T08:52:31+03:00
summary:

[3.14] gh-90982: Document prefixes argument on site.getsitepackages (GH-31546) 
(GH-155644)

(cherry picked from commit bc31217fe432b5ede1485bec2b62b2c67a48eee4)

Co-authored-by: Addison Snelling <[email protected]>

files:
M Doc/library/site.rst

diff --git a/Doc/library/site.rst b/Doc/library/site.rst
index 4686c9fc92ced2..19c2257031a6ee 100644
--- a/Doc/library/site.rst
+++ b/Doc/library/site.rst
@@ -241,12 +241,19 @@ Module contents
    used in :mod:`sitecustomize` or :mod:`usercustomize` (see above).
 
 
-.. function:: getsitepackages()
+.. function:: getsitepackages(prefixes=None)
 
    Return a list containing all global site-packages directories.
 
+   For each directory present in *prefixes* (or :data:`PREFIXES` if *prefixes*
+   is ``None``), this function will find its site-packages subdirectory
+   depending on the system environment, and will return a list of full paths.
+
    .. versionadded:: 3.2
 
+   .. versionchanged:: 3.3
+      Added the optional *prefixes* parameter.
+
 
 .. function:: getuserbase()
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to