From 8552eca8987e5f3b1f3c7cc1f13506ce06b7c835 Mon Sep 17 00:00:00 2001 From: Addison Snelling Date: Wed, 12 Aug 2026 20:16:47 +0000 Subject: [PATCH 1/2] gh-90982: Document prefixes argument on site.getsitepackages (GH-31546) (cherry picked from commit bc31217fe432b5ede1485bec2b62b2c67a48eee4) Co-authored-by: Addison Snelling --- Doc/library/site.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Doc/library/site.rst b/Doc/library/site.rst index 4686c9fc92ced29..7e8c16f284f5c26 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 + Add the optional *prefixes* argument. + .. function:: getuserbase() From b6ebf7f7af56327cfcd907f0aa520c113dc5c59e Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Thu, 13 Aug 2026 08:42:50 +0300 Subject: [PATCH 2/2] gh-90982: Say "Added the optional *prefixes* parameter" Co-Authored-By: Claude Opus 5 (1M context) --- Doc/library/site.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/site.rst b/Doc/library/site.rst index 7e8c16f284f5c26..19c2257031a6ee3 100644 --- a/Doc/library/site.rst +++ b/Doc/library/site.rst @@ -252,7 +252,7 @@ Module contents .. versionadded:: 3.2 .. versionchanged:: 3.3 - Add the optional *prefixes* argument. + Added the optional *prefixes* parameter. .. function:: getuserbase()