Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch: Python 3.x support #10

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

Patch: Python 3.x support #10

GoogleCodeExporter opened this issue Apr 18, 2015 · 7 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

Result of previous patch manually adapted to r196

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

Attachments:

@GoogleCodeExporter
Copy link
Author

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

@jvican
Copy link

jvican commented Jan 14, 2016

Is this usable at all? Thanks.

@techtonik
Copy link
Owner

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

@techtonik
Copy link
Owner

Created new issue to track from scratch.

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

No branches or pull requests

3 participants