[U-Boot] [PATCH 04/10] test/py: Automated conversion to Python 3

Tom Rini trini at konsulko.com
Fri Oct 18 22:08:50 UTC 2019


On Fri, Oct 18, 2019 at 03:12:06PM -0600, Stephen Warren wrote:
> On 10/18/19 2:53 PM, Tom Rini wrote:
> > Use the 2to3 tool to perform numerous automatic conversions from Python
> > 2 syntax to Python 3.  Also fix whitespace problems that Python 3
> > catches that Python 2 did not.
> 
> > diff --git a/test/py/conftest.py b/test/py/conftest.py
> 
> >   import pytest
> >   from _pytest.runner import runtestprotocol
> >   import re
> > -import StringIO
> > +import io
> >   import sys
> 
> I think that list used to be sorted. IIRC some PEP8 tools complain about
> unsorted import lists.
> 
> > -try:
> > -    import configparser
> > -except:
> > -    import ConfigParser as configparser
> > +import configparser
> 
> Now that this is a plain import statement, let's put it with all the others
> at the appropriate point in the sorted list above.
> 
> 
> (Not sure if you want to merge fixes like this into this patch, or put them
> in path 7?)

I'll take care of both of those in patch 7, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191018/1ff85084/attachment.sig>


More information about the U-Boot mailing list