Message363575
| Author |
ngie |
| Recipients |
ngie |
| Date |
2020年03月07日.04:11:33 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1583554294.0.0.456473744337.issue39884@roundup.psfhosted.org> |
| In-reply-to |
| Content |
When a body of C extensions needs to be ported from python <3.8 to 3.8, one of the issues one might run into is improperly defined methods in a C extension, which results in SystemErrors stating:
>>> SystemError: bad call flags
This new behavior was added as part of Issue # 33012.
While the issues definitely need to be resolved in the C extensions, where to start is not completely clear. I had to put `printfs` in PyCFunction_NewEx and PyDescr_NewMethod to track down the issues, e.g.,
>>> printf("method name: %s\n", method->ml_name);
While this might be misleading for duplicate method definitions, it definitely helps narrow down the offending code.
Adding the method name to the SystemError would be a big step in the right direction in terms of making it easier to resolve these issues.
PS I realize that this might be masked by casting PyCFunction on methods or by not using gcc 8+, but I'd argue that C extensions need to have developer issues like this be clearer to the end-reader. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2020年03月07日 04:11:34 | ngie | set | recipients:
+ ngie |
| 2020年03月07日 04:11:34 | ngie | set | messageid: <1583554294.0.0.456473744337.issue39884@roundup.psfhosted.org> |
| 2020年03月07日 04:11:33 | ngie | link | issue39884 messages |
| 2020年03月07日 04:11:33 | ngie | create |
|