-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
bpo-33361: Fix bug with seeking in StreamRecoders #8278
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
Conversation
Lib/codecs.py
Outdated
@@ -847,6 +847,12 @@ def reset(self): | |||
self.reader.reset() | |||
self.writer.reset() | |||
|
|||
def seek(self, offset, whence=0): | |||
# Seeks must be propogated to both the readers and writers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nitpick but there is a typo in the comment ("propogated" -> "propagated")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the patch :)
Thanks @ammaraskar for the PR, and @berkerpeksag for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7. |
Thanks! |
(cherry picked from commit a6ec1ce) Co-authored-by: Ammar Askar <ammar_askar@hotmail.com>
GH-13708 is a backport of this pull request to the 3.7 branch. |
The test is a basic example from the bpo ticket, more can be added if necessary.
https://bugs.python.org/issue33361