You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PyCFunction_New no longer exposed by python DLL breaking bdist_wininst installers #65553
/* PyCFunction_New() is now just a macro that calls PyCFunction_NewEx(),
but it's part of the API so we need to keep a function around that
existing C extensions can call.
*/
which means PyCFunction_New is exported from the DLL. Python 3.4 does not have this (which seems a bug in its own right given the comment in 3.3 and earlier) but PC/bdist_wininst/install.c has code that attempts to dynamically load this function from the DLL and fails, causing 3rd party installers to fail.
Assuming the removal of this API was intentional so the problem is that install.c needs to be updated, the following patch fixes the issue.
(while none of PyCFunction_New and PyCFunction_NewEx are documented, they are part of the stable ABI - the python3.def file -, so removing the API is presumably a bug, not a feature)
I'm sorry.
The patch is correct from my perspective if we want to make bdist_install just working.
Or as an option I can restore PyCFunction_New function declaration.
Steve, Andrew, does either of you want to take care of this or shall I give it a shot? I'm figuring on using the patch here and re-adding PyCFunction_New as it had been.
Zachary Ware added the comment:
Steve, Andrew, does either of you want to take care of this or shall I give it a shot? I'm figuring on using the patch here and re-adding PyCFunction_New as it had been.
----------
Activity
mhammond commentedon Apr 26, 2014
Python 3.3 and earlier have in methodobject.c:
/* PyCFunction_New() is now just a macro that calls PyCFunction_NewEx(),
but it's part of the API so we need to keep a function around that
existing C extensions can call.
*/
which means PyCFunction_New is exported from the DLL. Python 3.4 does not have this (which seems a bug in its own right given the comment in 3.3 and earlier) but PC/bdist_wininst/install.c has code that attempts to dynamically load this function from the DLL and fails, causing 3rd party installers to fail.
Assuming the removal of this API was intentional so the problem is that install.c needs to be updated, the following patch fixes the issue.
pitrou commentedon Apr 26, 2014
This is apparently because mismanagement of issue bpo-15422.
Andrew, you did the commits, can you restore the PyAPI_FUNC declaration?
pitrou commentedon Apr 26, 2014
(while none of PyCFunction_New and PyCFunction_NewEx are documented, they are part of the stable ABI - the python3.def file -, so removing the API is presumably a bug, not a feature)
asvetlov commentedon Apr 28, 2014
Ok, I'll take a look. Sorry, probably I've missed python3.def file.
larryhastings commentedon Sep 20, 2014
This is still not fixed.
birkenfeld commentedon Sep 20, 2014
Sorry for the "mismanagement", I probably didn't check again after the final resolution.
larryhastings commentedon Feb 7, 2015
Still not fixed! This has been marked as "release blocker" for most of a year. Should I just apply the patch?
pitrou commentedon Feb 8, 2015
Perhaps Steve can confirm that the patch is right.
asvetlov commentedon Feb 8, 2015
I'm sorry.
The patch is correct from my perspective if we want to make bdist_install just working.
Or as an option I can restore PyCFunction_New function declaration.
What do you prefer?
zooba commentedon Feb 8, 2015
As Andrew says, the patch is fine for the bug, but the PyCFunction_New function is certainly part of the stable ABI and needs to be restored.
zware commentedon Apr 13, 2015
Steve, Andrew, does either of you want to take care of this or shall I give it a shot? I'm figuring on using the patch here and re-adding PyCFunction_New as it had been.
asvetlov commentedon Apr 13, 2015
Will do up to weekend.
—
Sent from Mailbox
On Mon, Apr 13, 2015 at 4:58 PM, Zachary Ware <report@bugs.python.org>
wrote:
python-dev commentedon Apr 27, 2015
New changeset 69951573cb0e by Andrew Svetlov in branch '3.4':
Issue bpo-21354: PyCFunction_New function is exposed by python DLL again.
https://hg.python.org/cpython/rev/69951573cb0e
asvetlov commentedon Apr 27, 2015
Fixed. Sorry for long delay.