Skip to content

make iterator python3 compatible #1007

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

Closed
wants to merge 1 commit into from

Conversation

grubberr
Copy link

No description provided.

Copy link
Member

@Byron Byron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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__()

@Byron
Copy link
Member

Byron commented Jan 6, 2021

As part of spring cleaning, I am closing this PR as it was opened more than half a year ago while still being open due to unresolved or remarks.

If this is a mistake or any other action should rather be taken, please let me know in the comments or create a new PR.
Thanks for your understanding and the work that undoubtedly went into this.

@Byron Byron closed this Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants