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

Don't reassign crc on ChunkStream close #6627

Merged
merged 2 commits into from Oct 13, 2022
Merged

Conversation

radarhere
Copy link
Member

@radarhere radarhere commented Sep 30, 2022

Cherry-picking a commit from #2941

class ChunkStream:
def __init__(self, fp):
self.fp = fp
self.queue = []

def close(self):
self.queue = self.crc = self.fp = None

Ok, so when it is closing, it sets fp and queue to None, fair enough. What is crc?

def crc(self, cid, data):

...it's a method? I don't see why this should be set to None.

#2935 shows that it used to be sometimes set to crc_skip, but that still doesn't explain it to me.

Looking at that PR, I conclude that

def crc_skip(self, cid, data):
"""Read checksum. Used if the C module is not present"""

is no longer correct, so I've also removed the second sentence in that docstring.

@radarhere radarhere changed the title Don't reassign crc on close Don't reassign crc on ChunkStream close Sep 30, 2022
@hugovk hugovk merged commit d138b2d into python-pillow:main Oct 13, 2022
@radarhere radarhere deleted the crc branch October 13, 2022 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants