Skip to content

make BZ2File and LZMAFile instantiable - #2115

Merged
gvanrossum merged 2 commits into
python:masterfrom
JelleZijlstra:bz2file
Jun 11, 2018
Merged

gvanrossum merged 2 commits into
python:masterfrom
JelleZijlstra:bz2file

Conversation

@JelleZijlstra

Copy link
Copy Markdown
Member

Part of #1476.

Comment thread stdlib/2and3/bz2.pyi
newline: Optional[str] = ...) -> IO[Any]: ...

class BZ2File(BinaryIO):
class BZ2File(io.BufferedIOBase, IO[bytes]): # type: ignore # python/mypy#5027

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

At runtime it inherits from _compression.BaseStream, which is a subclass of BufferedIOBase that adds some private methods.

@JelleZijlstra JelleZijlstra changed the title make BZ2File instantiable make BZ2File and LZMAFile instantiable May 15, 2018
@JelleZijlstra

Copy link
Copy Markdown
Member Author

Added lzma.LZMAFile to this PR because it requires basically the same change.

@gvanrossum
gvanrossum merged commit a33a124 into python:master Jun 11, 2018
yedpodtrzitko pushed a commit to yedpodtrzitko/typeshed that referenced this pull request Jan 23, 2019
@JelleZijlstra
JelleZijlstra deleted the bz2file branch May 30, 2020 05:08
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.

2 participants