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.

Author ynyyn
Recipients paul.moore, steve.dower, tim.golden, ynyyn, zach.ware
Date 2019-10-17.14:31:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1571322664.68.0.257867788049.issue38506@roundup.psfhosted.org>
In-reply-to
Content
I, for interest, read some of source code of Python launcher, and found it used string comparison function (`wcscmp()`, in function `compare_pythons()`) to sort Python version in descending order.

It works well currently. But if Python 3.10 or Python 3.xx comes up in the future, Python 3.xx will be ranked after 3.x.

I modified the Registry and made a fake version Python 3.10, to check the launcher's behaviour.

```
PS > py -0p
Installed Pythons found by C:\Windows\py.exe Launcher for Windows
 -3.8-64        D:\Program Files\Python38\python.exe *
 -3.7-64        D:\Program Files\Python37\python.exe
 -3.7-32        D:\Program Files (x86)\Python37-32\python.exe
 -3.6-32        C:\Program Files (x86)\Python36-32\python.exe
 -3.10-64       D:\Program Files\Python37\python.exe
 -2.7-64        C:\python27-x64\python.exe
```

The result turned out that Python 3.10 was really ranked after 3.x.

And it seems that Python 3.xx should be a valid (or supported) version according to the comment from function `validate_version()`.


```
static BOOL
validate_version(wchar_t * p)
{
    /*
    Version information should start with the major version,
    Optionally followed by a period and a minor version,
    Optionally followed by a minus and one of 32 or 64.
    Valid examples:
      ...
      2.7-32
      The intent is to add to the valid patterns:
      3.10
      3-32
      ...
    */

I am not sure whether this is a potential defect that had been confirmed before... But I do not see some relevant comments in the source code.
History
Date User Action Args
2019-10-17 14:31:04ynyynsetrecipients: + ynyyn, paul.moore, tim.golden, zach.ware, steve.dower
2019-10-17 14:31:04ynyynsetmessageid: <1571322664.68.0.257867788049.issue38506@roundup.psfhosted.org>
2019-10-17 14:31:04ynyynlinkissue38506 messages
2019-10-17 14:31:03ynyyncreate