➜

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 eryksun
Recipients eryksun, serhiy.storchaka, terry.reedy, vstinner
Date 2021-02-27.20:06:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <[email protected]>
In-reply-to
Content
> If it was the tests, they seem to have been fixed elsewhere.

The cited tests haven't been changed to work with non-normalized sys.executable, sys.prefix, etc. But it's not common to run the test suite with a non-normalized path such as "Lib/../build/python".

> you stated above that on Windows a \\?\ path is possible but 
> will not work for startup, and that you would open an issue 

Sorry, I don't remember the details of the bug that I mentioned. But it became a non-issue in 3.6+, which canonicalizes the executable path. For example:

    >>> exe = r'\\?\C:\Program Files\Python36\python.exe'
    >>> cmd = 'python -c "import sys; print(sys.executable)"'
    >>> subprocess.call(cmd, executable=exe)
    C:\Program Files\Python36\python.exe
    0

Compare the latter to the output of GetModuleFileNameW(NULL, ...) in this case, which returns a \\?\ extended (verbatim) path:

    >>> exe = r'\\?\C:\Program Files\Python36\python.exe'
    >>> cmd = 'python -c "import _winapi; print(_winapi.GetModuleFileName(0))"'
    >>> subprocess.call(cmd, executable=exe)
    \\?\C:\Program Files\Python36\python.exe
    0

> Do any of the non-normalized Linux (or *nix) executable paths fail for startup?

Not that I'm aware of. AFAIK, it's just about the particular tests failing in this case.
History
Date User Action Args
2021-02-27 20:06:55eryksunsetrecipients: + eryksun, terry.reedy, vstinner, serhiy.storchaka
2021-02-27 20:06:55eryksunsetmessageid: <[email protected]>
2021-02-27 20:06:55eryksunlinkissue31030 messages
2021-02-27 20:06:55eryksuncreate