Skip to content

Commit ebc198f

Browse files
committed
gh-129382: Document Python 3.16 platform-dependent venv defaults
1 parent 963e2f8 commit ebc198f

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

‎Doc/library/venv.rst‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ mechanisms for third-party virtual environment creators to customize environment
302302
creation according to their needs, the :class:`EnvBuilder` class.
303303

304304
.. class:: EnvBuilder(system_site_packages=False, clear=False, \
305-
symlinks=False, upgrade=False, with_pip=False, \
305+
symlinks=None, upgrade=False, with_pip=False, \
306306
prompt=None, upgrade_deps=False, \
307307
*, scm_ignore_files=frozenset())
308308
@@ -316,7 +316,8 @@ creation according to their needs, the :class:`EnvBuilder` class.
316316
any existing target directory, before creating the environment.
317317

318318
* *symlinks* -- a boolean value indicating whether to attempt to symlink the
319-
Python binary rather than copying.
319+
Python binary rather than copying. If ``None``, the default is ``False`` on
320+
Windows and ``True`` on other platforms, matching the :ref:`CLI <venv-cli>`.
320321

321322
* *upgrade* -- a boolean value which, if true, will upgrade an existing
322323
environment with the running Python - for use when that Python has been
@@ -351,6 +352,9 @@ creation according to their needs, the :class:`EnvBuilder` class.
351352
.. versionchanged:: 3.13
352353
Added the ``scm_ignore_files`` parameter
353354

355+
.. versionchanged:: 3.16
356+
The default value of *symlinks* is now platform-dependent.
357+
354358
:class:`EnvBuilder` may be used as a base class.
355359

356360
.. method:: create(env_dir)
@@ -521,7 +525,7 @@ creation according to their needs, the :class:`EnvBuilder` class.
521525
There is also a module-level convenience function:
522526

523527
.. function:: create(env_dir, system_site_packages=False, clear=False, \
524-
symlinks=False, with_pip=False, prompt=None, \
528+
symlinks=None, with_pip=False, prompt=None, \
525529
upgrade_deps=False, *, scm_ignore_files=frozenset())
526530
527531
Create an :class:`EnvBuilder` with the given keyword arguments, and call its
@@ -541,6 +545,9 @@ There is also a module-level convenience function:
541545
.. versionchanged:: 3.13
542546
Added the *scm_ignore_files* parameter
543547

548+
.. versionchanged:: 3.16
549+
The default value of *symlinks* is now platform-dependent.
550+
544551
An example of extending ``EnvBuilder``
545552
--------------------------------------
546553

0 commit comments

Comments
 (0)