[issue42532] spec_arg's __bool__ is called while initializing NonCallableMock

2020-12-13 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: New changeset 14f2a124e20081b8981c8d6165dbd78d11b6808c by Karthikeyan Singaravelan in branch '3.9': [3.9] bpo-42532: Check if NonCallableMock's spec_arg is not None instead of call its __bool__ function (GH-23613) (GH-23676)

[issue42532] spec_arg's __bool__ is called while initializing NonCallableMock

2020-12-07 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- pull_requests: +22542 pull_request: https://github.com/python/cpython/pull/23676 ___ Python tracker ___

[issue42532] spec_arg's __bool__ is called while initializing NonCallableMock

2020-12-06 Thread Idan Weiss
Change by Idan Weiss : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue42532] spec_arg's __bool__ is called while initializing NonCallableMock

2020-12-06 Thread Chris Withers
Chris Withers added the comment: New changeset c598a04dd29b89ad072245ddaf738badcfb41ac7 by idanw206 in branch 'master': bpo-42532: Check if NonCallableMock's spec_arg is not None instead of call its __bool__ function (GH23613)

[issue42532] spec_arg's __bool__ is called while initializing NonCallableMock

2020-12-04 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: The fix to check for None seems straightforward to me and is only needed for AsyncMock. I would wait for others thoughts on this. -- nosy: +cjw296, lisroach, mariocj89, michael.foord, xtreak ___ Python

[issue42532] spec_arg's __bool__ is called while initializing NonCallableMock

2020-12-03 Thread Idan Weiss
New submission from Idan Weiss : To reproduce: import unittest.mock class LogicInBool: def __bool__(self): print("In Bool!") return True class SomeClass: def __init__(self): self.logic_in_bool = LogicInBool() obj = SomeClass() with

[issue42532] spec_arg's __bool__ is called while initializing NonCallableMock

2020-12-01 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +22480 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23613 ___ Python tracker

[issue42532] spec_arg's __bool__ is called while initializing NonCallableMock

2020-12-01 Thread Idan Weiss
Change by Idan Weiss : -- components: Library (Lib) nosy: idanweiss97 priority: normal severity: normal status: open title: spec_arg's __bool__ is called while initializing NonCallableMock type: behavior versions: Python 3.10, Python 3.8, Python 3.9