Created attachment 234776 [details] patch
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=5170dca9beed71f62288f39c51ef8deabb0157c9 commit 5170dca9beed71f62288f39c51ef8deabb0157c9 Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2022-06-19 08:36:37 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2022-06-19 10:01:27 +0000 devel/py-pytest-randomly: Update 3.5.0 -> 3.12.0 PR: 264762 Approved by: swills (maintainer's timeout; 19 days) devel/py-pytest-randomly/Makefile | 2 +- devel/py-pytest-randomly/distinfo | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
(In reply to commit-hook from comment #1) Sorry, the above commit was for the unrelated bug report, is here by mistake.
Created attachment 235347 [details] py-pytest-mock-3.8.2.patch Update to 3.8.2 fix: test suite
Created attachment 239180 [details] py-pytest-mock-3.10.0.patch Updaet to 3.10.0 3.10.0 (2022-10-05) Added new mocker.stop(m) method to stop specific mocker.patch or mocker.spy calls (#319). 3.9.0 (2022-09-28) Expose NonCallableMagicMock via the mocker fixture (#318). 3.8.2 (2022-07-05) Fixed AsyncMock support for Python 3.7+ in mocker.async_stub (#302). 3.8.1 (2022-06-24) Fixed regression caused by an explicit mock dependency in the code (#298). 3.8.0 (2022-06-24) Add MockerFixture.async_mock method. Thanks @PerchunPak for the PR (#296). 3.7.0 (2022-01-28) Python 3.10 now officially supported. Dropped support for Python 3.6. 3.6.1 (2021-05-06) Fix mocker.resetall() when using mocker.spy() (#237). Thanks @blaxter for the report and @shadycuz for the PR. 3.6.0 (2021-04-24) pytest-mock no longer supports Python 3.5. Correct type annotations for mocker.patch.object to also include the string form. Thanks @plannigan for the PR (#235). reset_all now supports return_value and side_effect keyword arguments. Thanks @alex-marty for the PR (#214). 3.5.1 (2021-01-10) Use inspect.getattr_static instead of resorting to object.__getattribute__ magic. This should better comply with objects which implement a custom descriptor protocol. Thanks @yesthesoup for the PR (#224). 3.5.0 (2021-01-04) Now all patch functions will emit a warning instead of raising a ValueError when used as a context-manager. Thanks @iforapsy for the PR (#221). Additionally, mocker.patch.context_manager is available when the user intends to mock a context manager (for example threading.Lock object), which will not emit that warning. 3.4.0 (2020-12-15) Add mock.seal alias to the mocker fixture (#211). Thanks @coiax for the PR. Fixed spying on exceptions not covered by the Exception superclass (#215), like KeyboardInterrupt -- PR #216 by @webknjaz. Before the fix, both spy_return and spy_exception were always assigned to None whenever such an exception happened. And after this fix, spy_exception is set to a correct value of an exception that has actually happened. 3.3.1 (2020-08-24) Introduce MockFixture as an alias to MockerFixture. Before 3.3.0, the fixture class was named MockFixture, but was renamed to MockerFixture to better match the mocker fixture. While not officially part of the API, it was later discovered that this broke the code of some users which already imported pytest_mock.MockFixture for type annotations, so we decided to reintroduce the name as an alias. Note however that this is just a stop gap measure, and new code should use MockerFixture for type annotations. Improved typing for MockerFixture.patch (#201). Thanks @srittau for the PR. 3.3.0 (2020-08-21) pytest-mock now includes inline type annotations and exposes them to user programs. The mocker fixture returns pytest_mock.MockerFixture, which can be used to annotate your tests: from pytest_mock import MockerFixture def test_foo(mocker: MockerFixture) -> None: ... The type annotations were developed against mypy version 0.782, the minimum version supported at the moment. If you run into an error that you believe to be incorrect, please open an issue. Many thanks to @staticdev for providing the initial patch (#199). 3.2.0 (2020-07-11) AsyncMock is now exposed in mocker and supports provides assertion introspection similar to Mock objects. Added by @tirkarthi in #197. 3.1.1 (2020-05-31) Fixed performance regression caused by the ValueError raised when mocker is used as context manager (#191). 3.1.0 (2020-04-18) New mocker fixtures added that allow using mocking functionality in other scopes: class_mocker module_mocker package_mocker session_mocker Added by @scorphus in #182. 3.0.0 (2020-03-31) Python 2.7 and 3.4 are no longer supported. Users using pip 9 or later will install a compatible version automatically. mocker.spy now also works with async def functions (#179). Thanks @frankie567 for the PR! 2.0.0 (2020-01-04) Breaking Changes mocker.spy attributes for tracking returned values and raised exceptions of its spied functions are now called spy_return and spy_exception, instead of reusing the existing MagicMock attributes return_value and side_effect. Version 1.13 introduced a serious regression: after a spied function using mocker.spy raises an exception, further calls to the spy will not call the spied function, always raising the first exception instead: assigning to side_effect causes unittest.mock to behave this way (#175). The deprecated mock alias to the mocker fixture has finally been removed. 1.13.0 (2019-12-05) The object returned by mocker.spy now also tracks any side effect of the spied method/function. 1.12.1 (2019-11-20) Fix error if mocker.patch is used in code where the source file is not available, for example stale .pyc files (#169). 1.12.0 (2019-11-19) Now all patch functions also raise a ValueError when used as a context-manager. Thanks @AlexGascon for the PR (#168). 1.11.2 (2019-10-19) The pytest introspection follows message is no longer shown if there is no pytest introspection (#154). Thanks @The-Compiler for the report. mocker now raises a ValueError when used as a context-manager. Thanks @binarymason for the PR (#165). 1.11.1 (2019-10-04) Fix mocker.spy on Python 2 when used on non-function objects which implement __call__ (#157). Thanks @pbasista for the report. 1.11.0 The object returned by mocker.spy now also tracks the return value of the spied method/function.
*** This bug has been marked as a duplicate of bug 269361 ***