public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [RFC] Proposal on Python3 Migration
@ 2018-11-16 15:02 Gao, Liming
  2018-11-16 15:58 ` Kinney, Michael D
  0 siblings, 1 reply; 2+ messages in thread
From: Gao, Liming @ 2018-11-16 15:02 UTC (permalink / raw)
  To: edk2-devel@lists.01.org
  Cc: Kinney, Michael D, leif.lindholm@linaro.org,
	Laszlo Ersek (lersek@redhat.com), afish@apple.com

Hi, all
  https://pythonclock.org/ say Python 2.7 will not be maintained past 2020. One BZ https://bugzilla.tianocore.org/show_bug.cgi?id=55 also requests this migration. And, Python37 does good performance optimization. In EDK2 build, Python37 can improve 20% performance than Python27 in Build AutoGen phase. So, we plan to add Python3 support in BaseTools. In previous discussion, the feedback is not to drop Python2 support in short term, and keep Python2 and Python3 coexist.

My proposal is to add two copy BaseTools Python code in BaseTools/Source directory. One is current BaseTools/Source/Python, another is new BaseTools/Source/Python3. edksetup.bat/edksetup.sh base on environment variable (PYTHON3_HOME) to know whether Python3 is used. If PYTHON3_HOME is not set, Python2 is still used as current way. If user wants to enable Python3, he needs to set PYTHON3_HOME. After 201811 release tag, BaseTools Python2 source code is kept as the stable release. Python3 is as the active trunk. By default, any change will be for Python3. If the submitter also request the change for Python2, he needs to list it in BZ description. If the submitter has the clear request, Python2 can add new feature or enhancement.

  If you have any comments or suggestion on Python3 migration, please join this discussion.

Thanks
Liming



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [RFC] Proposal on Python3 Migration
  2018-11-16 15:02 [RFC] Proposal on Python3 Migration Gao, Liming
@ 2018-11-16 15:58 ` Kinney, Michael D
  0 siblings, 0 replies; 2+ messages in thread
From: Kinney, Michael D @ 2018-11-16 15:58 UTC (permalink / raw)
  To: Gao, Liming, edk2-devel@lists.01.org, Kinney, Michael D
  Cc: leif.lindholm@linaro.org, Laszlo Ersek (lersek@redhat.com),
	afish@apple.com

Liming,

Adding a new Python3 directory will increase the maintenance and testing of the python-based BaseTools.

It would be better if we could have one version of the python sources that work with both Python2 and Python3.

We should use the edk2-staging branch to work towards this goal.

Please explain why we can't support both in single set of sources.  Are there technical reasons or resource reasons?

Thanks,

Mike

From: Gao, Liming
Sent: Friday, November 16, 2018 7:02 AM
To: edk2-devel@lists.01.org
Cc: Kinney, Michael D <michael.d.kinney@intel.com>; leif.lindholm@linaro.org; Laszlo Ersek (lersek@redhat.com) <lersek@redhat.com>; afish@apple.com
Subject: [RFC] Proposal on Python3 Migration

Hi, all
  https://pythonclock.org/ say Python 2.7 will not be maintained past 2020. One BZ https://bugzilla.tianocore.org/show_bug.cgi?id=55 also requests this migration. And, Python37 does good performance optimization. In EDK2 build, Python37 can improve 20% performance than Python27 in Build AutoGen phase. So, we plan to add Python3 support in BaseTools. In previous discussion, the feedback is not to drop Python2 support in short term, and keep Python2 and Python3 coexist.

My proposal is to add two copy BaseTools Python code in BaseTools/Source directory. One is current BaseTools/Source/Python, another is new BaseTools/Source/Python3. edksetup.bat/edksetup.sh base on environment variable (PYTHON3_HOME) to know whether Python3 is used. If PYTHON3_HOME is not set, Python2 is still used as current way. If user wants to enable Python3, he needs to set PYTHON3_HOME. After 201811 release tag, BaseTools Python2 source code is kept as the stable release. Python3 is as the active trunk. By default, any change will be for Python3. If the submitter also request the change for Python2, he needs to list it in BZ description. If the submitter has the clear request, Python2 can add new feature or enhancement.

  If you have any comments or suggestion on Python3 migration, please join this discussion.

Thanks
Liming



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-11-16 15:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-16 15:02 [RFC] Proposal on Python3 Migration Gao, Liming
2018-11-16 15:58 ` Kinney, Michael D

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox