[issue39578] MagicMock specialisation instance can no longer be passed to new MagicMock instance

2020-02-10 Thread Elena Oat
Elena Oat added the comment: Here's the example I ran, that indeed fails in Python 3.8 and Python 3.9 (with different errors) and works in Python 3.7. from unittest.mock import MagicMock class CustomMock(MagicMock): def __init__(self):

[issue39578] MagicMock specialisation instance can no longer be passed to new MagicMock instance

2020-02-10 Thread Elena Oat
Elena Oat added the comment: I am looking at reproducing this and creating a short example of where this fails. Will look further into more details of why this doesn't work. -- nosy: +Elena.Oat ___ Python tracker

[issue39578] MagicMock specialisation instance can no longer be passed to new MagicMock instance

2020-02-09 Thread Mario Corchero
Mario Corchero added the comment: Having not looked deeply at it but with the reproducer, running a quick bisect, it points to this commit: https://github.com/python/cpython/commit/77b3b7701a34ecf6316469e05b79bb91de2addfa I'll try having a look later at the day if I can manage to free some

[issue39578] MagicMock specialisation instance can no longer be passed to new MagicMock instance

2020-02-07 Thread Frank Harrison
Frank Harrison added the comment: Minor correction: The regression was only tested on Python 3.9.0a2 (Fedora), Python 3.9a3 (OSX), CPython's master (build from source) and the latest non-prerelease versions of python 3.5, 3.6, 3.7, and 3.8. Tested on OSX and Fedora 31. --

[issue39578] MagicMock specialisation instance can no longer be passed to new MagicMock instance

2020-02-07 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +cjw296, lisroach, mariocj89, michael.foord, xtreak ___ Python tracker ___ ___

[issue39578] MagicMock specialisation instance can no longer be passed to new MagicMock instance

2020-02-07 Thread Frank Harrison
New submission from Frank Harrison : This is my first bug logged here, I've tried to follow the guideline and search for this issue; please let me know if I missed anything. Summary: unittest.mock.MagicMock has a regression starting in 3.8. The regression was only tested on latest