From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id a0DtNo9prmSmWQAASxT56A (envelope-from ) for ; Wed, 12 Jul 2023 10:51:27 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id YKjBNY9prmSjygAAauVa8A (envelope-from ) for ; Wed, 12 Jul 2023 10:51:27 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B99D35C87C for ; Wed, 12 Jul 2023 10:51:27 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=dkim header.b=vwqqHssJ; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1689151887; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=1Q4vdn6/DfRNZPA1eVYKorFdUiPXw4JT0aDYlr0PWBk=; b=ngQ0a5hE2WHk6KUK336HyZ2H1d6VjludvVdMskyguDkOjRpCJ15DLzrSVpubibAiMST+nq KccbJ+is2Yn9aAYQLPAzekDjOWhl/7RUqG0lvbYZWWA2fthLxhYaUytT22nUYWD/CFWsrr 4XuTjjx2GH0lHnTC/YD9uP3EeX+YFwviNTuwEuBetJxga9UG6JpH24rWh0D3OVMxJ8YpLc wCxxTlKwLE2r1PDAmAmZSrd4jjYoTAZ2nstqyvCc4G5RV14QY6UpRnDXEC8cov9cEkL6Yx jjGxLJeijpoX0ZAZ+/aHgTiVK0JHcCDTboWbZYEouudFM6pnIij+4xOiCiXqxg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=dkim header.b=vwqqHssJ; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1689151887; a=rsa-sha256; cv=none; b=Cgx+nEpl1c7jca0eogsXGPwACinAXK8pwzq2WOndCEbWrjKzRm3gAQo/Y2owOKRU1B+aau gTyr7O+EZq04Nhn56yuPy3LpirH8R8z1mLA1eaFAwd5aRQcJVa89kXWBQY0o+LviLyIv+M MBlNooWC9ZMpkMmIUOh/80Y8O6PhXwl9Xxd5v7whIqiSouFue2JpoWP/BY79lyKw8ktezo juA+WHBUJKh0yKf4I8s9yyQAmIeSk3m5PCYD5YokY/OIlbRVa1gGw7xkiP3zrQU0c63kE8 HuOUvS1VttYexU/q5qG0tXyRwKEl4jbTknXCYv57JA++mzg+p6E76Wy2iuLwVA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qJVYv-0003iX-T7; Wed, 12 Jul 2023 04:51:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qJVYs-0003iH-94 for bug-guix@gnu.org; Wed, 12 Jul 2023 04:51:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qJVYs-0000MS-1H for bug-guix@gnu.org; Wed, 12 Jul 2023 04:51:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qJVYr-0006Bd-Tr for bug-guix@gnu.org; Wed, 12 Jul 2023 04:51:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#64309: Python dlopen()s musl libc Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 12 Jul 2023 08:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64309 X-GNU-PR-Package: guix X-GNU-PR-Keywords: moreinfo To: Lars-Dominik Braun Cc: jgart@dismail.de, Ludovic =?UTF-8?Q?Court=C3=A8s?= , Athena Martin , 64309@debbugs.gnu.org Received: via spool by 64309-submit@debbugs.gnu.org id=B64309.168915185023759 (code B ref 64309); Wed, 12 Jul 2023 08:51:01 +0000 Received: (at 64309) by debbugs.gnu.org; 12 Jul 2023 08:50:50 +0000 Received: from localhost ([127.0.0.1]:51691 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qJVYg-0006B8-1I for submit@debbugs.gnu.org; Wed, 12 Jul 2023 04:50:50 -0400 Received: from jpoiret.xyz ([206.189.101.64]:58806) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qJVYb-0006Ax-QM for 64309@debbugs.gnu.org; Wed, 12 Jul 2023 04:50:48 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id AD02318540C; Wed, 12 Jul 2023 08:50:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1689151844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1Q4vdn6/DfRNZPA1eVYKorFdUiPXw4JT0aDYlr0PWBk=; b=vwqqHssJhLNaigR7hkajITsB9R7yO2jIBiLiwV8gjjl5gudpeV204lRbACqfgdR4f7KwWP KD58CvhYF2NqbnLcKS3ZdpjxQJ4+MaPUhD9O2KSC+GULHvrV1wSdGa4Nj7FFsnu5azYVTr lM5K0BhAxbkquUgNtPBv3zEpFgHRxaCaUcAVnii0R7Ngt23Wz8mY0MV8hcWYLn5mQnwcjp Od5gpqSn35yJuKtv3xp11H8/j9X1QBPBPKTa4BZljERZI+CDneZFGyTjr+EEPafnbb0twB xFHHUMfUCp1rj7EVprbwrFiew/OFLNZYPQEub5XMZHg05yBQNzIDeLWp8kcRUQ== In-Reply-To: References: <20230626204230.7b3b773a@spock.hosts.alm.website> <87mt07kej7.fsf@gnu.org> <20230708161658.25be509c@spock.hosts.alm.website> <87v8et8oug.fsf@jpoiret.xyz> <20230709162221.39fb0e66@spock.hosts.alm.website> <87pm508cir.fsf@jpoiret.xyz> <20230710154734.2b71b56b@spock.hosts.alm.website> <87jzv6979d.fsf@jpoiret.xyz> Date: Wed, 12 Jul 2023 10:50:40 +0200 Message-ID: <87h6q98qe7.fsf@jpoiret.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spamd-Bar: -- X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Josselin Poiret From: Josselin Poiret via Bug reports for GNU Guix Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: B99D35C87C X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -7.41 X-Spam-Score: -7.41 X-TUID: 2dfCv9ZuruvD --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Lars, Lars-Dominik Braun writes: > I think the problem is bigger than usercustomize. Any custom PYTHONPATH > also slips through and causes this issue, as well as any custom > GUIX_PYTHONPATH, because the executable wrapper appends it (think nested > `guix shell` invokations with different versions of a library for > an example where this could go wrong). > > Guix-managed Python packages (libraries nor applications) should > generally not pick up dependencies from random paths =E2=80=93 only those > from their package description, so we can keep Guix=E2=80=99 promise of b= eing > self-contained. > > I have experimented with customizing Python=E2=80=99s importing mechanism > through a custom MetaPathFinder. It works by adding a __guix_pythonpath__ > variable to every Python package=E2=80=99s __init__.py file and modifying= the > module loader=E2=80=99s search path accordingly if such a variable exists= . It > would provide exactly that guarantee, but it=E2=80=99s just a PoC at this > point =E2=80=93 see attached file. Woah, looks like a neat solution. Do you think it would scale for all our Python packages without manual intervention? If so, this would definitely be the way forward. > Apart from that I don=E2=80=99t see a good short-term solution right now.= It=E2=80=99s > just how Python works. I mostly agree with you, but for this rather common case of having also a usercustomize it would be nice to circumvent it. In general, I don't think we ever want a Guix-produced Python script to load the usercustomize, hence my suggestion. The other case of PYTHONPATH is also annoying but can be tamed by modifying the env variable temporarily. Best, =2D-=20 Josselin Poiret --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHEBAEBCgAuFiEEOSSM2EHGPMM23K8vUF5AuRYXGooFAmSuaWAQHGRldkBqcG9p cmV0Lnh5egAKCRBQXkC5Fhcaima5C/9kdGYYe8WBijct1N4LtGgNAgtT7/BZ+O9H CqDoBorRaM+QI2jTt6o2nPKAakVFcrDfLFH42xWcDs4KgB7wsZXphE/O3CuLpDgI tUmxUrh2yd6HXY2NtjIqpGurHY0PGrUaEYgexB4f06cBVouoHkJve5ARgpH1ATbY gQCvR4Txm5G41Zz4qLdFHtvB5jT9/pwaFvMrRvw/UQEEX/mGcirJyxxVwQGAU01C BeBMi7W58MiGBYQpHX08123WrEvi5XPTFujkaxt0FIQs+LkDZGjsSqJFCme5vdme WfYwu3ZLRXneXX4BJbALBG+0308Zi5rw/1Lyicy5DCjlP0T+JrwaItJYHTq3MoHS 69DiC1NYI6i398NHBkKm85umAhkX4fZTQgCZwW7FzLuoFvEijr1VBYUYLXupOGZG LGY6JxFl3hqmp2RN2woxYafPMvKjOaJuvAiV6TZML1KPHPAhLoIoCSCckW2xNCUa l/soAKw78GNyr+iWJKF+WKOuqCdOoG8= =hgQZ -----END PGP SIGNATURE----- --=-=-=--