From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxim Cournoyer Subject: Re: python2 in git Date: Tue, 03 Mar 2020 12:53:07 +0000 Message-ID: <63DD2665-853A-4862-A201-05576FB61503@gmail.com> References: <875zflhamm.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:49188) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j972u-0004CI-0b for guix-devel@gnu.org; Tue, 03 Mar 2020 07:53:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j972s-00072y-S7 for guix-devel@gnu.org; Tue, 03 Mar 2020 07:53:11 -0500 Received: from mail-qt1-x836.google.com ([2607:f8b0:4864:20::836]:41926) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j972s-00072m-Oo for guix-devel@gnu.org; Tue, 03 Mar 2020 07:53:10 -0500 Received: by mail-qt1-x836.google.com with SMTP id l21so2646037qtr.8 for ; Tue, 03 Mar 2020 04:53:10 -0800 (PST) In-Reply-To: <875zflhamm.fsf@elephly.net> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane-mx.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org, Ricardo Wurmus Hi Ricardo! On March 3, 2020 12:43:29 PM UTC, Ricardo Wurmus wr= ote: >Hi Guix, > >our =E2=80=9Cgit=E2=80=9D package has python-2 among its inputs=2E It sa= ys this: > >("python" ,python-2) ; CAVEAT: incompatible with python-3 according to >INSTALL > >The INSTALL file for git 2=2E25=2E1 says this about Python: > > - Python version 2=2E4 or later (but not 3=2Ex, which is not > supported by Perforce) is needed to use the git-p4 interface > to Perforce=2E > >The git-p4 script does, however, contain conditionals to accomodate >Python 3=2E Here=E2=80=99s an example: > >--8<---------------cut here---------------start------------->8--- ># support basestring in python3 >try: > unicode =3D unicode >except NameError: > # 'unicode' is undefined, must be Python 3 > str =3D str > unicode =3D str > bytes =3D bytes > basestring =3D (str,bytes) >else: > # 'unicode' exists, must be Python 2 > str =3D str > unicode =3D unicode > bytes =3D str > basestring =3D basestring >--8<---------------cut here---------------end--------------->8--- > >It also uses the Python 3 style =E2=80=9Cprint=E2=80=9D call instead of t= he Python 2 >style statement=2E > >I would like to build git with the latest version of Python=2E Any >objections? Good analysis! None from me! Maxim