Patch: Python 3.x support #10

Closed
GoogleCodeExporter opened this Issue Apr 18, 2015 · 7 comments

Comments

Projects
None yet
3 participants
@GoogleCodeExporter
Hiho..  I wanted to use this as a library in a Python 3.x application, so I 
went ahead and made the necessary modifications to make it run under both 2.x 
and 3.x (patch is attached)

It passes all the provided tests, and works nicely for my project with the 
patch applied, but I do note that one of the things I had to fiddle with a bit 
is the different way that file IO is handled (particularly with respect to 
newlines) in Py3.  I think the changes I made should result in similar behavior 
in both versions, but I haven't done really extensive testing...

Original issue reported on code.google.com by foogod@gmail.com on 28 Aug 2010 at 2:20

Attachments:

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Apr 18, 2015

Thanks for the contribution. It is good to know that python-patch is used in 
real projects. Feel free to submit a link when your project is released for a 
list of adoptions.

As for the patch - it looks good, but porting myself to Python 3 is on TODO 
list, so I am not yet ready to estimate the impact. Test suite unfortunately 
doesn't cover all use cases - only the major ones, so I can't safely accept 
them as enough for commit.

Right now my focus is on improving parser to be more extensible and staying to 
be non-recursive at the same time. This will allow to parse Git and HG patches, 
but also may change some essential things, so until this work is finished I'd 
refrain from porting things to Python 3k. But Py3k will happen sooner or later 
for sure, so your effort won't go unnoticed.

Original comment by techtonik@gmail.com on 28 Aug 2010 at 10:43

  • Changed state: Accepted
Thanks for the contribution. It is good to know that python-patch is used in 
real projects. Feel free to submit a link when your project is released for a 
list of adoptions.

As for the patch - it looks good, but porting myself to Python 3 is on TODO 
list, so I am not yet ready to estimate the impact. Test suite unfortunately 
doesn't cover all use cases - only the major ones, so I can't safely accept 
them as enough for commit.

Right now my focus is on improving parser to be more extensible and staying to 
be non-recursive at the same time. This will allow to parse Git and HG patches, 
but also may change some essential things, so until this work is finished I'd 
refrain from porting things to Python 3k. But Py3k will happen sooner or later 
for sure, so your effort won't go unnoticed.

Original comment by techtonik@gmail.com on 28 Aug 2010 at 10:43

  • Changed state: Accepted
@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Apr 18, 2015

Here's an updated version of the patch: 
http://p.sipsolutions.net/ab76e67a1d847572.txt

I didn't do the test stuff though because I don't even use that :)

Original comment by Berg...@gmail.com on 4 Jun 2013 at 12:23

Here's an updated version of the patch: 
http://p.sipsolutions.net/ab76e67a1d847572.txt

I didn't do the test stuff though because I don't even use that :)

Original comment by Berg...@gmail.com on 4 Jun 2013 at 12:23

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Apr 18, 2015

Result of previous patch manually adapted to r196

Original comment by alt...@gmail.com on 25 Jun 2013 at 9:02

Attachments:

Result of previous patch manually adapted to r196

Original comment by alt...@gmail.com on 25 Jun 2013 at 9:02

Attachments:

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Apr 18, 2015

Thanks for the patch. String unicoding features of Python 3 are killing me, but 
it certainly becomes easier to understand what works and what's not with this 
patch. No promises when I integrate it yet. I am afraid the API isn't ready, so 
to avoid breaking things in one version, then in another, I need to build up 
the motivation to cover change with tests.

Original comment by techtonik@gmail.com on 25 Jun 2013 at 3:31

  • Added labels: P1, Type-Feature
  • Removed labels: Priority-Medium, Type-Defect
Thanks for the patch. String unicoding features of Python 3 are killing me, but 
it certainly becomes easier to understand what works and what's not with this 
patch. No promises when I integrate it yet. I am afraid the API isn't ready, so 
to avoid breaking things in one version, then in another, I need to build up 
the motivation to cover change with tests.

Original comment by techtonik@gmail.com on 25 Jun 2013 at 3:31

  • Added labels: P1, Type-Feature
  • Removed labels: Priority-Medium, Type-Defect

@jonsedar jonsedar referenced this issue in conda/conda-build Aug 4, 2015

Closed

Patch is not available for Python 3 on Windows #498

@jvican

This comment has been minimized.

Show comment
Hide comment
@jvican

jvican Jan 14, 2016

Is this usable at all? Thanks.

jvican commented Jan 14, 2016

Is this usable at all? Thanks.

@techtonik

This comment has been minimized.

Show comment
Hide comment
@techtonik

techtonik Jan 17, 2016

Owner

No, unfortunately I run out of cash and have to spend my time on other activities.

Owner

techtonik commented Jan 17, 2016

No, unfortunately I run out of cash and have to spend my time on other activities.

@techtonik

This comment has been minimized.

Show comment
Hide comment
@techtonik

techtonik Jan 17, 2016

Owner

Created new issue to track from scratch.

Owner

techtonik commented Jan 17, 2016

Created new issue to track from scratch.

@techtonik techtonik closed this Jan 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment