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

Conversation

@vstinner
Copy link
Member

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 vstinner force-pushed the vstinner:bz2_buffering branch from 0195635 to ed8d695 Jan 16, 2020
@vstinner

This comment has been minimized.

Copy link
Member Author

vstinner commented Jan 16, 2020

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

@vstinner

This comment has been minimized.

Copy link
Member Author

vstinner commented Jan 16, 2020

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
9 checks passed
9 checks passed
Docs
Details
Windows (x86)
Details
Windows (x64)
Details
macOS
Details
Ubuntu
Details
Azure Pipelines PR #20200116.32 succeeded
Details
bedevere/issue-number Issue number 39357 found
Details
bedevere/news News entry found in Misc/NEWS.d
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@vstinner vstinner deleted the vstinner:bz2_buffering branch Jan 16, 2020
@vstinner

This comment has been minimized.

Copy link
Member Author

vstinner commented Jan 16, 2020

@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.

petdance added a commit to petdance/cpython that referenced this pull request Jan 17, 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.
petdance added a commit to petdance/cpython that referenced this pull request Jan 17, 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.
petdance added a commit to petdance/cpython that referenced this pull request Jan 17, 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
Projects
None yet
4 participants
You can’t perform that action at this time.