[New-bugs-announce] [issue42257] platform.libc_ver() doesn't consider in case of executable is empty string

Kurochan report at bugs.python.org
Wed Nov 4 01:01:55 EST 2020


New submission from Kurochan <kuro at kurochan.org>:

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

----------
components: Library (Lib)
messages: 380311
nosy: kurochan
priority: normal
severity: normal
status: open
title: platform.libc_ver() doesn't consider in case of executable is empty string
type: behavior
versions: Python 3.10, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42257>
_______________________________________


More information about the New-bugs-announce mailing list