Correct code object invocation after semantic change in argcount for 3.8#2980
Correct code object invocation after semantic change in argcount for 3.8#2980scoder merged 1 commit intocython:masterfrom
Conversation
|
Seems like the test failures are unrelated to this change. Is the test suite ok? |
|
I only see related failures. Where did you see an unrelated one? (master is ok) |
|
In any case, the change looks correct. I'll merge it and fix the corresponding tests. |
My apologies, I was pretty confused why this PR is making Python2.7 fail, but I just realized Cython supports this now in Python2 compatible code, right? |
|
Yes, we try to avoid making Cython features depend on CPython features wherever possible. |
|
Thank you very much for the review and for fixing the tests :) |
|
The error that I saw in CPython is actually related to the change. We were previously adding up the pos-only count with the positional arguments, which made the consistency check in CPython's code object creation fail. So, all fine on all sides now. |
In python/cpython#13726 CPython has change the semantics of argcount to reflect all positional arguments (including positional-only). This is to make it easier to consumers to obtain the number of positional arguments if they do not care about positional-only arguments.
More information in:
https://mail.python.org/pipermail/python-dev/2019-June/157812.html
https://bugs.python.org/issue37122
CC: @scoder @serhiy-storchaka