Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python Launcher for Windows (py -0) no longer shows star ("*") for default version #91395

Closed
Dutcho mannequin opened this issue Apr 6, 2022 · 7 comments
Closed

Python Launcher for Windows (py -0) no longer shows star ("*") for default version #91395

Dutcho mannequin opened this issue Apr 6, 2022 · 7 comments
Assignees
Labels
3.11 only security fixes OS-windows

Comments

@Dutcho
Copy link
Mannequin

Dutcho mannequin commented Apr 6, 2022

BPO 47239
Nosy @pfmoore, @tjguk, @zware, @zooba, @Dutcho
PRs
  • bpo-47239: Fixes py.exe output when run in a virtual environment. #32364
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/zooba'
    closed_at = <Date 2022-04-06.23:11:17.852>
    created_at = <Date 2022-04-06.11:03:19.553>
    labels = ['OS-windows', '3.11']
    title = 'Python Launcher for Windows (`py -0`) no longer shows star ("*") for default version'
    updated_at = <Date 2022-04-06.23:11:17.852>
    user = 'https://github.com/Dutcho'

    bugs.python.org fields:

    activity = <Date 2022-04-06.23:11:17.852>
    actor = 'steve.dower'
    assignee = 'steve.dower'
    closed = True
    closed_date = <Date 2022-04-06.23:11:17.852>
    closer = 'steve.dower'
    components = ['Windows']
    creation = <Date 2022-04-06.11:03:19.553>
    creator = 'Dutcho'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 47239
    keywords = ['patch']
    message_count = 7.0
    messages = ['416855', '416856', '416858', '416860', '416864', '416872', '416907']
    nosy_count = 5.0
    nosy_names = ['paul.moore', 'tim.golden', 'zach.ware', 'steve.dower', 'Dutcho']
    pr_nums = ['32364']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue47239'
    versions = ['Python 3.11']

    @Dutcho Dutcho mannequin added 3.11 only security fixes OS-windows labels Apr 6, 2022
    @Dutcho
    Copy link
    Mannequin Author

    Dutcho mannequin commented Apr 6, 2022

    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
    

    @Dutcho Dutcho mannequin changed the title Python Launcher for Windowscd \ Python Launcher for Windows (py -0) no longer shows star ("*") for default version Apr 6, 2022
    @Dutcho Dutcho mannequin changed the title Python Launcher for Windowscd \ Python Launcher for Windows (py -0) no longer shows star ("*") for default version Apr 6, 2022
    @Dutcho
    Copy link
    Mannequin Author

    Dutcho mannequin commented Apr 6, 2022

    That was the case in older versions (up to a6)

    @zooba
    Copy link
    Member

    zooba commented Apr 6, 2022

    Good catch, thanks!

    @Dutcho
    Copy link
    Mannequin Author

    Dutcho mannequin commented Apr 6, 2022

    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?

    @zooba
    Copy link
    Member

    zooba commented Apr 6, 2022

    It's fine here. It affects the same part of the code.

    @zooba
    Copy link
    Member

    zooba commented Apr 6, 2022

    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

    @zooba
    Copy link
    Member

    zooba commented Apr 6, 2022

    New changeset 2390b22 by Steve Dower in branch 'main':
    bpo-47239: Fixes py.exe output when run in a virtual environment. (GH-32364)
    2390b22

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.11 only security fixes OS-windows
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant