Author erik flister
Recipients erik flister, eryksun, paul.moore, steve.dower, tim.golden, zach.ware
Date 2015-06-13.18:15:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1434219315.28.0.871752264992.issue24429@psf.upfronthosting.co.za>
In-reply-to
Content
> About the only possible solution here would be to special case ctypes to detect msvcr90 as a parameter (later versions of the CRT don't need it) and also whether another activation context already exists. We could also document the need for a complete manifest in the embedding docs. 

i'm not following why it's a special case, or why later versions wouldn't have the same problem?  isn't this a problem for any DLLs that the embedding context may have loaded that would conflict with DLLs that python depends on?  python's DLL already has the necessary "complete manifest," right?  as long as CDLL does the proper context manipulations, client code shouldn't have to worry about whether it's running embedded, right?  

what is the purpose of ctypes.cdll.msvcrt if no one is supposed to use it?  there is also "import msvcrt" which is apparently a subset of what you get from find_library('c'), so would need the same fix?

> All of this really only affects 2.7, as later versions of Python don't necessarily suffer the same limitation (unless someone wants to load msvcr90 explicitly).

what changed that avoids the problem?  perhaps that fix can be applied to 2.7?

> What functionality do you need that you can't get some other way (such as the msvcrt module)? Or is it just the uuid issue?

innocent ol' me was just trying to import shapely from matlab - they call find_library('c') and need the 'free' function.  i don't think they ever malloc -- they depend on a geos_c.dll, which must do the allocations and is built on whatever msvcrt was used for python?  probably a better design would be for geos_c.dll to export its own free function?  but afaiu, geos_c.dll comes from a totally different (more legacy?) project, not python related...  shapely is a dependency of the library i actually need, which also uses uuid.  uuid is the only case i can find in the standard libraries that also calls find_library('c').  manually changing those calls allowed me to successfully import everything from matlab.  ctypes and distutils also mention msvc* a lot, obviously...  getpass.py and multiprocessing and subprocess use "import msvcrt".
History
Date User Action Args
2015-06-13 18:15:15erik flistersetrecipients: + erik flister, paul.moore, tim.golden, zach.ware, eryksun, steve.dower
2015-06-13 18:15:15erik flistersetmessageid: <1434219315.28.0.871752264992.issue24429@psf.upfronthosting.co.za>
2015-06-13 18:15:15erik flisterlinkissue24429 messages
2015-06-13 18:15:14erik flistercreate