[issue11320] Usage of API method Py_SetPath causes errors in Py_Initialize() (Posix ony))

2019-05-27 Thread STINNER Victor
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 c

[issue11320] Usage of API method Py_SetPath causes errors in Py_Initialize() (Posix ony))

2016-09-12 Thread Melvyn Sopacua
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 overstated

[issue11320] Usage of API method Py_SetPath causes errors in Py_Initialize() (Posix ony))

2015-08-30 Thread Palm Kevin
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 (b

[issue11320] Usage of API method Py_SetPath causes errors in Py_Initialize() (Posix ony))

2015-08-29 Thread Nick Coghlan
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 sp

[issue11320] Usage of API method Py_SetPath causes errors in Py_Initialize() (Posix ony))

2015-08-29 Thread Steve Dower
Steve Dower added the comment: Seems like a fairly obvious bug. From https://docs.python.org/3/c-api/init.html#c.Py_SetPath > This also causes ... sys.prefix and sys.exec_prefix to be empty. > It is up to the caller to modify these if required after calling > Py_Initialize(). Apparently you ca

[issue11320] Usage of API method Py_SetPath causes errors in Py_Initialize() (Posix ony))

2015-08-28 Thread Nick Coghlan
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

[issue11320] Usage of API method Py_SetPath causes errors in Py_Initialize() (Posix ony))

2015-08-28 Thread Palm Kevin
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

[issue11320] Usage of API method Py_SetPath causes errors in Py_Initialize() (Posix ony))

2011-03-17 Thread Antoine Pitrou
Antoine Pitrou 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) { wchar_t *path, *ne

[issue11320] Usage of API method Py_SetPath causes errors in Py_Initialize() (Posix ony))

2011-03-17 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue11320] Usage of API method Py_SetPath causes errors in Py_Initialize() (Posix ony))

2011-03-17 Thread Antoine Pitrou
Antoine Pitrou 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 registered: can't find e

[issue11320] Usage of API method Py_SetPath causes errors in Py_Initialize() (Posix ony))

2011-03-17 Thread Antoine Pitrou
Antoine Pitrou 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 ( path=0x8

[issue11320] Usage of API method Py_SetPath causes errors in Py_Initialize() (Posix ony))

2011-03-17 Thread Antoine Pitrou
Antoine Pitrou 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 virtualenv-related comments

[issue11320] Usage of API method Py_SetPath causes errors in Py_Initialize() (Posix ony))

2011-03-16 Thread Sridhar Ratnakumar
Sridhar Ratnakumar 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). Python 3.2 changed the pa

[issue11320] Usage of API method Py_SetPath causes errors in Py_Initialize() (Posix ony))

2011-03-16 Thread Nick Coghlan
Nick Coghlan 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 provide the relevant st

[issue11320] Usage of API method Py_SetPath causes errors in Py_Initialize() (Posix ony))

2011-03-16 Thread Palm Kevin
Palm Kevin 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 __

[issue11320] Usage of API method Py_SetPath causes errors in Py_Initialize() (Posix ony))

2011-02-25 Thread Antoine Pitrou
Antoine Pitrou 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

[issue11320] Usage of API method Py_SetPath causes errors in Py_Initialize() (Posix ony))

2011-02-25 Thread Sridhar Ratnakumar
Sridhar Ratnakumar added the comment: This issue is potentially breaking virtualenv5, http://code.google.com/p/virtualenv5/issues/detail?id=6 -- nosy: +srid ___ Python tracker _

[issue11320] Usage of API method Py_SetPath causes errors in Py_Initialize() (Posix ony))

2011-02-25 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +barry, tarek priority: normal -> high ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue11320] Usage of API method Py_SetPath causes errors in Py_Initialize() (Posix ony))

2011-02-25 Thread Palm Kevin
New submission from Palm Kevin : 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"); Py_Initialize(); printf("--