classification
Title: platform.libc_ver() doesn't consider in case of executable is empty string
Type: behavior Stage: patch review
Components: Library (Lib) Versions: Python 3.10, Python 3.9, Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: kurochan
Priority: normal Keywords: patch

Created on 2020-11-04 06:01 by kurochan, last changed 2020-11-04 06:17 by kurochan.

Pull Requests
URL Status Linked Edit
PR 23140 open kurochan, 2020-11-04 06:17
Messages (1)
msg380311 - (view) Author: Kurochan (kurochan) * Date: 2020-11-04 06:01
Currently, `platform.libc_ver()` doesn't consider in case of `executable` variable is an empty string.
However, with Python 3.8, the following code could pass an empty string `executable` to the `platform.libc_ver()` function.

https://github.com/python/cpython/blob/efc782d29e229924076ffb6645a72f26242fb3ef/Lib/platform.py#L1205
https://docs.python.org/3/library/sys.html#sys.executable

Because the `sys.executable` could return an empty string, so I would like to add the empty string handler.

https://github.com/python/cpython/blob/efc782d29e229924076ffb6645a72f26242fb3ef/Lib/platform.py#L174

Or please also merge the following PR to Python 3.8.
https://github.com/python/cpython/pull/14418
History
Date User Action Args
2020-11-04 06:17:23kurochansetkeywords: + patch
stage: patch review
pull_requests: + pull_request22053
2020-11-04 06:01:55kurochancreate