question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Workaround to fix BPO-43112

See original GitHub issue

What’s the problem this feature will solve?

In this moment, because of BPO-43112, we are distributing broken musllinux_1_1 wheel packages for Python 3.9 and 3.10, which work on Docker images such as python:3.9-alpine but will not work on the alpine using the system Python.

When BPO-43112 will be solved, there will be a situation of incompatibility, resulting in newly built packages not working on the python-alpine image, for some time, and not working for current images.

Describe the solution you’d like

Pip is in the right place to save the day 🙂 because it could easily rename the broken file on install, if it detects the right conditions (tag musllinux_1_1, .so file suffix mismatching the sysconfig.get_config_vars("SOABI")) it might simply rename the wrongly named library. It has the file system permission to do so and it would work both to make broken wheels work on new images and fixed wheels to work on old images.

Alternative Solutions

A workaround bridge solution of distributing a compatibility symlink (see https://github.com/psycopg/psycopg/issues/161) is hampered by the fact that symlinks in zip files are not handled by the zipfile module (https://bugs.python.org/issue18595, https://bugs.python.org/issue27318).

Additional context

Code of Conduct

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:23 (18 by maintainers)

github_iconTop GitHub Comments

4reactions
ncopacommented, Nov 25, 2021

We had a call and have a potential path forward. Quick summary:

  • ALPINE: Add a patch on top of the current patch to make CPython look for -gnu on top of -musl for Alpine 3.15 and 3.14. Reverting the patch would break every Alpine wheel previously locally compiled (like NumPy) and would require rebuilding all shipped packages that depend on Python.

FYI. This is done in Alpine now.

3reactions
uranusjrcommented, Nov 23, 2021

One minor correction: neither of the two Alpine images are supported by CPython core devs, but different third-party vendors (the Alpine and Docker community, respectively).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Wheels for musl (Alpine) - #36 by njs - Packaging
The problem, as I understand, is that Rust is broken with musl 1.2+ and probably hard to fix. It is not a problem...
Read more >
更新日志-BeJSON.com
gh-91924: Fix __lltrace__ debug feature if the stdout encoding is not UTF-8. ... The workaround prior to this was to always feed the...
Read more >
alpine-devel-2021-12.log
2021-12-01 05:28:28 <ikke> Hello71: oh yes, that's fixed 2021-12-01 07:43:38 ... version 2021-12-06 22:23:18 <Hello71> there is also a workaround to this ...
Read more >
Liste des commits (all #30) - packages (git) - ImmortalWrt - OSDN
python3: backport and fix target musl libc detection ... as https://github.com/python/cpython/pull/24502 'bpo-43112: detect musl as a separate SOABI'
Read more >
pip issues and how to fix | GitAnswer
Checkout the issues related to pip project and the solution how to fix those issues by community. ... pip workaround to fix BPO-43112...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found