bpo-43785: Improve BZ2File performance by methane · Pull Request #25299 · python/cpython

added 2 commits

April 9, 2021 14:47
* Remove `RLock` from `BZ2File`. It makes `BZ2File` to thread unsafe, but
  gzip and lzma don't use it too.
* Added `BZ2File.__iter__()` method which delegate to
  `self._buffer.__iter__()`. It is much faster than calling
  `BZ2File.readline()` for each lines.