Title: platform.libc_ver() returns no information on Alpine Linux
Type: Stage:
Components: Versions: Python 3.8
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Omer.Katz, corona10
Priority: normal Keywords:

Created on 2021-02-18 11:13 by Omer.Katz, last changed 2021-02-20 06:45 by corona10.

Messages (2)
msg387211 - (view) Author: Omer Katz (Omer.Katz) Date: 2021-02-18 11:13
When calling platform.libc_ver() on Alpine I get the following tuple: ('', '')

Instead, I expect to get ('muslc', '<version number>') or an exception if the libc type & version cannot be detected.
If one of them is not detected, the returned value shouldn't be an empty string but None.
The current API is not what most people would expect it to be.
This is verified on Python 3.8 since that's the latest one available on Alpine.

This code reliably detects musl libc and its version:

I'd be happy to contribute a PR if needed.
msg387396 - (view) Author: Dong-hee Na (corona10) * (Python committer) Date: 2021-02-20 06:45

This issue should be fixed, feel free to submit the PR
Date User Action Args
2021-02-20 06:45:01corona10setmessages: + msg387396
2021-02-20 06:42:31corona10setnosy: + corona10
2021-02-18 11:13:38Omer.Katzcreate