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 r.david.murray
Recipients michael.foord, r.david.murray
Date 2012-04-20.18:08:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The following code:

  def foo(a, *, b=None):


fails with this traceback:

    Traceback (most recent call last):
      File "", line 6, in <module>
      File "/home/rdmurray/python/p33/Lib/unittest/", line 2026, in create_autospec
        mock = _set_signature(mock, spec)
      File "/home/rdmurray/python/p33/Lib/unittest/", line 162, in _set_signature
        result = _getsignature(original, skipfirst, instance)
      File "/home/rdmurray/python/p33/Lib/unittest/", line 81, in _getsignature
        regargs, varargs, varkwargs, defaults = inspect.getargspec(func)
      File "/home/rdmurray/python/p33/Lib/", line 808, in getargspec
        raise ValueError("Function has keyword-only arguments or annotations"
    ValueError: Function has keyword-only arguments or annotations, use getfullargspec() API which can support them
Date User Action Args
2012-04-20 18:08:04r.david.murraysetrecipients: + r.david.murray, michael.foord
2012-04-20 18:08:04r.david.murraysetmessageid: <>
2012-04-20 18:08:03r.david.murraylinkissue14634 messages
2012-04-20 18:08:03r.david.murraycreate