[issue33722] Document builtins in mock_open

2019-04-11 Thread Jay Crotts
Change by Jay Crotts : -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue33722] Document builtins in mock_open

2019-04-10 Thread Jay Crotts
Jay Crotts added the comment: No worries, I think all of your points make sense, especially number one after looking at the patch again. I looked at the docs again, and there is even an example of another built in being patched. Thanks for taking the time to review it. I'm okay with

[issue33722] Document builtins in mock_open

2019-04-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: After looking at the context of the patch and thinking more about whether the patch is a good idea, I am reversing what I said before and think that this issue and the new patch (sorry) should be closed. 1. The new example duplicates the current example.

[issue33722] Document builtins in mock_open

2019-04-10 Thread Jay Crotts
Change by Jay Crotts : -- pull_requests: +12700 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33722] Document builtins in mock_open

2019-04-10 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: The example looks like a good addition to me since mocking builtins.open is not documented for this use case. Please start a new PR. -- nosy: +xtreak ___ Python tracker

[issue33722] Document builtins in mock_open

2019-04-10 Thread Jay Crotts
Jay Crotts added the comment: Yeah the PR had been stale for a while, and I re-based my fork without closing the PR, so when I pushed it to the fork it updated the PR reviewer list. Silly mistake by me, I should have made sure the diff wasn't huge before pushing it. I know review time is

[issue33722] Document builtins in mock_open

2019-04-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: My *guess* is that you created the branch for PR 7491 when your local master branch was months out of date. Or you branched off of the 3.7 branch. Whatever, your patch proposed to revert recent changes to master, touching about 1000 files. When you

[issue33722] Document builtins in mock_open

2018-06-07 Thread Jay Crotts
Change by Jay Crotts : -- keywords: +patch pull_requests: +7116 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue33722] Document builtins in mock_open

2018-05-31 Thread Jay Crotts
New submission from Jay Crotts : The examples on using mock_open only include instances where objects are mocked in the REPL, so '__main__'.open is replaced. Commonly objects are mocked for use in other test modules, so builtins.open would be used instead. A note about this in the