Author vstinner
Recipients Mark.Shannon, benjamin.peterson, jdemeyer, lukasz.langa, pablogsal, petr.viktorin, vstinner
Date 2019-07-31.13:29:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1564579747.25.0.0701347607844.issue36974@roundup.psfhosted.org>
In-reply-to
Content
> [3.8] bpo-36974: separate vectorcall functions for each calling convention (GH-13781) (#14782)
> https://github.com/python/cpython/commit/bf8e82f976b37856c7d35cdf88a238cb6f57fe65

FYI this change caused a regression in libcomps with Python 3.8 beta3, whereas it works well with Python 3.8 beta2.

It's not a bug in Python, but it was a bug in libcomps (already fixed upstream). I just fixed libcomps:
https://github.com/rpm-software-management/libcomps/pull/50

This project used the following method descriptors (for module functions):

{"categories_match", (PyCFunction)PyCOMPS_categories_match, METH_KEYWORDS,
 PyCOMPS_validate__doc__},
{"environments_match", (PyCFunction)PyCOMPS_envs_match, METH_KEYWORDS,
 PyCOMPS_validate__doc__},

In Python 3.7, importing the module was just fine: descriptor flags are only checked at the  first call to the method.

In Python 3.8, descriptor flags are checked when the module is imported.

Fedora bug: https://bugzilla.redhat.com/show_bug.cgi?id=1734777

The fix is to use the right flags: "METH_VARARGS | METH_KEYWORDS" instead of "METH_KEYWORDS".

Should we add a note like "if you get a 'SystemError: bad call flags' on import, check the descriptor flags of your functions" in What's New in Python 3.8? Maybe with a link to this issue.
https://docs.python.org/dev/whatsnew/3.8.html#changes-in-the-c-api
History
Date User Action Args
2019-07-31 13:29:07vstinnersetrecipients: + vstinner, benjamin.peterson, petr.viktorin, lukasz.langa, Mark.Shannon, jdemeyer, pablogsal
2019-07-31 13:29:07vstinnersetmessageid: <1564579747.25.0.0701347607844.issue36974@roundup.psfhosted.org>
2019-07-31 13:29:07vstinnerlinkissue36974 messages
2019-07-31 13:29:06vstinnercreate