-
Notifications
You must be signed in to change notification settings - Fork 801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pywin32 for PyPy #842
Comments
Sounds great to me. Use of PyObject_Init sounds good too so long as it also works in earlier Python version (I seem to recall that function was added in later versions). Original comment by: mhammond |
PyObject_Init is already present in Python2.2 Original comment by: amauryf |
What is the current status of pypy compatibility ? Original comment by: thibault-hild |
How can I help get this merged into default pywin32 ? Original comment by: matti |
I guess you could contact Amaury and see if he needs any help to get patches together for review - from my POV, I'm just waiting for those patches. Original comment by: mhammond |
Can you please share how to install pywin32 for pypy? Here is the screen shot of error message. Original comment by: mabel111 |
Hi, Original comment by: amauryf |
Duplicated by #1289 (that other issue is more modern with up to date discussion, so may as well close this one) |
I've just managed to make pywin32 compile and work on top of PyPy.
I open this ticket to keep track of the various changes that I made to the pywin32 source code.
I'm currently preparing patches; for the moment, changes are of two kinds:
- In some .cpp files you can find "if PyString_Check(xxx)" without surrounding parentheses. This works on CPython because PyString_Check is actually a macro which adds parentheses to its expression; with PyPy PyString_Check is a function.
- With PyPy it's not allowed to change ob_type after object creation. This is used a lot by all PyIBase subclasses. The solution I found is to pass the TypeObject to the base constructor, and ensure that ob_type is set just before calling _Py_NewReference(). Of course these two lines can be replaced by "PyObject_Init(this, type);"
Reported by: amauryf
Original Ticket: pywin32/feature-requests/83
The text was updated successfully, but these errors were encountered: