From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: python2 in git Date: Tue, 03 Mar 2020 13:43:29 +0100 Message-ID: <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]:47913) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j96tf-0008As-7n for guix-devel@gnu.org; Tue, 03 Mar 2020 07:43:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j96te-00033V-8z for guix-devel@gnu.org; Tue, 03 Mar 2020 07:43:39 -0500 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21127) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j96td-00032z-Rb for guix-devel@gnu.org; Tue, 03 Mar 2020 07:43:38 -0500 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 Hi Guix, our =E2=80=9Cgit=E2=80=9D package has python-2 among its inputs. It says t= his: ("python" ,python-2) ; CAVEAT: incompatible with python-3 according to = INSTALL The INSTALL file for git 2.25.1 says this about Python: - Python version 2.4 or later (but not 3.x, which is not supported by Perforce) is needed to use the git-p4 interface to Perforce. The git-p4 script does, however, contain conditionals to accomodate Python 3. 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 the= Python 2 style statement. I would like to build git with the latest version of Python. Any objections? -- Ricardo