Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Jan 16, 2020

Remove the buffering parameter of bz2.BZ2File. Since Python 3.0, it
was ignored and using it was emitting a DeprecationWarning. Pass an
open file object to control how the file is opened.

https://bugs.python.org/issue39357

Remove the buffering parameter of bz2.BZ2File. Since Python 3.0, it
was ignored and using it was emitting a DeprecationWarning. Pass an
open file object to control how the file is opened.

The compresslevel parameter becomes keyword-only.
@vstinner
Copy link
Member Author

@serhiy-storchaka: I updated my PR, would you mind to review it again? I converted compresslevel parameter to a keyword-only.

@vstinner
Copy link
Member Author

Oh, I didn't notice that you already approved it :-) I rebased and squashed commits after your approved my PR, but it's the same code. I also did that to update the commit message ;-) So I understand that you approved the PR. Thanks! I will merge it once the CI tests pass.

@vstinner vstinner merged commit 9baf242 into python:master Jan 16, 2020
@vstinner vstinner deleted the bz2_buffering branch January 16, 2020 14:33
@vstinner
Copy link
Member Author

@serhiy-storchaka: Thanks again for the review, I didn't spot that the positional argument order changed! It's a nice idea to convert compresslevel to a keyword-only parameter.

shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Jan 31, 2020
Remove the buffering parameter of bz2.BZ2File. Since Python 3.0, it
was ignored and using it was emitting a DeprecationWarning. Pass an
open file object to control how the file is opened.

The compresslevel parameter becomes keyword-only.
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.

4 participants