This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Elena.Oat
Recipients Elena.Oat, Frank Harrison, cjw296, lisroach, mariocj89, michael.foord, xtreak
Date 2020-02-11.00:03:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1581379389.49.0.391019449242.issue39578@roundup.psfhosted.org>
In-reply-to
Content
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):
        super().__init__(__something__='something')


mock = CustomMock()
MagicMock(mock)


In Python 3.8 the error is TypeError: __init__() got an unexpected keyword argument '_new_parent'. 

In Python 3.9 the error is TypeError: __init__() got an unexpected keyword argument 'name'.
History
Date User Action Args
2020-02-11 00:03:09Elena.Oatsetrecipients: + Elena.Oat, cjw296, michael.foord, lisroach, mariocj89, xtreak, Frank Harrison
2020-02-11 00:03:09Elena.Oatsetmessageid: <1581379389.49.0.391019449242.issue39578@roundup.psfhosted.org>
2020-02-11 00:03:09Elena.Oatlinkissue39578 messages
2020-02-11 00:03:09Elena.Oatcreate