Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Adam Turner <[email protected]>
  • Loading branch information
zooba and AA-Turner authored Jan 22, 2025
1 parent 21ffec0 commit d9736cf
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions peps/pep-0772.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Created: 21-Jan-2025
Post-History:
`18-Dec-2024 <https://discuss.python.org/t/74556/>`__,
`21-Jan-2025 <https://discuss.python.org/t/77900/>`__,
Replaces: 397, 486


Abstract
Expand Down Expand Up @@ -937,7 +938,7 @@ Interaction with venv
---------------------

An activated virtual environment, as implemented by the standard library
``venv`` module, will modify the user's ``PATH`` environment variable to ensure
:mod:`venv` module, will modify the user's ``PATH`` environment variable to ensure
that the venv launcher will take precedence over other executables. As a result,
when a venv has been activated, PyManager can only be launched by its aliases
other than ``python``.
Expand All @@ -951,7 +952,7 @@ Backwards Compatibility
=======================

In general, there are no compatibility guarantees to the install process between
major versions (``3.x`` to ``3.y``), and so "having to use a different
minor versions (``3.x`` to ``3.y``), and so "having to use a different
installer" is not considered compatibility breakage. The versions of Python
installed are only impacted by this change to the extent that the install method
modified their behaviour. In general, most installs will be closer to the
Expand Down Expand Up @@ -1008,8 +1009,8 @@ selected) and require complicating the selection logic unnecessarily. This
change will be documented only.


Old py.exe launcher installed
-----------------------------
Old ``py.exe`` launcher installed
---------------------------------

Users who do not manually uninstall an old ``py.exe`` launcher will find that
both their existing and new installs of Python are found, though where versions
Expand Down Expand Up @@ -1138,18 +1139,18 @@ PyManager and override its configuration.
Impact on Existing PEPs
=======================

This proposal would effectively replace PEP 397 ("Python launcher for Windows")
and PEP 486 ("Make the Python Launcher aware of virtual environments") by
This proposal would effectively replace :pep:`397` ("Python launcher for Windows")
and :pep:`486` ("Make the Python Launcher aware of virtual environments") by
defining the same functionality as part of a new tool with the same name. Both
are already considered final, and the launcher is defined by its documentation
and normal compatibility processes. New functionality is based on the current
implementation, and not the original PEP text.

This proposal has no impact on PEP 394 ("The “python” Command on Unix-Like
This proposal has no impact on :pep`394` ("The “python” Command on Unix-Like
Systems"), and is believed to be consistent with it in devising an approach for
Windows that allows similar guidance to be given to users on all platforms.

This proposal has no impact on PEP 514 ("Python registration in the Windows
This proposal has no impact on :pep`514` ("Python registration in the Windows
registry"), and in fact improves our ability to follow it with a more flexible
system for registering our own runtimes. Tools that follow PEP 514 will find any
runtimes that choose to use the registration, regardless of how they were
Expand Down Expand Up @@ -1219,7 +1220,7 @@ Instructions currently referring to ``py`` for Windows can continue to do so, as
the install manager provides a practically equivalent command. Projects that
wish to provide Windows-specific instructions, such as by using the ``-V:``
or ``--install`` options to install the correct version, should also link to the
https://docs.python.org/using/windows.html documentation as guidance for
:ref:`documentation <using-on-windows>` as guidance for
ensuring that the install manager is installed.


Expand Down Expand Up @@ -1576,6 +1577,8 @@ PEP 723 introduced inline script metadata, a structured comment intended for
third-party tools to interpret and then launch a Python script in the correct
environment. An example taken from that PEP:

.. code:: python
# /// script
# requires-python = ">=3.11"
# dependencies = [
Expand All @@ -1596,7 +1599,6 @@ We could also detect the metadata and warn if the selected runtime does not
match its requirement, but this is not part of the initial proposal.



Open Issues
===========

Expand Down

0 comments on commit d9736cf

Please sign in to comment.