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

bpo-39357: Remove buffering parameter of bz2.BZ2File #18028

Merged
merged 1 commit into from
Jan 16, 2020
Merged

bpo-39357: Remove buffering parameter of bz2.BZ2File #18028

merged 1 commit into from
Jan 16, 2020

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

Lib/bz2.py Outdated Show resolved Hide resolved
Doc/library/bz2.rst Outdated Show resolved Hide resolved
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