From f0f560cd210d14e4cf5de403a7afd4f4348796f7 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Fri, 28 Aug 2026 15:59:49 +0100 Subject: [PATCH 1/3] Clarify `sys.getsitepackages()` docs re. checking for existance --- Doc/library/site.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Doc/library/site.rst b/Doc/library/site.rst index fe8718280b2a015..c3488e1edbfe552 100644 --- a/Doc/library/site.rst +++ b/Doc/library/site.rst @@ -454,9 +454,12 @@ Module contents 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 + is ``None``), this function will compute its site-packages subdirectory depending on the system environment, and will return a list of full paths. + The paths are computed from *prefixes* and the running interpreter's + configuration, and are not checked for existence. + .. versionadded:: 3.2 .. versionchanged:: 3.3 From b4ef0872938b21e9f07758827ad0ab2b32a3fa23 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Fri, 28 Aug 2026 18:55:23 +0100 Subject: [PATCH 2/3] Tidy a little --- Doc/library/site.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Doc/library/site.rst b/Doc/library/site.rst index c3488e1edbfe552..4bfb5ccd2163584 100644 --- a/Doc/library/site.rst +++ b/Doc/library/site.rst @@ -456,8 +456,7 @@ Module contents For each directory present in *prefixes* (or :data:`PREFIXES` if *prefixes* is ``None``), this function will compute its site-packages subdirectory depending on the system environment, and will return a list of full paths. - - The paths are computed from *prefixes* and the running interpreter's + The returned paths reflect the running interpreter's version and configuration, and are not checked for existence. .. versionadded:: 3.2 From 35710f74d2631e708f7476cfe9a3381dbafa5baa Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Fri, 28 Aug 2026 20:44:33 +0100 Subject: [PATCH 3/3] Apply @warsaw's suggestions Co-authored-by: Barry Warsaw --- Doc/library/site.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Doc/library/site.rst b/Doc/library/site.rst index 4bfb5ccd2163584..090c4ef3ba03fc2 100644 --- a/Doc/library/site.rst +++ b/Doc/library/site.rst @@ -453,11 +453,10 @@ Module contents Return a list containing all global site-packages directories. - For each directory present in *prefixes* (or :data:`PREFIXES` if *prefixes* + For each directory given in *prefixes* (or :data:`PREFIXES` if *prefixes* is ``None``), this function will compute its site-packages subdirectory - depending on the system environment, and will return a list of full paths. - The returned paths reflect the running interpreter's version and - configuration, and are not checked for existence. + depending on the system environment, and will return a list of full paths, + which are not checked for existence. .. versionadded:: 3.2