Bug report
Bug description:
In order to patch flask.g e.g. as in #84982, that proxies getattr must not be invoked. For that, mock must not try to read from the original object. In some cases that is unavoidable, e.g. when doing autospec. However, patch("flask.g", new_callable=MagicMock) should be entirely safe.
CPython versions tested on:
3.11, 3.12
Operating systems tested on:
Linux, macOS, Windows, Other
Linked PRs
Bug report
Bug description:
In order to patch
flask.ge.g. as in #84982, that proxies getattr must not be invoked. For that, mock must not try to read from the original object. In some cases that is unavoidable, e.g. when doingautospec. However,patch("flask.g", new_callable=MagicMock)should be entirely safe.CPython versions tested on:
3.11, 3.12
Operating systems tested on:
Linux, macOS, Windows, Other
Linked PRs