[issue30534] error message for incorrect call degraded in 3.7

2017-06-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 6cca5c8459cc439cb050010ffa762a03859d3051 by Serhiy Storchaka in branch 'master': bpo-30592: Fixed error messages for some builtins. (#1996) https://github.com/python/cpython/commit/6cca5c8459cc439cb050010ffa762a03859d3051 --

[issue30534] error message for incorrect call degraded in 3.7

2017-06-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +2063 ___ Python tracker ___ ___

[issue30534] error message for incorrect call degraded in 3.7

2017-06-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue30534] error message for incorrect call degraded in 3.7

2017-06-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 5eb788bf7f54a8e04429e18fc332db858edd64b6 by Serhiy Storchaka in branch 'master': bpo-30534: Fixed error messages when pass keyword arguments (#1901) https://github.com/python/cpython/commit/5eb788bf7f54a8e04429e18fc332db858edd64b6 --

[issue30534] error message for incorrect call degraded in 3.7

2017-06-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is no respective type. abs() is just an arbitrary example. There are perhaps tens functions affected by this bug. test_exception_messages looks an overkill. There are similar tests in test_capi and test_getargs2 that test public PyArg_* functions. But

[issue30534] error message for incorrect call degraded in 3.7

2017-06-03 Thread Brett Cannon
Brett Cannon added the comment: The tests could either go into the respective type's tests or a new test module like test_exception_messages could be added that's only to help keep messages in sync with each other. -- ___ Python tracker

[issue30534] error message for incorrect call degraded in 3.7

2017-06-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated error messages. Later I'm going to unify error messages for Python and C functions. But this is a different issue. I can wrote a test, but I don't know good place for it. test_builtin doesn't look a good place to me. --

[issue30534] error message for incorrect call degraded in 3.7

2017-06-02 Thread Brett Cannon
Brett Cannon added the comment: > Note that some error messages are "takes no keyword arguments", but others > are "does not take keyword arguments" or "doesn't take keyword arguments". > They should be unified. What wording is better? I vote for "takes no keyword arguments". --

[issue30534] error message for incorrect call degraded in 3.7

2017-06-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The details can be different. For example: >>> 1 .__add__(x=2) Traceback (most recent call last): File "", line 1, in TypeError: wrapper __add__ doesn't take keyword arguments The message contains the word "wrapper" and doesn't contains parenthesis. I

[issue30534] error message for incorrect call degraded in 3.7

2017-06-01 Thread STINNER Victor
STINNER Victor added the comment: > Note that some error messages are "takes no keyword arguments", but others > are "does not take keyword arguments" or "doesn't take keyword arguments". We already have a _PyArg_NoKeywords() function. Maybe we could add a new _PyErr_NoKeywords() function

[issue30534] error message for incorrect call degraded in 3.7

2017-06-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Note that some error messages are "takes no keyword arguments", but others are "does not take keyword arguments" or "doesn't take keyword arguments". They should be unified. What wording is better? -- stage: -> patch review

[issue30534] error message for incorrect call degraded in 3.7

2017-06-01 Thread STINNER Victor
STINNER Victor added the comment: See also "[Python-ideas] Positional-only parameters" discussion of last March: https://mail.python.org/pipermail/python-ideas/2017-March/044956.html Brett Cannon: "It seems all the core devs who have commented on this are in the positive (Victor, Yury, Ethan,

[issue30534] error message for incorrect call degraded in 3.7

2017-06-01 Thread STINNER Victor
STINNER Victor added the comment: I introduced the regression with the commit 7fc252adfbedece75f2330bcfdadbf84dee7836f: "Optimize _PyCFunction_FastCallKeywords(): Issue #29259: Write fast path in _PyCFunction_FastCallKeywords() for METH_FASTCALL, (...) Cleanup also

[issue30534] error message for incorrect call degraded in 3.7

2017-06-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1980 ___ Python tracker ___ ___

[issue30534] error message for incorrect call degraded in 3.7

2017-06-01 Thread STINNER Victor
STINNER Victor added the comment: Ah, Python 3.6 is not affected: haypo@selma$ ./python Python 3.6.1+ (heads/unpack_dict:ba4fb35, May 31 2017, 16:31:51) >>> abs(x=5) TypeError: abs() takes no keyword arguments -- ___ Python tracker

[issue30534] error message for incorrect call degraded in 3.7

2017-06-01 Thread STINNER Victor
STINNER Victor added the comment: Example with a builtin function, abs(), which uses METH_O. Before: haypo@selma$ python3 Python 3.5.3 (default, Apr 24 2017, 13:32:13) >>> abs(x=5) TypeError: abs() takes no keyword arguments After: haypo@selma$ ./python Python 3.7.0a0 (heads/master:85aba23,

[issue30534] error message for incorrect call degraded in 3.7

2017-06-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka nosy: +haypo, serhiy.storchaka ___ Python tracker ___

[issue30534] error message for incorrect call degraded in 3.7

2017-06-01 Thread Stefan Behnel
New submission from Stefan Behnel: I'm seeing doctest failures in Cython's test suite with Py3.7 due to the change of an error message: Failed example: func1(arg=None) Expected: Traceback (most recent call last): ... TypeError: func1() takes no keyword arguments Got: