[PATCH STABLE] windows: make win32 mandatory (issue1922)

Steve Borho steve at borho.org
Sat Jan 22 16:48:26 CST 2011


On Sat, Jan 22, 2011 at 3:53 PM, Adrian Buehlmann <adrian at cadifra.com> wrote:
> On 2011-01-22 20:06, Patrick Mézard wrote:
>> Le 20/01/11 20:04, Adrian Buehlmann a écrit :
>>> On 2011-01-20 19:59, Aaron Cohen wrote:
>>>> Would using ctypes directly help?
>>>
>>> Yeah. ctypes are cool. But they require python 2.5.
>>
>> Still, requiring python 2.5 on Windows might not be such a big deal considering the advantages it might bring:
>> - It's standard
>> - In theory, with some work, it may replace pywin32 completely. I don't know if there are any issues with 32bits vs 64 bits OS.
>> - Who knows, it may improve the situation with pure module
>
> I was thinking the same about replacing pywin32, but:
>
> - How mature is this ctypes thing?
> - Is it used? = Does it work as expected? (in my experience,
>  things which are not used by lots of people tend to have more
>  bugs)
> - What about speed? Isn't there a lot of forth and back
>  going on between the types inside the dll's and the
>  Python objects?
>
> I must say though I have absolutely no experience with ctypes,
> so this might be pure FUD and ctypes are just fine.
>
> At the moment I have a pretty good feeling about my C
> implementation of nlinks() I sent in the other patch today.
> I played quite a lot with it, also together with my fsdebug
> extension [1]. nlinks() is such a basic building block for mercurial,
> it should really be rock solid, best using tried and known technology.
> And interfacing to C seems to be a pretty mature part of Python.
> But getting everything correct in the C part isn't easy, my
> C code patch might even be too risky for stable (although it is
> quite analogous to the posixfile C code, so there is some reuse
> of known successful coding patterns there.)
>
> Another question is: is anyone actually using pure mercurial on
> Windows?

setup.py uses the pure extensions to build the version file.  Beyond
that, it's difficult to guess.  My guess is the number of regular pure
users > number of Python 2.4 users on Windows.

> I'm already lucky enough if I get everything working
> as intended using the canonical mercurial code (i.e. using the
> parts in C).
>
> But there are two questions here:
> - What shall we do with this current hardlink bug in stable?
>  Is it a problem to now require pywin32? Or not? I wasn't entirely
>  clear about Mads' opinion on that. IHMO, this new hardlink bug is
>  pretty serious. After all Mercurial is corrupting its own
>  repositories...

FWIW, I'm +1 on requiring pywin32.  It's one less variable to deal with.

> - What's the general plan for interfacing with the Windows API on
>  the default branch?
>
> [1] https://bitbucket.org/abuehl/fsdebug
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>



-- 
Steve Borho


More information about the Mercurial-devel mailing list