[PATCH 0 of 5] using ctypes on Windows

Adrian Buehlmann adrian at cadifra.com
Tue Feb 8 13:12:36 CST 2011


On 2011-02-08 19:28, Steve Borho wrote:
> On Tue, Feb 8, 2011 at 12:07 PM, Adrian Buehlmann <adrian at cadifra.com> wrote:
>> On 2011-02-08 18:05, Dirkjan Ochtman wrote:
>>> On Tue, Feb 8, 2011 at 17:52, Adrian Buehlmann <adrian at cadifra.com> wrote:
>>>> The first patch ports win32.py to using Python's ctypes library
>>>> on Windows (replacing pywin32).
>>>
>>> For those following along at home, can you outline (or point to a
>>> previous outline) why this is better?
>>
>> I think for those actually knowing and using the Windows platform it is
>> quite obvious.
>>
>> See also pmezard's previous remarks on this list.
> 
> Removing the dependency on pywin32 is a big win, going forward.  It's
> one less configuration to worry about, and a lot less baggage to carry
> in the binary installers.  pywin32 and demandimport have never played
> well together.
> 

As often, the driving factors are a bit subtler. But it's indeed a win
not having to depend on pywin32. One less layer of obscurity. (And think
also of pure mercurial.)

Especially given that Mercurial needs just very sparse access to the
Windows API.

We only need to go to the "bare Windows metal" in a few rather obscure
occasions -- but there we really need it and we need to care about every
ugly hairy angle of it (see the epic hardlink odyssey).

Whereas pywin32 tries to give very broad access to the Windows API, but
it still obscures it and it's not clear to me how pywin32 will be
carried on in the future. Especially since there is now the more
versatile and powerful access to the full Windows API using ctypes.



More information about the Mercurial-devel mailing list