Repository navigation
Open binary no encoding - #665
Merged
Merged
Conversation
Contributor
Author
|
When I did my local due diligence to pre-check that the CI checks will all pass, I got a mypy error: I'm pretty sure this is not related to the changeset under consideration. It might have something to do with issue #542. |
mrbean-bremen
approved these changes
Feb 3, 2022
mrbean-bremen
left a comment
Member
There was a problem hiding this comment.
Thanks, this looks good! Can you add an entry to the release notes (CHANGES.md)?
On open() binary mode should not allow an encoding argument.
If encoding is passed with binary mode, raise:
ValueError(binary mode doesn\'t take an encoding argument)
Closes pytest-dev#664.
yaythomas
force-pushed
the
binary-no-encoding
branch
from
February 3, 2022 19:50
c262529 to
53a8720
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On open() binary mode should not allow an
encodingargument. See #664.If encoding is passed with binary mode, raise:
ValueError(binary mode doesn't take an encoding argument)Add unit test helper to check the open() constructor call. Test for both binary and text mode with encoding, where binary fails and text passes.