diff --git a/source/specifications/virtual-environments.rst b/source/specifications/virtual-environments.rst index ba35d96c6..738ed5dad 100644 --- a/source/specifications/virtual-environments.rst +++ b/source/specifications/virtual-environments.rst @@ -46,6 +46,11 @@ are defined: virtual environment site directories. If ``false``, the system site directories are not included. It is RECOMMENDED to set it to ``false`` when creating a virtual environments. The value is not case sensitive. +* ``python-version``: Contains a string value with the major and minor version + of the Python interpreter, such as ``3.16``. The value can be obtained with + ``f"{sys.version_info[0]}.{sys.version_info[1]}"``. It omits the patch + version or any other version components. Tools MUST write ``python-version`` + to ``pyvenv.cfg`` when creating the virtual environment. Declaring installation environments as Python virtual environments @@ -65,3 +70,4 @@ History - May 2012: This specification was approved through :pep:`405`. - Nov 2026: Removed PEP 405 references and clarified that ``include-system-site-packages`` defaults to ``true``. +- Nov 2026: Added ``python-version`` from :pep:`838`.