qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Python3 support for patches
@ 2019-09-13 19:32 John Snow
  2019-09-13 21:21 ` John Snow
  0 siblings, 1 reply; 4+ messages in thread
From: John Snow @ 2019-09-13 19:32 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi

Hi,

I quite like the patches tool; but python2 is notably doomed.

I tried my hand at polishing it up for python3 and pushed the results
here: https://github.com/jnsnow/patches/tree/python3

I didn't faff around with trying to add simultaneous support: this is a
direct conversion in one big chunk. I used 2to3 and supplemented with
pylint and flake8 to find problem spots.

I don't use all of the features of this tool, but maybe if you'd like to
give this a try you can test this branch and let me know if I missed any
spots.

You can install patches 0.3.1 using the standard incantations:
> python3 setup.py install --user

If it's too broken, you can uninstall it later with:
> pip3 uninstall patches

You may need to check back to the master branch and force a
reinstallation of the python2 version to get the bin back in your PATH:

> git checkout master
> python2 setup.py install --user


Happy python2 doomsday,
--js


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

* Re: [Qemu-devel] Python3 support for patches
  2019-09-13 19:32 [Qemu-devel] Python3 support for patches John Snow
@ 2019-09-13 21:21 ` John Snow
  2019-09-17 16:00   ` Stefan Hajnoczi
  0 siblings, 1 reply; 4+ messages in thread
From: John Snow @ 2019-09-13 21:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi



On 9/13/19 3:32 PM, John Snow wrote:
> Hi,
> 
> I quite like the patches tool; but python2 is notably doomed.
> 
> I tried my hand at polishing it up for python3 and pushed the results
> here: https://github.com/jnsnow/patches/tree/python3
> 
> I didn't faff around with trying to add simultaneous support: this is a
> direct conversion in one big chunk. I used 2to3 and supplemented with
> pylint and flake8 to find problem spots.
> 
> I don't use all of the features of this tool, but maybe if you'd like to
> give this a try you can test this branch and let me know if I missed any
> spots.
> 
> You can install patches 0.3.1 using the standard incantations:
>> python3 setup.py install --user
> 
> If it's too broken, you can uninstall it later with:
>> pip3 uninstall patches
> 
> You may need to check back to the master branch and force a
> reinstallation of the python2 version to get the bin back in your PATH:
> 
>> git checkout master
>> python2 setup.py install --user
> 
> 
> Happy python2 doomsday,
> --js
> 

Ah, this was definitely premature. I had a dream last night that this
was working just fine, but in the harsh, unforgiving sunlight, there are
still a few problems.

Needs a few more minutes in the oven.

--js


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

* Re: [Qemu-devel] Python3 support for patches
  2019-09-13 21:21 ` John Snow
@ 2019-09-17 16:00   ` Stefan Hajnoczi
  2019-09-17 17:43     ` John Snow
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Hajnoczi @ 2019-09-17 16:00 UTC (permalink / raw)
  To: John Snow; +Cc: Peter Maydell, qemu-devel, Stefan Hajnoczi

[-- Attachment #1: Type: text/plain, Size: 1589 bytes --]

On Fri, Sep 13, 2019 at 05:21:37PM -0400, John Snow wrote:
> On 9/13/19 3:32 PM, John Snow wrote:
> > Hi,
> > 
> > I quite like the patches tool; but python2 is notably doomed.
> > 
> > I tried my hand at polishing it up for python3 and pushed the results
> > here: https://github.com/jnsnow/patches/tree/python3
> > 
> > I didn't faff around with trying to add simultaneous support: this is a
> > direct conversion in one big chunk. I used 2to3 and supplemented with
> > pylint and flake8 to find problem spots.
> > 
> > I don't use all of the features of this tool, but maybe if you'd like to
> > give this a try you can test this branch and let me know if I missed any
> > spots.
> > 
> > You can install patches 0.3.1 using the standard incantations:
> >> python3 setup.py install --user
> > 
> > If it's too broken, you can uninstall it later with:
> >> pip3 uninstall patches
> > 
> > You may need to check back to the master branch and force a
> > reinstallation of the python2 version to get the bin back in your PATH:
> > 
> >> git checkout master
> >> python2 setup.py install --user
> > 
> > 
> > Happy python2 doomsday,
> > --js
> > 
> 
> Ah, this was definitely premature. I had a dream last night that this
> was working just fine, but in the harsh, unforgiving sunlight, there are
> still a few problems.
> 
> Needs a few more minutes in the oven.

Okay, please let me know when it's working.

I'm currently working towards migrating to Python 3 in all areas of my
life but the patches tool is further down the list :).

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [Qemu-devel] Python3 support for patches
  2019-09-17 16:00   ` Stefan Hajnoczi
@ 2019-09-17 17:43     ` John Snow
  0 siblings, 0 replies; 4+ messages in thread
From: John Snow @ 2019-09-17 17:43 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: Peter Maydell, qemu-devel, Stefan Hajnoczi



On 9/17/19 12:00 PM, Stefan Hajnoczi wrote:
> On Fri, Sep 13, 2019 at 05:21:37PM -0400, John Snow wrote:
>> On 9/13/19 3:32 PM, John Snow wrote:
>>> Hi,
>>>
>>> I quite like the patches tool; but python2 is notably doomed.
>>>
>>> I tried my hand at polishing it up for python3 and pushed the results
>>> here: https://github.com/jnsnow/patches/tree/python3
>>>
>>> I didn't faff around with trying to add simultaneous support: this is a
>>> direct conversion in one big chunk. I used 2to3 and supplemented with
>>> pylint and flake8 to find problem spots.
>>>
>>> I don't use all of the features of this tool, but maybe if you'd like to
>>> give this a try you can test this branch and let me know if I missed any
>>> spots.
>>>
>>> You can install patches 0.3.1 using the standard incantations:
>>>> python3 setup.py install --user
>>>
>>> If it's too broken, you can uninstall it later with:
>>>> pip3 uninstall patches
>>>
>>> You may need to check back to the master branch and force a
>>> reinstallation of the python2 version to get the bin back in your PATH:
>>>
>>>> git checkout master
>>>> python2 setup.py install --user
>>>
>>>
>>> Happy python2 doomsday,
>>> --js
>>>
>>
>> Ah, this was definitely premature. I had a dream last night that this
>> was working just fine, but in the harsh, unforgiving sunlight, there are
>> still a few problems.
>>
>> Needs a few more minutes in the oven.
> 
> Okay, please let me know when it's working.
> 
> I'm currently working towards migrating to Python 3 in all areas of my
> life but the patches tool is further down the list :).
> 
> Stefan
> 

I did a couple of hotfixes and I have been using it on my machine (along
with support for stgit) happily since then, but I'll probably spend a
few more minutes with it this Friday and try to do some more tests with it.

--js


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

end of thread, other threads:[~2019-09-17 17:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-13 19:32 [Qemu-devel] Python3 support for patches John Snow
2019-09-13 21:21 ` John Snow
2019-09-17 16:00   ` Stefan Hajnoczi
2019-09-17 17:43     ` John Snow

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).