Path: csiph.com!pasdenom.info!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!news.szaf.org!fu-berlin.de!bofh.it!news.nic.it!robomod From: Dmitry Shachnev Newsgroups: linux.debian.maint.python Subject: Re: #!/usr/bin/python3 vs virtualenv Date: Fri, 03 Mar 2023 21:50:02 +0100 Message-ID: References: X-Original-To: debian-python@lists.debian.org X-Mailbox-Line: From debian-python-request@lists.debian.org Fri Mar 3 20:43:09 2023 Old-Return-Path: X-Amavis-Spam-Status: No, score=-11.151 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, FOURLA=0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, LDO_WHITELIST=-5, PGPSIGNATURE=-5, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001] autolearn=ham autolearn_force=no X-Policyd-Weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .gmail. - helo: .mail-lf1-f43.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -5.5 X-Gm-Message-State: AO0yUKVJI4PoFxCvUwhGRS48XNhnu3j+ith5DmoRw+3sCng7Nd3NXWuj d9yPO7o6OSBobfolEYH0aG/SLflNwWs= X-Google-SMTP-Source: AK7set9ePXMBawItvLo6/8R/3GE1BlHMNQl183c3yUO6Yh1fq+QrW3BwO3B5ADroEWbcHMXR/X9NFA== X-Received: by 2002:ac2:5e83:0:b0:4d9:8773:7d76 with SMTP id b3-20020ac25e83000000b004d987737d76mr1073125lfq.11.1677876167159; Fri, 03 Mar 2023 12:42:47 -0800 (PST) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gd9V79K/P1myD0QE" Content-Disposition: inline X-Mailing-List: archive/latest/20866 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/ZAJbxfwmq1FFT8gx@mitya57.me Approved: robomod@news.nic.it Lines: 61 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Fri, 3 Mar 2023 23:42:45 +0300 X-Original-Message-ID: X-Original-References: <1c48b573-b3cd-0eb8-4493-752dd9d0c3fa@inria.fr> Xref: csiph.com linux.debian.maint.python:14964 --gd9V79K/P1myD0QE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi all, On Fri, Mar 03, 2023 at 04:10:50PM +0100, Marc Glisse wrote: > Hello, > > I recently reported > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D1032283 , and Dmitry > suggested discussing it on this mailing list. > > Virtual environments work by adding some version of Python (possibly just= a > symlink to the system one) at the beginning of PATH. Debian policy for > Python scripts is to use #!/usr/bin/python3 and **not** #!/usr/bin/env > python3, so they are not affected. > > I think there are 2 types of Python scripts. The first type is applicatio= ns > for end users, like hg or calibre (it is possible that the existence of > plugins makes my choice of examples a bad one). If I have some strange > Python virtual environment active, I am happy that the Debian policy > prevents the virtual environment from breaking those applications (althou= gh > I may still be able to break them with PYTHONPATH). I want to add that this concern applies to Sphinx too. Newer versions of its dependencies (e.g. docutils or jinja2) can easily bre= ak Sphinx. As well as incompatible versions of some Sphinx extensions installed =66rom PyPI. -- Dmitry Shachnev --gd9V79K/P1myD0QE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE5688gqe4PSusUZcLZkYmW1hrg8sFAmQCW8EACgkQZkYmW1hr g8sxVw/8DKIVssEfUTRDbFNy2nl5xMg73ZwI8MLQIrZz+2YmjqYFM0YTkCF13m/4 eRaBIMmVMJ3dRKuyBO64B9xTKntYEMc/n0La6LReVAUr9yi840x5MISsp/dou48+ XwbORwI1zOeopEPnYBXgtlljFS/yYvqD9VWM1+Gj2Q+81EmvfM/wwiRUQ0JqOwGt XyARRT7CMN93zpvZanpQIiaq1aoyLobWhvNgirocUPWiTinAYO9mLB3p0q3t4RFl ClR5dDJ34+SK7gjvkhg07oBe/UUvUY3RbjOydoVayhB/k6cvZbUeIZ1f8mZfUycZ K9NcCBbk2yQ40FAvJ+CuGUpywqgGoBok2bpxL/2Kiq1MX0tGSzbwLOqIWKC4PLFK JUgpSLYStdsIGJM8I2q1YuOwfWcZ3x5xc21QdwRp8OZLh5ebBnHDLXSi51gkASur 09B8HIEnuHy3gLcUCXBFTXxJ/agbX2qgguH/GT89D1lJ2DOR1pzZ+BMDD9hEvsGx jrBADWs+/odsTcM+DxVxVgbHAAmmAZPWofHwMdYeyfDXOe++SW0l4dFfupeeYRT1 IZzaw5JoRAyMmSA2fYR+0u5QJ8d67Hvzmey+hF3u2pq+mloIHgWX+AxhANJvwI7G JszNSCtAvPkUf+6zXUpZ5dfRyhlR/yjmxCyp/9UmrGaulE+JOpE= =YCMS -----END PGP SIGNATURE----- --gd9V79K/P1myD0QE--