Supporting 2.3...

Petr Kodl petrkodl at gmail.com
Fri Oct 3 05:19:17 CDT 2008


When it comes to compatibility, there is one annoying change between 2.4 and
2.5 only affecting OSError exceptions on Win32. I checked current code and
did not find any place affected. The OSError.errno in <= 2.4 returns error
codes incompatible with errno module, so

try:
excepts OSError,ex:
     if err.errno ..... do something

is potentially risky. In 2.4 and older the errno returns native Win32 error
code. In 2.5 there is a translation performed to errno range and winerror
field is added to return the native code.

Fortunately, at least for single file, the file not exist code matches
between the two.
The "directory not exist" does not - windows return ESCHR in that case - aka
no such process - but I looked through existing mercurial code and in call
cases the error number checking is used for individual file operations, not
directories.

Not exactly to the point, but might be worth putting a note on wiki in case
somebody runs into this.

Petr


On Thu, Oct 2, 2008 at 11:06 PM, Matt Mackall <mpm at selenic.com> wrote:

>
> On Thu, 2008-10-02 at 22:45 -0400, Douglas Philips wrote:
> > On or about 2008 Oct 2, at 7:41 PM, Matt Mackall indited:
> > > We are supporting -2.3- for the foreseeable future.
> >
> > I found that in passing on
> http://www.selenic.com/mercurial/wiki/index.cgi/BasicCodingStyle
> >   but a search on the wiki for 2.3 didn't reveal any explanation.
> > "Because I said so" is one explanation, but I am curious if there is
> > more to it than that...
>
> There are two reasons we'd drop 2.3 support:
>
> - 2.3 becomes too difficult to support
> - some future version of Python introduces a feature we deem is
> essential than supporting all earlier versions
>
> The first is simply a matter of running the test suite with 2.3 every
> once in a while.
>
> The second isn't likely to happen simply because we've already gone a
> couple revisions without it happening. There have been a couple minor
> syntax improvements in 2.4 and 2.5, but nothing revolutionary. There's
> simply no feature I'm just itching to use in 2.4 that 2.3 compatibility
> is hold back.
>
> --
> Mathematics is the supreme nostalgia of our time.
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://selenic.com/pipermail/mercurial-devel/attachments/20081003/446a8ae3/attachment.htm 


More information about the Mercurial-devel mailing list