linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Fixing Python 3 syntax errors in tpm2_tests.py
@ 2019-06-17 21:28 Christian Clauss
  2019-06-18  6:23 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Clauss @ 2019-06-17 21:28 UTC (permalink / raw)
  To: linux-kselftest

Hello,

    As my very first contribution to the Linux Kernel, I would like to fix six Python 3 syntax errors in the file ./tools/testing/selftests/tpm2/tpm2_tests.py

    All six of these errors are of the same form: except ProtocolError, e:  To fix the syntax errors, I propose to change the comma (,) to “as” like:  except ProtocolError as e:

    These changes are important because the current form is compatible with Python 2 but is a syntax error in Python 3.  The proposed form is compatible with both Python 2 and Python3.  This conversion is required because Python 2 will reach its end of life in less than 200 days.

    The kernel contains at least five other files where I am able to detect Python 3 syntax errors but after studying in detail the process of making kernel modification, I believe that it is best to start with tpm2_tests.py because the changes are straightforward and uncontroversial — all issues are of the same form, and I can detect no other issues (such as undefined names) to fix in that file.

   If I succeed in getting the modifications to tpm2_tests.py through the review process then I can try the remaining files in turn.

   I would be interested to know if this is a worthwhile effort.  Is there already another initiative to resolve these issue before yearend?

   Thanks for any advise that you can provide, Chris Clauss

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

* Re: Fixing Python 3 syntax errors in tpm2_tests.py
  2019-06-17 21:28 Fixing Python 3 syntax errors in tpm2_tests.py Christian Clauss
@ 2019-06-18  6:23 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2019-06-18  6:23 UTC (permalink / raw)
  To: Christian Clauss; +Cc: linux-kselftest

On Mon, Jun 17, 2019 at 11:28:34PM +0200, Christian Clauss wrote:
> Hello,
> 
>     As my very first contribution to the Linux Kernel, I would like to fix six Python 3 syntax errors in the file ./tools/testing/selftests/tpm2/tpm2_tests.py
> 
>     All six of these errors are of the same form: except ProtocolError, e:  To fix the syntax errors, I propose to change the comma (,) to “as” like:  except ProtocolError as e:
> 
>     These changes are important because the current form is compatible with Python 2 but is a syntax error in Python 3.  The proposed form is compatible with both Python 2 and Python3.  This conversion is required because Python 2 will reach its end of life in less than 200 days.
> 
>     The kernel contains at least five other files where I am able to detect Python 3 syntax errors but after studying in detail the process of making kernel modification, I believe that it is best to start with tpm2_tests.py because the changes are straightforward and uncontroversial — all issues are of the same form, and I can detect no other issues (such as undefined names) to fix in that file.
> 
>    If I succeed in getting the modifications to tpm2_tests.py through the review process then I can try the remaining files in turn.
> 
>    I would be interested to know if this is a worthwhile effort.  Is there already another initiative to resolve these issue before yearend?

Just send patches, and we will be glad to review them as-is.  No need to
ask permission ahead of time, we do not "reserve" tasks for people.

thanks,

greg k-h

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

end of thread, other threads:[~2019-06-18  6:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-17 21:28 Fixing Python 3 syntax errors in tpm2_tests.py Christian Clauss
2019-06-18  6:23 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).