From 33de56236fa0e0a0d1bf620758cae310f4750368 Mon Sep 17 00:00:00 2001 From: Leon Anavi Date: Wed, 5 Mar 2025 15:34:11 +0200 Subject: python3-mock: Upgrade 5.1.0 -> 5.2.0 Upgrade to release 5.2.0: - :func:`unittest.mock.Mock.attach_mock` no longer triggers a call to a PropertyMock being attached. - Improved documentation for :func:`unittest.mock.patch.dict` - Add support for :func:`dataclasses.dataclass` in :func:`unittest.mock.create_autospec`. Now create_autospec will check for potential dataclasses and use :func:`dataclasses.fields` function to retrieve the spec information. - Fix :class:`unittest.mock.MagicMock` reseting magic methods return values after .reset_mock(return_value=True) was called. - Fixed :func:`unittest.mock.create_autospec` to configure parent mock with keyword arguments. - Indicate if there were no actual calls in unittest :meth:`~unittest.mock.Mock.assert_has_calls` failure. - Deprecate :func:`!asyncio.iscoroutinefunction` in favor of :func:`inspect.iscoroutinefunction`. - Limit starting a patcher (from :func:`unittest.mock.patch` or :func:`unittest.mock.patch.object`) more than once without stopping it - Fixed :func:`unittest.mock.create_autospec` to pass the call through to the wrapped object to return the real result. - Fix :func:`unittest.mock.patch` to not read attributes of the target when new_callable is set. Patch by Robert Collins. - Fix import of :mod:`unittest.mock` when CPython is built without docstrings. - Fix name passing to :class:`unittest.mock.Mock` object when using :func:`unittest.mock.create_autospec`. Signed-off-by: Leon Anavi Signed-off-by: Khem Raj --- .../recipes-devtools/python/python3-mock_5.1.0.bb | 19 ------------------- .../recipes-devtools/python/python3-mock_5.2.0.bb | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 19 deletions(-) delete mode 100644 meta-python/recipes-devtools/python/python3-mock_5.1.0.bb create mode 100644 meta-python/recipes-devtools/python/python3-mock_5.2.0.bb (limited to 'meta-python') diff --git a/meta-python/recipes-devtools/python/python3-mock_5.1.0.bb b/meta-python/recipes-devtools/python/python3-mock_5.1.0.bb deleted file mode 100644 index 1b89260e1b..0000000000 --- a/meta-python/recipes-devtools/python/python3-mock_5.1.0.bb +++ /dev/null @@ -1,19 +0,0 @@ -DESCRIPTION = "A Python Mocking and Patching Library for Testing" -HOMEPAGE = "https://pypi.python.org/pypi/mock" -SECTION = "devel/python" -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=de9dfbf780446b18aab11f00baaf5b7e" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += " \ - python3-cmd2 \ - python3-mccabe \ - python3-pep8 \ - python3-prettytable \ - python3-pyflakes \ - python3-pyparsing \ - python3-unittest \ -" - -SRC_URI[sha256sum] = "5e96aad5ccda4718e0a229ed94b2024df75cc2d55575ba5762d31f5767b8767d" diff --git a/meta-python/recipes-devtools/python/python3-mock_5.2.0.bb b/meta-python/recipes-devtools/python/python3-mock_5.2.0.bb new file mode 100644 index 0000000000..0861518d4b --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-mock_5.2.0.bb @@ -0,0 +1,19 @@ +DESCRIPTION = "A Python Mocking and Patching Library for Testing" +HOMEPAGE = "https://pypi.python.org/pypi/mock" +SECTION = "devel/python" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=de9dfbf780446b18aab11f00baaf5b7e" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += " \ + python3-cmd2 \ + python3-mccabe \ + python3-pep8 \ + python3-prettytable \ + python3-pyflakes \ + python3-pyparsing \ + python3-unittest \ +" + +SRC_URI[sha256sum] = "4e460e818629b4b173f32d08bf30d3af8123afbb8e04bb5707a1fd4799e503f0" -- cgit v1.2.3-54-g00ecf