Skip to content

Fix for Issue #260#300

Merged
jakinyele merged 4 commits intoJHUISI:devfrom
terry-fee:dev
Sep 3, 2023
Merged

Fix for Issue #260#300
jakinyele merged 4 commits intoJHUISI:devfrom
terry-fee:dev

Conversation

@terry-fee
Copy link
Copy Markdown
Contributor

The issue seems to be with the definition for PyMethodDef Integer_methods[] in integermodule.c. Somehow Python versions 3.8 and above do not like specifying METH_O | METH_NOARGS in the method testCoPrime. With this, when trying to finalise the type object through PyType_Ready(&IntegerType), it always returns a negative status code and fails silently.

A solution is to replace either METH_NOARGS or METH_O instead of the above. I also notice that no other file is using the method testCoPrime.

I have tested Python 3.7, 3.8, 3.9, and 3.10 on Ubuntu 22.04 WSL for Windows 11, Ubuntu 22.04 on Raspberry Pi, and Ubuntu 20.04. All worked except for Python 3.10 on Ubuntu 20.04, but the issue was with an outdated pip.

Copy link
Copy Markdown
Member

@jakinyele jakinyele left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thanks!

@jakinyele jakinyele merged commit 07dd214 into JHUISI:dev Sep 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants