Comment 11 for bug 271680

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 271680] Re: MIR for python-dateutil

Hi Gustavo,

Gustavo Niemeyer [2008-09-29 11:41 -0000]:
> dateutil has always preferred the installed timezone information when
> it is available. The documented way to ask for a timezone is via the
> dateutil.tz.gettz() function, which will process the system's timezone
> and give precedence to it. The embedded copy is only used if it is
> available, and if the system one isn't found.

Oh, thanks for the explanation. The patch is unnecessary then.

> The patch changes the behavior of dateutil.zoneinfo, which is the
> interface for the embedded copy. It's semantically inappropriate to
> make it look for information in the system, since its only purpose is
> indeed being the embedded copy API, and the generic interface will
> already look for the system timezone information before considering
> the embedded one.

Right, I agree. That wasn't obvious when searching for the place where
the tarball was consulted, and the failing test suite made me think
that this was the official interface. Sorry for not having checked
more carefully.

> It's natural that the tests break if the timezone file isn't found,
> since the unittests verify that the embedded functionality actually
> works. That doesn't mean that the embedded copy has to be shipped,
> though. For Ubuntu, I agree that it's more appropriate to not package
> the tarball file, and simply add a requirement on the package to the
> timezone information (which I believe is already installed by default
> anyway).

Right, will do that.

Guido, that means for the Debian package we don't need the patch, just
the packaging changes (plus a dependency to "tzdata").

Thanks,

Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)