From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.24; helo=mga09.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 52E5221B02822 for ; Wed, 26 Sep 2018 06:02:18 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Sep 2018 06:02:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,306,1534834800"; d="scan'208,217";a="93874018" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga001.jf.intel.com with ESMTP; 26 Sep 2018 06:02:08 -0700 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 26 Sep 2018 06:02:08 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 26 Sep 2018 06:02:08 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.245]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.27]) with mapi id 14.03.0319.002; Wed, 26 Sep 2018 21:02:06 +0800 From: "Zhu, Yonghong" To: "edk2-devel@lists.01.org" CC: "Feng, YunhuaX" , "Sun, Yanyan" , "Chen, Hesheng" , "Zhao, ZhiqiangX" , "Feng, Bob C" , "Zhu, Yonghong" Thread-Topic: [Patch] BaseTools Python: Migrate Python27 to Python36 Thread-Index: AdRVmGOAOFL14raNTn6g/6zdZOLGPA== Date: Wed, 26 Sep 2018 13:02:05 +0000 Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [Patch] BaseTools Python: Migrate Python27 to Python36 X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Sep 2018 13:02:19 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi All, Now we are working on bugzilla 55 (https://bugzilla.tianocore.org/show_bug.cgi?id=3D55) to migra= te BaseTools python tool from Python27 to Python36. After this migration, = the BaseTools will only support Python 3. And for now, user need to install= a Python version >=3D 3.6. Here is the link: https://github.com/yzhu52/edk2.git Branch: Python3_V2 In this branch, after run edksetup script file, tool auto detect the Python= tool that version >=3D 3.6, tool would report error if it can't find the = python that >=3D 3.6. Current we still in doing some validation for this migration, and not finis= h the update for UPT, ECC, EOT, Tests those tools and scripts. We already did following on this branch: 1. Remove the "from __future__ import" items 2. Update the xrange to range 3. Update long to int 4. Use input instead of raw_input 5. Not use iteritems(), but use items() directly 6. Remove the super() function argument 7. Remove the itertools usage 8. Fix some open file's read and write function 9. Hand the bytes and str type difference 10. Do some list and iterator update 11. Change the division operation in the expression 12. Use '\n' but not os.linesep 13. Update the BinWrappers script 14. Update edksetup script file Your suggestions is highly appreciated. Best Regards, Zhu Yonghong