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

make iterator python3 compatible #1007

Open
wants to merge 1 commit into
base: master
from

Conversation

@grubberr
Copy link

@grubberr grubberr commented Apr 21, 2020

No description provided.

Serhii Chvaliuk
Copy link
Member

@Byron Byron left a comment

Thanks a lot for your contribution. I have a left a comment to see if this could be a non-breaking change for safety reasons. GitPython seems to be used by 15.4k projects, and there might be one of them who used next() directly.

Thanks for your consideration.

@@ -498,7 +498,7 @@ def readlines(self, size=-1):
def __iter__(self):
return self

def next(self):
def __next__(self):

This comment has been minimized.

@Byron

Byron Apr 22, 2020
Member

Would this be a breaking change if people used next directly?

I am wondering if the old method name should be retained for safety, like so:

        def next(self):
              return self.__next__()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.