[issue45156] mock.seal has infinite recursion with int class attributes

2021-09-16 Thread STINNER Victor
STINNER Victor added the comment: Thanks for the report and the fix! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue45156] mock.seal has infinite recursion with int class attributes

2021-09-14 Thread STINNER Victor
STINNER Victor added the comment: New changeset fd74d2680ef96c0140bc02cf94d1cf1f2ef814c2 by Miss Islington (bot) in branch '3.10': bpo-45156: Fixes inifite loop on unittest.mock.seal() (GH-28300) (GH-28326) https://github.com/python/cpython/commit/fd74d2680ef96c0140bc02cf94d1cf1f2ef814c2

[issue45156] mock.seal has infinite recursion with int class attributes

2021-09-14 Thread miss-islington
miss-islington added the comment: New changeset 13257d9fca13dfa1bda5b802d68ddaec72f3a07e by Miss Islington (bot) in branch '3.9': bpo-45156: Fixes inifite loop on unittest.mock.seal() (GH-28300) https://github.com/python/cpython/commit/13257d9fca13dfa1bda5b802d68ddaec72f3a07e --

[issue45156] mock.seal has infinite recursion with int class attributes

2021-09-14 Thread miss-islington
Change by miss-islington : -- pull_requests: +26738 pull_request: https://github.com/python/cpython/pull/28327 ___ Python tracker ___

[issue45156] mock.seal has infinite recursion with int class attributes

2021-09-14 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +26737 pull_request: https://github.com/python/cpython/pull/28326 ___ Python tracker

[issue45156] mock.seal has infinite recursion with int class attributes

2021-09-14 Thread STINNER Victor
STINNER Victor added the comment: New changeset 7f60c9e1c6e22cc0e846a872c318570926cd3094 by Nikita Sobolev in branch 'main': bpo-45156: Fixes inifite loop on unittest.mock.seal() (GH-28300) https://github.com/python/cpython/commit/7f60c9e1c6e22cc0e846a872c318570926cd3094 -- nosy:

[issue45156] mock.seal has infinite recursion with int class attributes

2021-09-13 Thread Nikita Sobolev
Nikita Sobolev added the comment: I've proposed a solution, based on the assumption that we don't need to recurse into `_SpecState` props: ``` if isinstance(m._mock_children.get(attr), _SpecState): continue ``` It seems like a simple and reasonable thing to do. Link:

[issue45156] mock.seal has infinite recursion with int class attributes

2021-09-12 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch nosy: +sobolevn nosy_count: 3.0 -> 4.0 pull_requests: +26714 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28300 ___ Python tracker

[issue45156] mock.seal has infinite recursion with int class attributes

2021-09-12 Thread Irit Katriel
Irit Katriel added the comment: Pdb) list 2916if m._mock_new_parent is mock: 2917 try: 2918seal(m) 2919 except: 2920breakpoint() 2921 -> raise 2922 2923 2924class _AsyncIterator: 2925""" 2926

[issue45156] mock.seal has infinite recursion with int class attributes

2021-09-12 Thread Irit Katriel
Irit Katriel added the comment: Reproduced on 3.11: >>> foo = mock.create_autospec(Foo) >>> mock.seal(foo) ^CTraceback (most recent call last): File "", line 1, in File "/Users/iritkatriel/src/cpython-1/Lib/unittest/mock.py", line 2917, in seal seal(m) ^^^ File

[issue45156] mock.seal has infinite recursion with int class attributes

2021-09-11 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45156] mock.seal has infinite recursion with int class attributes

2021-09-09 Thread David Mandelberg
New submission from David Mandelberg : The code below seems to have infinite recursion in the mock.seal call with python 3.9.2. from unittest import mock class Foo: foo = 0 foo = mock.create_autospec(Foo) mock.seal(foo) -- components: Library (Lib) messages: 401525 nosy: dseomn