[Piuparts-devel] First step to Python 3 - PR

Herbert Fortes terberh at gmail.com
Thu Jan 17 14:11:20 GMT 2019


On 1/17/19 11:19 AM, Andreas Beckmann wrote:
> Hi Herbert,
> 
> thanks for your work on porting piuparts to Python 3!
> I think this is something that we should aim for early in the bullseye
> release cycle.
> 
> Since the diff is already quite large, is it possible factor out some
> parts that are also applicable to the current Python 2 codebase?
> I'm thinking of things like
>   print 'foo'  =>   print('bar')
>   import foo from bar
> and possibly more.
> That would make the final python3 switch much more painless to review.

Good!

> 
> There is also a lot of whitespace changes, I think most of them could be
> factored out to a subsequent whitespace-only cleanup commit (and some
> could probably be applied to the current Python 2 code already).
> 

Ok.

> You seemed to have found (and commented) some redundant bits of code -
> perhaps we could just remove these bits in a starting cleanup commit.
> 
> 
> Andreas
> 
> PS: @Holger: IMO switching to python3 would warrant a major version
> increment :-)
> 

I am worry with dicts a little bit. I just did a build with
0.96 from apt and one build with my PR. Clean the log files
with sed (time at the beginning of the line, /tmp/tmp*).

I am not saying to complete trust this. But there is no
+/- at the beginning of the lines with DEBUG. I think it is
good.

I will do a PR with 'print()' and piuparts imports only.
No super(), no changes for UserDict. Can go to Python 2.

Then a PR for dicts, python import with new path, super(), 
subprocess.Popen with enconding. 

I think that's it. Can not split more.



Regards,
Herbert




More information about the Piuparts-devel mailing list