You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mock.patch introspects original even when new_callable set #119600
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.
Activity
Issue python#119600: mock: do not access attributes of original when …
Issue python#119600: mock: do not access attributes of original when …
Issue python#119600: mock: do not access attributes of original when …
gh-119600: mock: do not access attributes of original when new_callab…
pythongh-119600: mock: do not access attributes of original when new_…
pythongh-119600: mock: do not access attributes of original when new_…
[3.12] gh-119600: mock: do not access attributes of original when new…
[3.13] gh-119600: mock: do not access attributes of original when new…
pythongh-119600: mock: do not access attributes of original when new_…
pythongh-119600: mock: do not access attributes of original when new_…
pythongh-119600: mock: do not access attributes of original when new_…