clonly / python4delphi

Automatically exported from code.google.com/p/python4delphi
0 stars 0 forks source link

P4D not working with Python 3.4 #31

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install Python 3.4
2. Install P4D
3. Run any Demo

What is the expected output? What do you see instead?
PyCFunction_New not found (replaced by PyCFunction_NewEx)

What version of the product are you using? On what operating system?
WinXP

Please provide any additional information below.

Original issue reported on code.google.com by ales.ho...@gmail.com on 29 May 2014 at 2:07

GoogleCodeExporter commented 9 years ago
Also, lack of explicit 3.4 support in PythonEngine.pas is contributing to 
PyScripter failing to support 3.4.

Original comment by sgpa...@mainscreen.com on 22 Jun 2014 at 2:17

GoogleCodeExporter commented 9 years ago
The missing PyCFunction_New is an issue with Python 3.4, you can find more 
details here: http://bugs.python.org/issue21354

Anyway, as you can see from the source code this is just an alias for 
PYCFunction_NewEx (look here: 
https://github.com/python/cpython/blob/master/Objects/methodobject.c#L19-L48).

So I made a small patch to support Python 3.4 and to replace PyCFunction_New 
with PyCFunction_NewEx. In the patch you also have support for new versions of 
Delphi (XE4, XE5, XE6, XE7).

The patch was tested with XE5, XE7 and Python 2.7.x and 3.4.x.

Original comment by boydo...@gmail.com on 6 Jan 2015 at 1:28

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed in version control.

Original comment by pyscripter on 20 Mar 2015 at 8:17