[New-bugs-announce] [issue36848] autospec fails with AttributeError when mocked class has __signature__ non-writeable

Karthikeyan Singaravelan report at bugs.python.org
Wed May 8 02:57:13 EDT 2019


New submission from Karthikeyan Singaravelan <tir.karthi at gmail.com>:

With issue17185 __signature__ was set so that inspect can use this to return signature for mock objects. But in PySide2 it has __signature__ set as a non-writeable property and hence trying to set __signature__ fails. It's actually setting __signature__ for mocked object but still has this error for PySide.

mock backport report : https://github.com/testing-cabal/mock/issues/464
pytest-qt report : https://github.com/pytest-dev/pytest-qt/issues/258

----------
components: Library (Lib)
keywords: 3.7regression
messages: 341855
nosy: cjw296, mariocj89, michael.foord, xtreak
priority: normal
severity: normal
status: open
title: autospec fails with AttributeError when mocked class has __signature__ non-writeable
type: behavior
versions: Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36848>
_______________________________________


More information about the New-bugs-announce mailing list