Re: [Python-Dev] future-proofing vector tables for python APIs: binary-module interoperability

2009-01-25 Thread Luke Kenneth Casson Leighton
[SNIP] Yes it is enough to encapsulate memory allocation and file functions into python shared library. The python provide memory allocation functions, but not all modules use them. File functions are hiden by posixmodule and python modules can't use them. except ... posixmodule gets

Re: [Python-Dev] future-proofing vector tables for python APIs: binary-module interoperability

2009-01-25 Thread Luke Kenneth Casson Leighton
decoupling posixmodule.c from pythonNN.dll leaves the possibility to make python independent of msvcrt versioning. it would need to be a custom-compiled .pyd module, due to the early dependency. i'll see if this is possible. i'd added PyExc_OSError, for example, as data exported from

Re: [Python-Dev] progress: compiling python2.5 under msys (specifically but not exclusively under wine) with msvcr80

2009-01-25 Thread Luke Kenneth Casson Leighton
Have you made some benchmarks like pystone? Cheers, Cesare Cesare, hi, thanks for responding: unfortunately, there's absolutely no point in making any benchmark figures under an emulated environment which does things like take 2 billion instruction cycles to start up a program named

Re: [Python-Dev] microsoft dlls apparently don't support data. implications: PyAPI functions required to access data across modules.

2009-01-25 Thread Luke Kenneth Casson Leighton
On Sun, Jan 25, 2009 at 3:58 PM, Luke Kenneth Casson Leighton l...@lkcl.net wrote: according to the wikipedia entry on dlls, dlls do not support data, only functions. which would explain two things: 1) why certain modules are forcibly linked into pythonNN.dll 2) why attempts to move them out

Re: [Python-Dev] microsoft dlls apparently don't support data. implications: PyAPI functions required to access data across modules.

2009-01-25 Thread Luke Kenneth Casson Leighton
here is a starting list of data items which will require getter functions, found just by creating a posixmodule.pyd: Info: resolving __Py_NoneStruct by linking to __imp___Py_NoneStruct (auto-import) by no small coincidence, every single module with which we've had difficulties in the mingw

Re: [Python-Dev] future-proofing vector tables for python APIs: binary-module interoperability

2009-01-25 Thread Luke Kenneth Casson Leighton
On Sun, Jan 25, 2009 at 3:55 PM, Roumen Petrov bugtr...@roumenpetrov.info wrote: Luke Kenneth Casson Leighton wrote: [SNIP] Yes it is enough to encapsulate memory allocation and file functions into python shared library. The python provide memory allocation functions, but not all modules

Re: [Python-Dev] microsoft dlls apparently don't support data. implications: PyAPI functions required to access data across modules.

2009-01-25 Thread Luke Kenneth Casson Leighton
On Sun, Jan 25, 2009 at 9:01 AM, Matthieu Brucher matthieu.brucher at gmail.com wrote: 2009/1/25 Luke Kenneth Casson Leighton lkcl at lkcl.net: according to the wikipedia entry on dlls, dlls do not support data, only functions. What do you mean by not support data? Having global data

[Python-Dev] future-proofing vector tables for python APIs: binary-module interoperability

2009-01-24 Thread Luke Kenneth Casson Leighton
On Fri, Jan 23, 2009 at 10:48 PM, Roumen Petrov bugtr...@roumenpetrov.info wrote: python.exe (say, the official one) loads python25.dll. Then, an import is made of a ming-wine extension, say foo.pyd, which is linked with libpython2.5.dll, which then gets loaded. Voila, you have two

Re: [Python-Dev] future-proofing vector tables for python APIs: binary-module interoperability

2009-01-24 Thread Luke Kenneth Casson Leighton
but basically, not only is this technique nothing new - it's in use in Apache RunTime, FreeDCE, the NT Kernel, the Linux Kernel - but also This look like simple RPC implemantation. yep. If I remember well SUN-RPC assign number to program, function, version. yep - i forgot about that one:

[Python-Dev] mingw+msys port of python2.7a0 (svn #r68884)

2009-01-24 Thread Luke Kenneth Casson Leighton
http://bugs.python.org/issue5046 mingw+msys port which was previously done against python-2.5.2 has been brought forward to latest subversion r68884. the primary reason for initially doing python 2.5.2 was to 1) stay out of the way of primary python development 2) provide some hope for those

Re: [Python-Dev] compiling python2.5 (msys+mingw+wine) - giving up using msvcr80 assemblies for now

2009-01-22 Thread Luke Kenneth Casson Leighton
On Wed, Jan 21, 2009 at 9:13 PM, Martin v. Löwis mar...@v.loewis.de wrote: ok, so - different from what's being generated by ./configure under msys under wine or native win32 - what's being generated (libpython 2 . 5 . a and libpython 2 . 5 . dll . a) is more akin to the cygwin environment.

Re: [Python-Dev] compiling python2.5 (msys+mingw+wine) - giving up using msvcr80 assemblies for now

2009-01-22 Thread Luke Kenneth Casson Leighton
On Thu, Jan 22, 2009 at 9:18 AM, Amaury Forgeot d'Arc amaur...@gmail.com wrote: or, is the .pyd loading a bit cleverer (or perhaps a bit less cleverer) than i'm expecting it to be? On Windows, you must turn on the --enable_shared option if you want to build extension modules. You could take

Re: [Python-Dev] compiling python2.5 (msys+mingw+wine) - giving up using msvcr80 assemblies for now

2009-01-22 Thread Luke Kenneth Casson Leighton
On Thu, Jan 22, 2009 at 6:43 PM, Martin v. Löwis mar...@v.loewis.de wrote: I can't comment on that, because I don't know what your port does. Does it not produce a .dll containing the majority of Python? no, it contains the minimal necessary amount of python modules, exactly like when python

Re: [Python-Dev] compiling python2.5 (msys+mingw+wine) - giving up using msvcr80 assemblies for now

2009-01-22 Thread Luke Kenneth Casson Leighton
That doesn't really matter, I guess. An extension module build by your port will either fail to load into the regular Python (if libpython2.5.dll is not found), or load and then crash (because it uses a different copy of the Python runtime). Likewise vice versa. excellent, excellent that's

Re: [Python-Dev] compiling python2.5 (msys+mingw+wine) - giving up using msvcr80 assemblies for now

2009-01-22 Thread Luke Kenneth Casson Leighton
On Thu, Jan 22, 2009 at 8:17 PM, Martin v. Löwis mar...@v.loewis.de wrote: am i right? You should test that. I'm not sure whether it will crash (in particular, it might not on load), but it *might* crash, or fail in strange ways (e.g. when it checks whether something is a string, and decides

Re: [Python-Dev] compiling python2.5 (msys+mingw+wine) - giving up using msvcr80 assemblies for now

2009-01-22 Thread Luke Kenneth Casson Leighton
On Thu, Jan 22, 2009 at 8:22 PM, Martin v. Löwis mar...@v.loewis.de wrote: This doesn't seem to be distributing binaries. sourceforge page. i checked the statistics, there don't seem to be very many hits (sorry to hear that don, if you're reading this!) ok. there _is_ a sourceforge

Re: [Python-Dev] compiling python2.5 (msys+mingw+wine) - giving up using msvcr80 assemblies for now

2009-01-22 Thread Luke Kenneth Casson Leighton
On Thu, Jan 22, 2009 at 9:09 PM, Martin v. Löwis mar...@v.loewis.de wrote: mrmmm... how? apps won't end up loading _both_ libpython2.5.dll _and_ python25.dll (or libpython2.N.dll and python2N.dll) will they? Of course they will! yeah, silly - i worked that out juust after i pressed send.

Re: [Python-Dev] compiling python2.5 (msys+mingw+wine) - giving up using msvcr80 assemblies for now

2009-01-22 Thread Luke Kenneth Casson Leighton
On Fri, Jan 23, 2009 at 6:36 AM, Luke Kenneth Casson Leighton l...@lkcl.net wrote: On Thu, Jan 22, 2009 at 9:09 PM, Martin v. Löwis mar...@v.loewis.de wrote: mrmmm... how? apps won't end up loading _both_ libpython2.5.dll _and_ python25.dll (or libpython2.N.dll and python2N.dll

Re: [Python-Dev] compiling python2.5 (msys+mingw+wine) - giving up using msvcr80 assemblies for now

2009-01-22 Thread Luke Kenneth Casson Leighton
On Thu, Jan 22, 2009 at 10:16 PM, Mark Hammond skippy.hamm...@gmail.com wrote: On 23/01/2009 7:01 AM, Luke Kenneth Casson Leighton wrote: That doesn't really matter, I guess. An extension module build by your port will either fail to load into the regular Python (if libpython2.5.dll

Re: [Python-Dev] compiling python2.5 (msys+mingw+wine) - giving up using msvcr80 assemblies for now

2009-01-21 Thread Luke Kenneth Casson Leighton
It only becomes a problem when someone wants to both support Windows users of their extension modules with pre-built binaries, but *also* doesn't want to set up the appropriate environment for building such binaries (currently a minimum bar of Visual Studio Express on a Windows VM instance).

Re: [Python-Dev] compiling python2.5 (msys+mingw+wine) - giving up using msvcr80 assemblies for now

2009-01-21 Thread Luke Kenneth Casson Leighton
On Tue, Jan 20, 2009 at 9:19 PM, Martin v. Löwis mar...@v.loewis.de wrote: That's a non-starter for anyone who incorporates Python in an existing MSVC-based development environment. surely incorporating libpython2.5.dll.a or libpython2.6.dll.a, along with the .def and the importlib that's

Re: [Python-Dev] compiling python2.5 (msys+mingw+wine) - giving up using msvcr80 assemblies for now

2009-01-21 Thread Luke Kenneth Casson Leighton
next task: beat the crap out of libmsvcr80.a and /mingw/include/*.h, repeat until success. https://sourceforge.net/tracker/index.php?func=detailaid=2134161group_id=2435atid=352435 roumen, it looks like you've been and done that, already - thank you!

[Python-Dev] progress: compiling python2.5 under msys (specifically but not exclusively under wine) with msvcr80

2009-01-21 Thread Luke Kenneth Casson Leighton
this is a progress report on compiling python using entirely free software tools, no proprietary compilers or operating systems involved, yet still linking and successfully running with msvcr80 assemblies. manifests and rc files, which are compiled to internal resources, have been added. various

Re: [Python-Dev] progress: compiling python2.5 under msys (specifically but not exclusively under wine) with msvcr80

2009-01-21 Thread Luke Kenneth Casson Leighton
http://bugs.python.org/issue5010 correction: that's http://bugs.python.org/issue5026 apologies for the mix-up. also,for the msvcrt80 build, it is _essential_ that you use a patched version of mingw32-runtime, see:

Re: [Python-Dev] compiling python2.5 (msys+mingw+wine) - giving up using msvcr80 assemblies for now

2009-01-21 Thread Luke Kenneth Casson Leighton
On Wed, Jan 21, 2009 at 7:42 PM, Martin v. Löwis mar...@v.loewis.de wrote: sorry, martin - i thought the win32 builds generated python25.lib, python25.dll Correct. and python25.def No. so as to fit into the 8.3 filename convention. No. It generates python25.lib because that's the

[Python-Dev] compiling python2.5 (msys+mingw+wine) - giving up using msvcr80 assemblies for now

2009-01-20 Thread Luke Kenneth Casson Leighton
folks, hi, this is a fairly important issue for python development interoperability - martin mentioned that releases of mingw-compiled python, if done with a non-interoperable version of msvcrt, would cause much mayhem. well, compiling python on mingw with msvcr80 _can_ be done; using it can also

Re: [Python-Dev] compiling python2.5 (msys+mingw+wine) - giving up using msvcr80 assemblies for now

2009-01-20 Thread Luke Kenneth Casson Leighton
On Tue, Jan 20, 2009 at 1:11 PM, Tim Lesher tles...@gmail.com wrote: On Tue, Jan 20, 2009 at 08:02, Luke Kenneth Casson Leighton luke.leigh...@googlemail.com wrote: of course - if python for win32 ENTIRELY DROPPED msvc as a development platform, and went for an entirely free software

[Python-Dev] one last go at msvcr80 / msvcr90 assemblies - mingw build of python

2009-01-20 Thread Luke Kenneth Casson Leighton
could someone kindly send me the assembly files that are created by a proprietary win32 build of python2.5, 2.6 and trunk, the ones used to create the dll _and_ the python.exe many thanks. ___ Python-Dev mailing list Python-Dev@python.org

[Python-Dev] compiling python2.5 (msys+mingw+wine) using msvcr80 assemblies

2009-01-19 Thread Luke Kenneth Casson Leighton
folks, hi, after some quiet advice i've tracked down a method for compiling python2.5 using msvcr80 that _will_ actually work both under native win32 and also under wine, but it's a _bit_ dodgy, as i couldn't track down where you're supposed to put Microsoft.VC80.CRT, except in the path of the

Re: [Python-Dev] report on building of python 2.5.2 under msys under wine on linux.

2009-01-17 Thread Luke Kenneth Casson Leighton
hiya roumen, good to hear from you - i've been merging in the work that you did, on mingw native-and-cross compiles. got a couple of questions, will post them in the bugreport ok? On Sat, Jan 17, 2009 at 3:16 PM, Roumen Petrov bugtr...@roumenpetrov.info wrote: Luke Kenneth Casson Leighton wrote

Re: [Python-Dev] report on building of python 2.5.2 under msys under wine on linux.

2009-01-17 Thread Luke Kenneth Casson Leighton
About 5 test fail in emulated environment due bugs in emulator. oh - nearly forgot: several of the ctypes tests fail quite spectacularly :) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

[Python-Dev] off-by-one on ftell on wine, but no regression test to catch it

2009-01-17 Thread Luke Kenneth Casson Leighton
folks, hi, http://bugs.winehq.org/show_bug.cgi?id=16982 related to this: from array import array TESTFN = testfile.txt def fail(x): print x testlines = [ spam, spam and eggs\n, eggs, spam, ham and spam\n, saussages, spam, spam and eggs\n, spam, ham, spam and eggs\n,

[Python-Dev] http://bugs.python.org/issue4977 - assumption that maxint64 fits into long on 32-bit systems

2009-01-17 Thread Luke Kenneth Casson Leighton
this was found as part of the regression tests, compiling python under wine under msys with mingw32. test_maxint64 failed. i tracked it down to the assumption that a long will fit into 32-bits, which obviously... it won't! the simplest case is to add a test for the length of the data string

[Python-Dev] report on building of python 2.5.2 under msys under wine on linux.

2009-01-15 Thread Luke Kenneth Casson Leighton
no, the above subject-line is not a joke: i really _have_ successfully built python2.5.2 by installing wine on linux, then msys under wine, and then mingw32 compiler - no, not the linux mingw32-cross-compiler, the _native_ mingw32 compiler that runs under msys, and then hacking things into

Re: [Python-Dev] report on building of python 2.5.2 under msys under wine on linux.

2009-01-15 Thread Luke Kenneth Casson Leighton
practical decision, due to /bin/sh.exe messing around and stopping python.exe from running! (under cmd.exe it's fine. i have to do a bit more investigation: http://bugs.python.org/issue4956 found it. ___ Python-Dev mailing list

[Python-Dev] [patch] moving file load to AFTER Py_Initialize performed

2009-01-15 Thread Luke Kenneth Casson Leighton
http://bugs.python.org/issue4956 uhn... weird bug, totally left-field scenario (using python under msys under wine under linux) but this rather strange scenario has a situation where loading the filename from the command line cannot be done until _after_ PyInitialize is called. prior to

Re: [Python-Dev] compiling python2.5 on linux under wine

2009-01-09 Thread Luke Kenneth Casson Leighton
On Thu, Jan 8, 2009 at 9:07 PM, Martin v. Löwis mar...@v.loewis.de wrote: i'd just ... much rather be completely independent of proprietary software when it comes to building free software. I guess my question is then: why do you want to use Windows in the first place? ha ha :) the same

Re: [Python-Dev] compiling python2.5 on linux under wine

2009-01-08 Thread Luke Kenneth Casson Leighton
On Thu, Jan 8, 2009 at 12:42 PM, Simon Cross hodgestar+python...@gmail.com wrote: On Sat, Jan 3, 2009 at 11:22 PM, Luke Kenneth Casson Leighton l...@lkcl.net wrote: secondly, i want a python25.lib which i can use to cross-compile modules for poor windows users _despite_ sticking to my

Re: [Python-Dev] compiling python2.5 on linux under wine

2009-01-08 Thread Luke Kenneth Casson Leighton
On Thu, Jan 8, 2009 at 1:11 PM, David Cournapeau courn...@gmail.com wrote: On Thu, Jan 8, 2009 at 9:42 PM, Simon Cross hodgestar+python...@gmail.com wrote: On Sat, Jan 3, 2009 at 11:22 PM, Luke Kenneth Casson Leighton l...@lkcl.net wrote: secondly, i want a python25.lib which i can use

Re: [Python-Dev] compiling python2.5 on linux under wine

2009-01-08 Thread Luke Kenneth Casson Leighton
anyway, i'm floundering around a bit and making a bit of a mess of the code, looking for where LONG_MAX is messing up. fixed with this: PyObject * PyInt_FromSsize_t(Py_ssize_t ival) { if ((long)ival = (long)LONG_MIN (long)ival = (long)LONG_MAX) { return

Re: [Python-Dev] compiling python2.5 on linux under wine

2009-01-08 Thread Luke Kenneth Casson Leighton
next bug: distutils.sysconfig.get_config_var('srcdir') is returning None (!!) ok ... actually, that's correct. oops. sysconfig.get_config_vars() only returns these, on win32: {'EXE': '.exe', 'exec_prefix': 'Z:\\mnt\\src\\python2.5-2.5.2', 'LIBDEST': 'Z:\\mnt\\src\\python2.5-2.5.2\\Lib',

[Python-Dev] compiling python2.5 on linux under wine

2009-01-03 Thread Luke Kenneth Casson Leighton
hey, has anyone investigated compiling python2.5 using winegcc, under wine? i'm presently working my way through it, just for kicks, and was wondering if anyone would like to pitch in or stare at the mess under a microscope. it's not as crazed as it sounds. cross-compiling python2.5 for win32

[Python-Dev] preliminary findings of compiling python to javascript and running it under google V8

2008-09-26 Thread Luke Kenneth Casson Leighton
http://groups.google.com/group/pyjamas-dev/browse_thread/thread/5e14ac70508112e5/53ca0b8190f35e21?hl=en#53ca0b8190f35e21 may be of interest to some people. ___ Python-Dev mailing list Python-Dev@python.org

[Python-Dev] http://bugs.python.org/issue708007 - telnetpopen

2008-05-29 Thread Luke Kenneth Casson Leighton
my apologies, i found the issue closed after doing a search for my own work, requiring (again) the telnetlib code for yet another project. since 2001, the work done has been reimplemented time and time again, by different individuals, in different projects, in different ways, all solving exactly