Skip to content

Fix bpo-30526: Add TextIOWrapper.reconfigure()#1922

Merged
pitrou merged 4 commits intopython:masterfrom
pitrou:reconfigure_textiowrapper
Jun 3, 2017
Merged

Fix bpo-30526: Add TextIOWrapper.reconfigure()#1922
pitrou merged 4 commits intopython:masterfrom
pitrou:reconfigure_textiowrapper

Conversation

@pitrou
Copy link
Copy Markdown
Member

@pitrou pitrou commented Jun 2, 2017

No description provided.

@mention-bot
Copy link
Copy Markdown

@pitrou, thanks for your PR! By analyzing the history of the files in this pull request, we identified @benjaminp, @serhiy-storchaka and @birkenfeld to be potential reviewers.

@pitrou
Copy link
Copy Markdown
Member Author

pitrou commented Jun 2, 2017

@ncoghlan

Copy link
Copy Markdown
Contributor

@ncoghlan ncoghlan left a comment

Choose a reason for hiding this comment

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

The actual change mostly looks good to me (just one comment on the specifics of the docs wording).

The commit message should make sure to explain that this doesn't just cover adding reconfigure, it also adds a read-only property to read back the write_through status that was set in either the constructor or the last call to reconfigure().

Comment thread Doc/library/io.rst Outdated

Reconfigure this text stream using new values for *line_buffering*
and *write_through*. Any ``None`` value will keep the current
value.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Rather than using value 3 times, this may be clearer with a mix of setting and argument:

Reconfigure this text stream using new settings for line_buffering and write_through. Passing None as an argument will retain the current setting for that parameter.

That's just a suggestion though, I don't think it's a blocker for merging the patch.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That's a good suggestion Nick, thank you.

@pitrou pitrou merged commit 3c2817b into python:master Jun 3, 2017
@pitrou pitrou deleted the reconfigure_textiowrapper branch June 3, 2017 10:32
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