Skip to content

Commit 21848e4

Browse files
authored
PEP 773: Textual tweaks and clarifications (#4249)
1 parent e2fae95 commit 21848e4

File tree

1 file changed

+33
-24
lines changed

1 file changed

+33
-24
lines changed

peps/pep-0773.rst

Lines changed: 33 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ having global ``python3.x`` commands by adding an extra entry to their ``PATH``
3131
environment variable. We recommend starting with the "How to teach this" section
3232
for the most concise high-level overview of the features.
3333

34+
The existing ``.exe`` installer and ``py`` launcher will be deprecated and no
35+
longer released from two years after this PEP is accepted. The existing
36+
embeddable distro will no longer be listed as a download, but will be available
37+
through the install manager. The Windows Store app will be immediately replaced
38+
with the install manager.
39+
3440
Reader's Note
3541
-------------
3642

@@ -532,12 +538,8 @@ prefixes, preferring a full match over a prefix, and tags use case-insensitive,
532538
number-aware matches, with dotted numbers treated as versions. Tags must match
533539
one of the listed "install for" tags, and entries list multiple such tags to
534540
handle abbreviated requests. The special tag ``default`` resolves to the user's
535-
configured default (typically ``3``).
536-
537-
For example, the ``3.10.5`` entry would list all of ``3``, ``3.10`` and
538-
``3.10.5`` as tags to be installed for. A request for ``3.10`` would match one
539-
of these and so the entry is selected. Due to the number-aware matches, a
540-
request for ``03.0010`` would also match, and ``3.10.50`` would not.
541+
configured default (typically ``3``; see Configuration later for details on
542+
configuring settings).
541543

542544
Tags may also be specified as a constraint, using ``>``, ``>=``, ``<``, ``<=``
543545
or ``!=`` followed by the ``Company\\Tag`` or ``Tag`` value. When matching a
@@ -553,12 +555,14 @@ Users are expected to use shorter tags for convenience, rather than ranges.
553555

554556
The default index file is hosted on python.org, and contains install information
555557
including package URLs and hashes for all installable versions. An alternate
556-
index may be specified by the user or their administrator (see Configuration
557-
below). Entries in the index file list the full set of tags they should be
558-
installed for, and if an exact match is found the package will be selected. In
559-
the case of no exact match, a prefix match will be used. In both cases, numbers
560-
in the tag are treated logically - that is, ``3.1`` is a prefix of ``3.1.2`` but
561-
not of ``3.10``.
558+
index may be specified by the user using a configuration file or the
559+
``--source`` command line option, or their administrator through a configuration
560+
file. The requested tag is matched against the index file, and if an exact match
561+
is found the package will be selected. In the case of no exact match, a prefix
562+
match will be used. In both cases, numbers in the tag are treated logically -
563+
that is, ``3.1`` is a prefix of ``3.1.2`` but not of ``3.10``. See Index Schema
564+
below for information on exactly how install tags are specified in the index
565+
file.
562566

563567
If a tag is already satisfied by an existing install, nothing will be installed.
564568
The user must pass an ``--upgrade`` or ``--force`` option to replace the
@@ -581,10 +585,11 @@ install (or generating aliases or shortcuts). This is intended to cover
581585
embedding cases, or downloading the files for incompatible platforms. Passing
582586
multiple tags with ``--target`` is an error.
583587

584-
If the ``--download <DIR>`` option is passed, runtimes will be downloaded to the
585-
specified directory as their source packages, and an ``index.json`` will be
586-
created referencing these files. This index can be referenced later to perform
587-
offline installs with ``python install --source <index.json> [tag ...]``.
588+
If the ``--download <DIR>`` option is passed, runtime packages are downloaded
589+
but not installed. They are stored in the specified directory as their source
590+
packages, and an ``index.json`` is created that references these files. This
591+
index can be used later to perform offline installs with ``python install
592+
--source <index.json> [tag ...]``.
588593

589594

590595
Uninstall subcommand
@@ -600,14 +605,15 @@ inspect existing installs. Unless the ``--yes`` option is passed, the user will
600605
be prompted before uninstalling each runtime.
601606

602607
If the ``--purge`` option is passed with no tags, then (after confirmation) all
603-
runtimes will be removed, along with shortcuts and any cached files.
608+
runtimes will be removed, along with shortcuts and any cached files. Passing any
609+
tags with ``--purge`` will produce an error.
604610

605611
Uninstalling PyManager does not uninstall any runtimes that were installed. For
606612
technical reasons, this would not be reliably possible (we cannot run arbitrary
607613
code at uninstall time), and so instead we deliberately ensure that anything
608614
that has been installed will continue to work. Reinstalling PyManager allows
609-
management of these installs to resume. Running ``py uninstall --purge`` before uninstalling
610-
PyManager will perform a complete uninstall.
615+
management of these installs to resume. Running ``py uninstall --purge`` before
616+
uninstalling PyManager will perform a complete uninstall.
611617

612618

613619
List subcommand
@@ -625,7 +631,7 @@ PyManager (including an active virtual environment) may be listed separately.
625631

626632
The default format is user-friendly. Other formats will include machine-readable
627633
and single string formats (e.g. ``--format=prefix`` simply prints ``sys.prefix``
628-
on a line by itself). The exact list of formats is left to implementation.
634+
on a line by itself). The exact list of formats is left to the implementation.
629635

630636
If ``--one`` is provided, only the best result is listed. This is to assist
631637
shell scripts that want to locate the default (or a suitable) runtime without
@@ -815,7 +821,7 @@ The initial schema is shown below:
815821
"id": str,
816822
817823
# Name to display in the UI
818-
"displayName": str,
824+
"display-name": str,
819825
820826
# Version used to sort packages. Also determines prerelease status.
821827
# Should follow Python's format, but is only compared among releases
@@ -837,6 +843,9 @@ The initial schema is shown below:
837843
838844
# List of tags to install this package for. This does not have to be
839845
# unique across all installs; the first match will be selected.
846+
# For example, the 3.10.5 package may list '3', '3.10' and
847+
# '3.10.5' so that any of those may be specified to install it.
848+
# Matches are number aware, so that 3.1 is not a prefix of 3.10.
840849
"install-for": [str],
841850
842851
# List of tags to run this package for. Does not have to be unique
@@ -877,7 +886,7 @@ The initial schema is shown below:
877886
}
878887
],
879888
880-
# Full or partial URL to the next index file
889+
# URL (or relative path) to the next index file
881890
"next": str,
882891
}
883892
@@ -1309,8 +1318,8 @@ We suggest an explanation like this:
13091318
This will remove all installs and any shortcuts that would otherwise be left
13101319
behind. If you already removed the manager, you can reinstall it and run the
13111320
above uninstall command again to clean up. Individual runtimes can be
1312-
uninstalled by replacing the ``--purge`` option with the tag, found by looking
1313-
at ``python list``.
1321+
uninstalled by specifying the tag instead of ``--purge``. Tags can be found
1322+
by looking at ``python list``.
13141323
13151324
13161325
Configuration

0 commit comments

Comments
 (0)