◐ Shell
clean mode source ↗

Message 390796 - Python tracker

I'm not worried about compatibility on this for 3.10.  Nobody realistically expects to be able to have multiple readers from a single BZ2File stream.  They don't for the gzip or lzma equivalents.  That isn't even a normal thing to do on an actual file.  Lets go forward with this for 3.10betas and see if anyone even notices.  I doubt they will.

But the addition of __iter__ deferring to iter(self._buffer) belongs in its own PR and issue and should be done for all of bz2, gzip, and lzma all at once.

I've edited the PR branch to remove __iter__ and cleanup a couple of minor nits.