This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Python Launcher for Windows (`py -0`) no longer shows star ("*") for default version
Type: Stage: resolved
Components: Windows Versions: Python 3.11
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: steve.dower Nosy List: Dutcho, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords: patch

Created on 2022-04-06 11:03 by Dutcho, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 32364 merged steve.dower, 2022-04-06 14:18
Messages (7)
msg416855 - (view) Author: (Dutcho) Date: 2022-04-06 11:06
If doing `py -list` in 3.11.0a7, a star "*" shows on 3.11, even though the default (set by environment variable PY_PYTHON) is 3.10, which `py -V` confirms

C:\>py --list
 -V:3.11 *        Python 3.11 (64-bit)
 -V:3.10          Python 3.10 (64-bit)
 -V:3.9           Python 3.9 (64-bit)
 -V:3.8           Python 3.8 (64-bit)

C:\>py -V
Python 3.10.4
msg416856 - (view) Author: (Dutcho) Date: 2022-04-06 11:07
That was the case in older versions (up to a6)
msg416858 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2022-04-06 11:12
Good catch, thanks!
msg416860 - (view) Author: (Dutcho) Date: 2022-04-06 11:48
BTW I just found 'py -0p' also no longer shows the 'venv' path

(venv) C:\>py -0p
 -V:3.11 *        C:\Program Files\Python311\python.exe
 -V:3.10          C:\Program Files\Python310\python.exe
 -V:3.9           C:\Program Files\Python39\python.exe
 -V:3.8           C:\Program Files\Python38\python.exe
(venv) C:\>pip -V
pip 22.0.4 from C:\...\venv\Lib\site-packages\pip (python 3.11)

Or should I make a separate bug entry for this?
msg416864 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2022-04-06 12:13
It's fine here. It affects the same part of the code.
msg416872 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2022-04-06 14:25
PR posted, and here's some sample output with the change:

C:\> py.exe --list
  *               Active venv
 -V:3.11          Python 3.11 (Store)
 -V:3.10          Python 3.10 (Store)
 -V:3.10-32       Python 3.10 (32-bit)
 -V:3.9           Python 3.9 (64-bit)
 -V:3.9-32        Python 3.9 (32-bit)
 -V:3.8           Python 3.8 (64-bit)
 -V:3.7           Python 3.7 (64-bit)
 -V:ContinuumAnalytics/Anaconda38-64 Anaconda 2021.05
 -V:ContinuumAnalytics/Anaconda37-64 Anaconda py37_4.8.3

C:\> py.exe --list-paths
  *               C:\Temp\env310\Scripts\python_d.exe
 -V:3.11          C:\Users\steve\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.11_3847v3x7pw1km\python.exe
 -V:3.10          C:\Users\steve\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_3847v3x7pw1km\python.exe
 -V:3.10-32       C:\Users\steve\AppData\Local\Programs\Python\Python310-32\python.exe
 -V:3.9           C:\Users\steve\AppData\Local\Programs\Python\Python39\python.exe
 -V:3.9-32        C:\Users\steve\AppData\Local\Programs\Python\Python39-32\python.exe
 -V:3.8           C:\Python38\python.exe
 -V:3.7           C:\Python37\python.exe
 -V:ContinuumAnalytics/Anaconda38-64 C:\Users\steve\Anaconda3\python.exe
 -V:ContinuumAnalytics/Anaconda37-64 C:\Users\steve\Miniconda3\python.exe
msg416907 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2022-04-06 23:10
New changeset 2390b2236d4b6ea96217478221d6f7d4b4f344f8 by Steve Dower in branch 'main':
bpo-47239: Fixes py.exe output when run in a virtual environment. (GH-32364)
Date User Action Args
2022-04-11 14:59:58adminsetgithub: 91395
2022-04-06 23:11:17steve.dowersetstatus: open -> closed
assignee: steve.dower
resolution: fixed
stage: patch review -> resolved
2022-04-06 23:10:08steve.dowersetmessages: + msg416907
2022-04-06 14:25:25steve.dowersetmessages: + msg416872
2022-04-06 14:18:08steve.dowersetkeywords: + patch
stage: patch review
pull_requests: + pull_request30411
2022-04-06 12:13:58steve.dowersetmessages: + msg416864
2022-04-06 11:48:10Dutchosetmessages: + msg416860
2022-04-06 11:12:13steve.dowersetmessages: + msg416858
2022-04-06 11:07:39Dutchosetmessages: + msg416856
2022-04-06 11:06:59Dutchosetmessages: + msg416855
title: Python Launcher for Windowscd \ -> Python Launcher for Windows (`py -0`) no longer shows star ("*") for default version
2022-04-06 11:03:19Dutchocreate