Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-43651: Fix EncodingWarning in test_file and test_file_eintr#25109

Merged
methane merged 2 commits into
python:masterpython/cpython:masterfrom
methane:fix-ew-test_filemethane/cpython:fix-ew-test_fileCopy head branch name to clipboard
Apr 1, 2021
Merged

bpo-43651: Fix EncodingWarning in test_file and test_file_eintr#25109
methane merged 2 commits into
python:masterpython/cpython:masterfrom
methane:fix-ew-test_filemethane/cpython:fix-ew-test_fileCopy head branch name to clipboard

Conversation

@methane

@methane methane commented Mar 31, 2021

Copy link
Copy Markdown
Member

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I like the UTF-8 encoding :-) The "t" mode is ignored. I even propose to omit mode="r" since it's the default value, and I like to simply write open(filename) usually. Or now open(filename, encoding="utf-8").

Comment thread Lib/test/test_file_eintr.py Outdated
Comment thread Lib/test/test_file.py Outdated
Co-authored-by: Victor Stinner <vstinner@python.org>

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.