Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #14964

Re: #!/usr/bin/python3 vs virtualenv

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 <mitya57@debian.org>
Newsgroups linux.debian.maint.python
Subject Re: #!/usr/bin/python3 vs virtualenv
Date Fri, 03 Mar 2023 21:50:02 +0100
Message-ID <G5kvM-9Rly-3@gated-at.bofh.it> (permalink)
References <G5fw5-9OsW-3@gated-at.bofh.it>
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 <mitya57@gmail.com>
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 <debian-python@lists.debian.org> archive/latest/20866
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
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 <ZAJbxfwmq1FFT8gx@mitya57.me>
X-Original-References <1c48b573-b3cd-0eb8-4493-752dd9d0c3fa@inria.fr>
Xref csiph.com linux.debian.maint.python:14964

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

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=1032283 , 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 applications
> 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 (although
> 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 break
Sphinx. As well as incompatible versions of some Sphinx extensions installed
from PyPI.

--
Dmitry Shachnev

Back to linux.debian.maint.python | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

#!/usr/bin/python3 vs virtualenv Marc Glisse <marc.glisse@inria.fr> - 2023-03-03 16:30 +0100
  Re: #!/usr/bin/python3 vs virtualenv Danial Behzadi دانیال بهزادی <dani.behzi@ubuntu.com> - 2023-03-03 19:50 +0100
    Re: #!/usr/bin/python3 vs virtualenv Jeremy Stanley <fungi@yuggoth.org> - 2023-03-03 20:20 +0100
      Re: #!/usr/bin/python3 vs virtualenv Jorge Moraleda <jorge.moraleda@gmail.com> - 2023-03-03 21:30 +0100
        Re: #!/usr/bin/python3 vs virtualenv Jeremy Stanley <fungi@yuggoth.org> - 2023-03-03 21:50 +0100
          Re: #!/usr/bin/python3 vs virtualenv Jorge Moraleda <jorge.moraleda@gmail.com> - 2023-03-03 22:30 +0100
            Re: #!/usr/bin/python3 vs virtualenv Jeremy Stanley <fungi@yuggoth.org> - 2023-03-03 22:50 +0100
            Re: #!/usr/bin/python3 vs virtualenv Julian Gilbey <julian@d-and-j.net> - 2023-03-05 11:50 +0100
              Re: #!/usr/bin/python3 vs virtualenv Jorge Moraleda <jorge.moraleda@gmail.com> - 2023-03-05 13:00 +0100
              Re: #!/usr/bin/python3 vs virtualenv Stefano Rivera <stefanor@debian.org> - 2023-03-09 23:40 +0100
    Re: #!/usr/bin/python3 vs virtualenv Marc Glisse <marc.glisse@inria.fr> - 2023-03-05 14:20 +0100
  Re: #!/usr/bin/python3 vs virtualenv Dmitry Shachnev <mitya57@debian.org> - 2023-03-03 21:50 +0100

csiph-web