From 1f97f067476db3a5be1e93792742b0be4704b5b3 Mon Sep 17 00:00:00 2001 From: Cycloctane Date: Wed, 8 Oct 2025 00:46:39 +0800 Subject: [PATCH 1/2] add new platlib_path attr to venv doc --- Doc/library/venv.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Doc/library/venv.rst b/Doc/library/venv.rst index b0eb8ee18fa25f..4c000a92e87d0e 100644 --- a/Doc/library/venv.rst +++ b/Doc/library/venv.rst @@ -407,6 +407,8 @@ creation according to their needs, the :class:`EnvBuilder` class. * ``lib_path`` - The purelib path for the virtual environment. + * ``platlib_path`` - The platlib path for the virtual environment. + * ``bin_path`` - The script path for the virtual environment. * ``bin_name`` - The name of the script path relative to the virtual @@ -431,6 +433,9 @@ creation according to their needs, the :class:`EnvBuilder` class. The attribute ``lib_path`` was added to the context, and the context object was documented. + .. versionchanged:: 3.15 + The attribute ``platlib_path`` was added to the context. + .. method:: create_configuration(context) Creates the ``pyvenv.cfg`` configuration file in the environment. From b47b71022e9b01254c9b6848de5ce50099fe5129 Mon Sep 17 00:00:00 2001 From: Cycloctane Date: Wed, 8 Oct 2025 00:47:09 +0800 Subject: [PATCH 2/2] add venv changes to 3.15 whatsnew --- Doc/whatsnew/3.15.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index 4b176d6c8e6034..07f177fd7fdc35 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -562,6 +562,17 @@ unittest (Contributed by Garry Cairns in :gh:`134567`.) +venv +---- + +* On POSIX platforms, platlib directories will be created if needed when + creating virtual environments, instead of using ``lib64 -> lib`` symlink. + This means purelib and platlib of virtual environments no longer share the + same ``lib`` directory on platforms where :data:`sys.platlibdir` is not + equal to ``lib``. + (Contributed by Rui Xi in :gh:`133951`.) + + xml.parsers.expat -----------------