diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 3fa5887e..6e8b6973 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,3 +1,20 @@ +5.1.0 +----- + +- bpo-44185: :func:`unittest.mock.mock_open` will call the :func:`close` + method of the file handle mock when it is exiting from the context + manager. Patch by Samet Yaslan. + +- gh-94924: :func:`unittest.mock.create_autospec` now properly returns + coroutine functions compatible with :func:`inspect.iscoroutinefunction` + +- bpo-17013: Add ``ThreadingMock`` to :mod:`unittest.mock` that can be used + to create Mock objects that can wait until they are called. Patch by + Karthikeyan Singaravelan and Mario Corchero. + +- bpo-41768: :mod:`unittest.mock` speccing no longer calls class properties. + Patch by Melanie Witt. + 5.0.2 ----- diff --git a/NEWS.d/2019-09-13-13-28-10.bpo-17013.NWcgE3.rst b/NEWS.d/2019-09-13-13-28-10.bpo-17013.NWcgE3.rst deleted file mode 100644 index ac746c45..00000000 --- a/NEWS.d/2019-09-13-13-28-10.bpo-17013.NWcgE3.rst +++ /dev/null @@ -1,3 +0,0 @@ -Add ``ThreadingMock`` to :mod:`unittest.mock` that can be used to create -Mock objects that can wait until they are called. Patch by Karthikeyan -Singaravelan and Mario Corchero. diff --git a/NEWS.d/2020-09-16-16-53-06.bpo-41768.8_fWkC.rst b/NEWS.d/2020-09-16-16-53-06.bpo-41768.8_fWkC.rst deleted file mode 100644 index bfd3a294..00000000 --- a/NEWS.d/2020-09-16-16-53-06.bpo-41768.8_fWkC.rst +++ /dev/null @@ -1,2 +0,0 @@ -:mod:`unittest.mock` speccing no longer calls class properties. -Patch by Melanie Witt. diff --git a/NEWS.d/2021-06-24-20-45-03.bpo-44185.ZHb8yJ.rst b/NEWS.d/2021-06-24-20-45-03.bpo-44185.ZHb8yJ.rst deleted file mode 100644 index 056ab8d9..00000000 --- a/NEWS.d/2021-06-24-20-45-03.bpo-44185.ZHb8yJ.rst +++ /dev/null @@ -1,3 +0,0 @@ -:func:`unittest.mock.mock_open` will call the :func:`close` method of the file -handle mock when it is exiting from the context manager. -Patch by Samet Yaslan. diff --git a/NEWS.d/2022-07-18-14-20-56.gh-issue-94924.X0buz2.rst b/NEWS.d/2022-07-18-14-20-56.gh-issue-94924.X0buz2.rst deleted file mode 100644 index 7882f224..00000000 --- a/NEWS.d/2022-07-18-14-20-56.gh-issue-94924.X0buz2.rst +++ /dev/null @@ -1 +0,0 @@ -:func:`unittest.mock.create_autospec` now properly returns coroutine functions compatible with :func:`inspect.iscoroutinefunction` diff --git a/mock/__init__.py b/mock/__init__.py index 85abb93e..9c4e2d01 100644 --- a/mock/__init__.py +++ b/mock/__init__.py @@ -7,7 +7,7 @@ import mock.mock as _mock from mock.mock import * -__version__ = '5.0.2' +__version__ = '5.1.0' version_info = tuple(int(p) for p in re.match(r'(\d+).(\d+).(\d+)', __version__).groups())