[issue10914] Python sub-interpreter test

2012-11-27 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue10914] Python sub-interpreter test

2011-09-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Ah. If it was an extension module, I’d have a clue (the debug thing), > but I know nothing about embedding. An alternative would be to > install the file with the msi system and use a project file to have it > compiled (sounds like much hassle). Agreed, but

[issue10914] Python sub-interpreter test

2011-09-05 Thread Éric Araujo
Éric Araujo added the comment: > Except that it didn't work under Windows... Ah. If it was an extension module, I’d have a clue (the debug thing), but I know nothing about embedding. An alternative would be to install the file with the msi system and use a project file to have it compiled (s

[issue10914] Python sub-interpreter test

2011-09-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: > It is possible to install the _testembed.c file alongside xxmodule.c > and compile it at test time. We probably could, using the approach from the distutils patch. But it feels really quirky to me. Granted, the Makefile is quirky as well. > To test under Wi

[issue10914] Python sub-interpreter test

2011-09-03 Thread Éric Araujo
Éric Araujo added the comment: BTW, about this comment in the code: # XXX only tested under Unix checkouts It is possible to install the _testembed.c file alongside xxmodule.c and compile it at test time. To test under Windows, I’ve re-read your first patch using distutils and it’s not that l

[issue10914] Python sub-interpreter test

2011-04-30 Thread STINNER Victor
STINNER Victor added the comment: > Victor, the fix needs to go into 3.2 as well. Oh, I thought that Modules/_testembed.c was only in 3.3. Anyway, it is a real bug in 3.2, and it is now fixed (I backported the 2 fixes in 3.2). -- status: open -> closed ___

[issue10914] Python sub-interpreter test

2011-04-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5a983773c09a by Victor Stinner in branch '3.2': Issue #10914: Py_NewInterpreter() uses PyErr_PrintEx(0) http://hg.python.org/cpython/rev/5a983773c09a New changeset 2caf82aee7a4 by Victor Stinner in branch '3.2': Issue #10914: Initialize correctly t

[issue10914] Python sub-interpreter test

2011-04-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: Victor, the fix needs to go into 3.2 as well. -- assignee: -> haypo status: closed -> open ___ Python tracker ___

[issue10914] Python sub-interpreter test

2011-04-26 Thread STINNER Victor
STINNER Victor added the comment: test_capi pass on x86 debian parallel 3.x: I close this issue again :-) -- status: open -> closed ___ Python tracker ___ __

[issue10914] Python sub-interpreter test

2011-04-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset c8338cfa3578 by Victor Stinner in branch 'default': Issue #10914: Py_NewInterpreter() uses PyErr_PrintEx(0) http://hg.python.org/cpython/rev/c8338cfa3578 New changeset d3af2a2b621b by Victor Stinner in branch 'default': Issue #10914: Initialize cor

[issue10914] Python sub-interpreter test

2011-04-25 Thread STINNER Victor
STINNER Victor added the comment: > The problem is the test on the "python initialization": > PyUnicode_EncodeFSDefault / PyUnicode_DecodeFSDefaultAndSize > check the global Py_FileSystemDefaultEncoding variable (use > C functions if it is NULL). The problem is a little bit more complex. interp

[issue10914] Python sub-interpreter test

2011-04-25 Thread Graham Dumpleton
Graham Dumpleton added the comment: Hmmm, I wander if that is related to the workaround I have added in mod_wsgi recently of: /* * Force loading of codecs into interpreter. This has to be * done as not otherwise done in sub interpreters and if not * done, code running in sub

[issue10914] Python sub-interpreter test

2011-04-25 Thread STINNER Victor
STINNER Victor added the comment: > I think that Python used interp->codecs_initialized flag Yes in PyUnicode_AsEncodedString(), in Python 3.0 and 3.1. Python 3.2 has also the test, but PyUnicode_AsEncodedString() is no more used to encode filenames. I removed the test in Python 3.3. Extract

[issue10914] Python sub-interpreter test

2011-04-25 Thread STINNER Victor
STINNER Victor added the comment: Modules/_testembed fails with ISO-8859-15 locale encoding because of a bootstrap issue. The problem is that the filesystem encoding codec is implemented in Python: Python requires the codec to loads modules, but it has to load a module to load the codec. I al

[issue10914] Python sub-interpreter test

2011-04-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: There's a failure on certain locales that Victor, I believe, is currently investigating. -- status: pending -> open ___ Python tracker ___ ___

[issue10914] Python sub-interpreter test

2011-04-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Should be fixed. -- resolution: -> fixed stage: -> committed/rejected status: open -> pending ___ Python tracker ___

[issue10914] Python sub-interpreter test

2011-04-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset d195ff5c44f4 by Antoine Pitrou in branch '3.2': Issue #10914: Add a minimal embedding test to test_capi. http://hg.python.org/cpython/rev/d195ff5c44f4 New changeset 77cf9e4b144b by Antoine Pitrou in branch '3.2': Issue #10914: add NEWS item. http:/

[issue10914] Python sub-interpreter test

2011-04-24 Thread Nick Coghlan
Nick Coghlan added the comment: Sounds good. I still have that embedded pickle module issue to deal with, and this should let me actually add a test for it along with the fix. -- ___ Python tracker __

[issue10914] Python sub-interpreter test

2011-04-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Unless someone objects, I would like to commit that latest patch, since at least it enables the start of a regression suite for Python embedding. (it also allowed me to notice how crufty and incredibly obscure the getpath.c mechanisms are) -- ___

[issue10914] Python sub-interpreter test

2011-04-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: After wrestling with startup issues on the OS X buildbots, here is a new patch, tested on several different UNIX platforms. -- Added file: http://bugs.python.org/file21765/embedtest2.patch ___ Python tracker

[issue10914] Python sub-interpreter test

2011-03-25 Thread Éric Araujo
Éric Araujo added the comment: Note that I think it would be a perfectly reasonable feature request to better isolate and improve the compiler in packaging/distutils2. (This does not mean this issue should be delayed.) -- ___ Python tracker

[issue10914] Python sub-interpreter test

2011-03-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, this is what I came up with to build an exe using distutils. At this point, the complication is downright silly and it doesn't even work under Windows, so we may prefer to go down the Makefile route instead. -- Added file: http://bugs.python.org/f

[issue10914] Python sub-interpreter test

2011-03-18 Thread Éric Araujo
Éric Araujo added the comment: > Well, config._link() seems to do what is needed here. My point is that it’s easier to write a few lines of code directly using a compiler object (copying and simplifying code from try_run or _link) than go through the distutils command machinery. Both are doab

[issue10914] Python sub-interpreter test

2011-03-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: > distutils sure knows how to build .o or .so files, but I don’t know > about standalone executables (because I don’t know how the .o end up > making an executable). If you want to try to do it, I would advise > you not to use the config command but rather a co

[issue10914] Python sub-interpreter test

2011-03-17 Thread Éric Araujo
Éric Araujo added the comment: distutils sure knows how to build .o or .so files, but I don’t know about standalone executables (because I don’t know how the .o end up making an executable). If you want to try to do it, I would advise you not to use the config command but rather a compiler o

[issue10914] Python sub-interpreter test

2011-03-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ouch, sorry, I got my commit message wrong. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue10914] Python sub-interpreter test

2011-03-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset a791dd7d51f3 by Antoine Pitrou in branch '3.2': Issue #10914: fix bogus memory management in Modules/getpath.c, leading to a possible crash when calling Py_SetPath() http://hg.python.org/cpython/rev/a791dd7d51f3 -- nosy: +python-dev _

[issue10914] Python sub-interpreter test

2011-01-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: > There is also always the possibility of writing it in Python and using > ctypes to get at the necessary C API calls to create subinterpreters. Well, I don't think calling Py_Initialize, Py_Finalize and Py_NewInterpreter from pure Python code is a very good

[issue10914] Python sub-interpreter test

2011-01-17 Thread Nick Coghlan
Nick Coghlan added the comment: I like the idea of adding these tests as well. Probably worth bringing up on python-dev - folks like Tarek should definitely be able to help with alternative ways of building a test application for this. There is also always the possibility of writing it in Pyt

[issue10914] Python sub-interpreter test

2011-01-16 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: In distutils.command.config, config().try_run(body) is probably what we need. Now, I don't know how to use it... -- ___ Python tracker _

[issue10914] Python sub-interpreter test

2011-01-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Is it possible to use distutils to compile this test, and remove it > from the Makefile? I'm not aware that distutils is able to compile applications rather than extension modules, but that would certainly be better than a rule in the Makefile, yes.

[issue10914] Python sub-interpreter test

2011-01-16 Thread Benjamin Peterson
Benjamin Peterson added the comment: There's already precedent for test modules in Modules/ what with xxmodule.c and _testcapimodule.c. -- nosy: +benjamin.peterson ___ Python tracker _

[issue10914] Python sub-interpreter test

2011-01-16 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: +1 for this kind of tests. But I would not have their source in the "official" Modules directory. I expect that there will be several tests of this kind, each one with different modules to import, functions to run, global settings to change. IMO the C c

[issue10914] Python sub-interpreter test

2011-01-15 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +amaury.forgeotdarc, ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue10914] Python sub-interpreter test

2011-01-15 Thread Antoine Pitrou
New submission from Antoine Pitrou : Here is a prototype test for embedding and sub-interpreters. -- components: Interpreter Core, Tests files: embedtest.patch keywords: patch messages: 126328 nosy: christian.heimes, grahamd, haypo, loewis, pitrou priority: normal severity: normal status