From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1MpR6B-0008Fy-DY for garchives@archives.gentoo.org; Sun, 20 Sep 2009 18:25:23 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 013D3E0655; Sun, 20 Sep 2009 18:25:22 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id B9CEEE0655 for ; Sun, 20 Sep 2009 18:25:21 +0000 (UTC) Received: from afta-gentoo.localnet (ip-85-198-235-97.broker.com.pl [85.198.235.97]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id ABCE4B400F for ; Sun, 20 Sep 2009 18:25:20 +0000 (UTC) From: Arfrever Frehtes Taifersar Arahesis To: Gentoo Development Subject: Re: [gentoo-dev] Stabilization of Python 3.1 Date: Sun, 20 Sep 2009 20:27:30 +0200 User-Agent: KMail/1.12.1 (Linux/2.6.30-tuxonice-r5-AFTA; KDE/4.3.1; x86_64; ; ) References: <200909191848.33225.Arfrever@gentoo.org> <200909201935.08611.Arfrever@gentoo.org> <8b4c83ad0909201047t350ef158l8aca445789c910a4@mail.gmail.com> In-Reply-To: <8b4c83ad0909201047t350ef158l8aca445789c910a4@mail.gmail.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3737954.hon8p5Yzph"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200909202027.34691.Arfrever@gentoo.org> X-Archives-Salt: ca5745e2-c28f-4777-becc-5f43f888730f X-Archives-Hash: 7fd00f628c6bfc6e5fd8523c30903d30 --nextPart3737954.hon8p5Yzph Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 2009-09-20 19:47:28 Nirbheek Chauhan napisa=C5=82(a): > On Sun, Sep 20, 2009 at 11:05 PM, Arfrever Frehtes Taifersar Arahesis > wrote: > >> Package X (stable) requires python-2 > >> Package Y (stable) requires python-3 > >> > >> =3D> User can't use both at the same time. > > > > Distribute/Setuptools will ensure that appropriate shebang is present i= n Python > > scripts. In other cases, we can easily modify shebangs in installed scr= ipts. > > (A new function in python.eclass could be created for this purpose, but= until > > now it isn't needed.) > > >=20 > Oooh, this will lead to more phun! >=20 > Package A (module, stable) requires python-3 >=20 > However, A is a dependency of *both* X and Y >=20 > Now what? Slotting? Install to both/all python prefixes? Or some other > ugly solution? There is a difference between Python scripts and Python modules. Python scripts should have shebang and this shebang is used to decide which interpreter should be used when './script.py' is called. But it is possible to call Python scripts using 'pythonX.Y script.py' which will enforce using of pythonX.Y instead of interpreter specified in shebang in this script. When one Python script executes another Python script (using e.g. subprocess.Popen()) then both scripts will work correctly even when they have different shebangs. Python modules shouldn't have shebang. Python modules are intended to be imported from Python scripts or other Python modules. Any shebang in a Python module is ignored, when this module is imported using 'import' statement. The chance that well known and often used Python modules start unconditionally require Python 3 in the near future is small, but Python scripts can safely do it. =46or example PyQt4 supports both Python 2 and 3, but a useful script, which uses PyQt4, might require Python 3. > Seriously, if you *really* *really* want python-3 stable, it should: >=20 > 1) NOT show up in `eselect python` to set as the default interpreter When a user wants to work for an hour with a script requiring Python 3, and doesn't want to use e.g. Portage during this time, then it is reasonable to run 'eselect python set python3.1' once and be able to just use './script.py' instead of having to type 'python3.1 script.py' every time. Next this user can switch active Python back to 2.6. > 2) NOT be a dependency of any package in stable It isn't implementable without having to change dependencies in hundreds of packages. There is nothing wrong in having Python 3 installed which would use small amount of disk space. =2D-=20 Arfrever Frehtes Taifersar Arahesis --nextPart3737954.hon8p5Yzph Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (GNU/Linux) iEYEABECAAYFAkq2dBYACgkQIEGVSeBq/j67BwCggwO425rIQ7PCJ+MtRMBL8llJ g1oAnRrVy/bAdFRFHAKp531iPftmYenk =JhdJ -----END PGP SIGNATURE----- --nextPart3737954.hon8p5Yzph--