bpo-32299: unittest.mock.patch.dict now returns patched dict when used as context manager by ts-taiye · Pull Request #4834 · python/cpython (original) (raw)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be moved after the paragraph that starts with ":func:`patch.dict` can be used as a context manager, [...]".
Also, add a versionchanged marker after that paragraph:
.. versionchanged:: 3.7
:func:patch.dict
now returns the patched dictionary when it used as a context manager.
(Feel free to use any wording you want, I just gave an example.)