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.

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

Created on 2021-02-18 11:13 by Omer.Katz, last changed 2022-04-11 14:59 by admin.

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: https://github.com/lovell/detect-libc/blob/master/lib/detect-libc.js

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
@Omer.Katz

This issue should be fixed, feel free to submit the PR
History
Date User Action Args
2022-04-11 14:59:41adminsetgithub: 87414
2021-07-05 08:01:18The Compilersetnosy: + The Compiler
2021-02-20 06:45:01corona10setmessages: + msg387396
2021-02-20 06:42:31corona10setnosy: + corona10
2021-02-18 11:13:38Omer.Katzcreate