[Python-Dev] No manifest files on Windows?

Mark Hammond mhammond at skippinet.com.au
Sat Oct 25 02:47:26 CEST 2008


> Mark Hammond schrieb:
> >> In http://bugs.python.org/issue4120, the author suggests that it
> might
> >> be possible to completely stop using the manifest mechanism, for VS
> >> 2008. Given the many problems that this SxS stuff has caused, this
> >> sounds like a very desirable route, although I haven't done any
> actual
> >> testing yet.
> >>
> >> Can all the Windows experts please comment? Could that work? Does it
> >> have any downsides?
> >>
> >> If it works, I would like to apply it to 3.0, although I probably
> >> won't be able to apply it to tomorrow's rc. Would it also be
> possible
> >> to change that in 2.6.1 (even though python26.dll in 2.6.0 already
> >> includes a manifest, as do all the pyd files)?
> >
> > My take is that the bug is suggesting the manifest be dropped only
> from .pyd
> > files.  Python's executable and DLL will still have the manifest
> reference,
> > so the CRT is still loaded from a manifest (FWIW, the CRT will
> abort() if
> > initialized other than via a manifest!).
> 
> What about COM objects: isn't pythoncom26.dll or _ctypes.pyd the first
> executable
> image that is loaded first for them?  And how would they load the crt?

Yeah - I don't think the manifest could be dropped from these files.
pythoncom is already loaded magically, but it would make sense to ensure the
patch is setup such that an extension can still request a manifest as normal
for the special cases when it is needed.  I think the vast majority of .pyd
files will not need the manifest...

But I'm surprised it hurts!  I'm surprised that if a .pyd references an
assembly already loaded into the process as a private assembly from another
directory, the load will fail unless there is *another* copy of the private
assembly next to the .pyd (the manifest reference is always a "strong"
reference including versions and hashes, so there is no ambiguity), but at
this stage I'm taking it on faith that the bug as reported does actually
exist - I've only ever tested with shared assembles.

Cheers,

Mark



More information about the Python-Dev mailing list