STINNER Victor added the comment:
I understand that this bug has been fixed by the implementation of the PEP 587
in bpo-36763: Py_SethPath() now uses dynamically allocated memory and can be
called multiple times. Moreover, the PEP 587 now provides a better API for the
Path Configuration. I
Melvyn Sopacua added the comment:
The cause for this error is any cause for not being able to load a module. This
includes version conflicts, so when trying to load a virtualenv with python 3.3
interpreter by a uWSGI embedded python3.4 interpreter the action fails.
This is - bluntly
Palm Kevin added the comment:
@ncoghlan: Not PySys_SetPath, but Py_SetPath is causing the problem (you
mentionned PySys_SetPath in your message msg249311)
I discovered PySys_SetPath only last Friday.
In fact, in my case, the usage of PySys_SetPath (after Py_Initialize) instead
of Py_SetPath
Nick Coghlan added the comment:
I think the current situation is mainly an artifact of our relative dearth
of regression testing for embedded configurations, and the fact that we
have very few core developers working for companies embedding CPython in
larger applications.
I do care about that
Palm Kevin added the comment:
The problem seems still not resolved in Python 3.2.6 :-(
The reason has been found by Debao (msg144244). Isn't there anybody motivated
to fix this bug?
--
title: Can't call Py_SetPath() on pointer returned by Py_GetPath() - Usage of
API method Py_SetPath
Nick Coghlan added the comment:
Unfortunately, the answer to the question Isn't there anybody motivated to fix
this bug? is No, not really. As far as I am aware, all of the currently
active core developers are primarily interested in the use of the default
runtime interpreter as is, rather
Antoine Pitrou pit...@free.fr added the comment:
Sridhar: I'm sorry, but at this point you should investigate a bit more into
the actual causes of the problem. I'm not going to dig in virtualenv myself.
Also, since there's already #10743 for the virtualenv issue, perhaps further
Antoine Pitrou pit...@free.fr added the comment:
Ok, Palm's example even segfaults here:
Program received signal SIGSEGV, Segmentation fault.
0x772452bc in free () from /lib64/libc.so.6
(gdb) bt
#0 0x772452bc in free () from /lib64/libc.so.6
#1 0x0042a591 in Py_SetPath
Antoine Pitrou pit...@free.fr added the comment:
Crash fixed in a791dd7d51f3 (3.2) and b4104ffd5127 (3.3), but the original
problem remains, or a variant of it. I now get:
Init
Fatal Python error: Py_Initialize: Unable to get the locale encoding
LookupError: no codec search functions
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11320
___
___
Python-bugs-list mailing
Antoine Pitrou pit...@free.fr added the comment:
Ok, the issue here is that you can't call Py_SetPath() on the point returned by
Py_GetPath(), since the memory refered to that pointer is free()d at the
beginning of Py_SetPath(). The following works, though:
main(int argc, char **argv)
{
Palm Kevin kevin.p...@labsolution.lu added the comment:
@Sridhar: Could you please provide input for the question asked by Antoine?
I'd love to have this issue fixed for next Python release.
--
___
Python tracker rep...@bugs.python.org
Nick Coghlan ncogh...@gmail.com added the comment:
Note that this will be fixed for 3.3, as siteconfig will be updated to use
static data (generated during the build process) rather than relying on build
artifacts being available at runtime.
However, virtualenv (et al) will still need to
Sridhar Ratnakumar sridh...@activestate.com added the comment:
[pitrou]
Can you explain why this is a problem in Python?
Can't lib/python3.2/config-3.2m/Makefile simply be
provided by virtualenv (by copying it, I guess)?
Yes, I believe virtualenv already does that (or symlinks to it).
New submission from Palm Kevin kevin.p...@labsolution.lu:
The new API method Py_SetPath seems bugged. When executing the following code,
then the application crashes on Py_Initialize()-call:
#include Python.h
main(int argc, char **argv)
{
Py_SetPath(Py_GetPath());
printf(Init\n);
Sridhar Ratnakumar sridh...@activestate.com added the comment:
This issue is potentially breaking virtualenv5,
http://code.google.com/p/virtualenv5/issues/detail?id=6
--
nosy: +srid
___
Python tracker rep...@bugs.python.org
Antoine Pitrou pit...@free.fr added the comment:
Can you explain why this is a problem in Python?
Can't lib/python3.2/config-3.2m/Makefile simply be provided by virtualenv (by
copying it, I guess)?
--
nosy: +pitrou
___
Python tracker
17 matches
Mail list logo