Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2013-01-08 Thread Nick Coghlan
On Wed, Jan 9, 2013 at 5:02 AM, Brett Cannon wrote: > On Tue, Jan 8, 2013 at 1:08 PM, Lennart Regebro wrote: >> Alternative names for the timezone() function is get_timezone(), which has >> already been rejected, and zoneinfo() which makes it clear that it's only >> zoneinfo timezones that are re

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2013-01-08 Thread Brett Cannon
On Tue, Jan 8, 2013 at 1:08 PM, Lennart Regebro wrote: > On Fri, Dec 28, 2012 at 10:12 PM, Ronald Oussoren > wrote: >> >> >> On 28 Dec, 2012, at 21:23, Lennart Regebro wrote: >> >> > Happy Holidays! Here is the update of PEP 431 with the changes that >> > emerged after the earlier discussion. >>

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2013-01-08 Thread Lennart Regebro
On Fri, Dec 28, 2012 at 10:12 PM, Ronald Oussoren wrote: > > On 28 Dec, 2012, at 21:23, Lennart Regebro wrote: > > > Happy Holidays! Here is the update of PEP 431 with the changes that > emerged after the earlier discussion. > > Why is the new timezone support added in a submodule of datetime? Ad

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2013-01-07 Thread Alexander Belopolsky
On Mon, Jan 7, 2013 at 1:06 PM, Brett Cannon wrote: .. > +1 for putting this under datetime; "Namespaces are one honking great > idea". People looking for date stuff is going to look in datetime or > time first so might as well put it there to begin with. +1 for the same reason. _

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2013-01-07 Thread Brett Cannon
On Mon, Jan 7, 2013 at 12:01 PM, Lennart Regebro wrote: > On Sun, Dec 30, 2012 at 10:47 AM, Ronald Oussoren > wrote: >> >> The module could be split into several modules in a package without >> affecting the public API if that would help with maintenance, simular to >> unittest. > > > Is there po

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2013-01-07 Thread Dirkjan Ochtman
On Mon, Jan 7, 2013 at 5:57 PM, Lennart Regebro wrote: > Will this help the makers of distributions, like Ubuntu etc? If that is the > case, then it might be worth doing, otherwise I don't think it's very > useful. As a Gentoo packager, I think it's useful. Cheers, Dirkjan _

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2013-01-07 Thread Lennart Regebro
On Sun, Dec 30, 2012 at 10:47 AM, Ronald Oussoren wrote: > The module could be split into several modules in a package without > affecting the public API if that would help with maintenance, simular to > unittest. > Is there popular support for doing so, ie make datetime into a package, have all

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2013-01-07 Thread Lennart Regebro
On Sat, Dec 29, 2012 at 8:05 PM, Arfrever Frehtes Taifersar Arahesis < arfrever@gmail.com> wrote: > 2012-12-29 19:54:42 Lennart Regebro napisał(a): > > On Sat, Dec 29, 2012 at 7:38 PM, Tres Seaver > wrote: > > > > > - -Lots for enabling fallback by default except on platforms known not > to >

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2012-12-31 Thread Lennart Regebro
On Sun, Dec 30, 2012 at 10:47 AM, Ronald Oussoren wrote: > The module could be split into several modules in a package without > affecting the public API if that would help with maintenance, simular to > unittest. > This is of course true. Maybe that is a good idea. //Lennart ___

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2012-12-30 Thread Steven D'Aprano
On 30/12/12 07:16, Lennart Regebro wrote: If no database is found an ``UnknownTimeZoneError`` or subclass thereof will be raised with a message explaining that no zoneinfo database can be found, but that you can install one with the ``tzdata-update`` package. Why should we car

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2012-12-30 Thread Ronald Oussoren
On 29 Dec, 2012, at 5:48, Lennart Regebro wrote: > On Fri, Dec 28, 2012 at 10:12 PM, Ronald Oussoren > wrote: > > On 28 Dec, 2012, at 21:23, Lennart Regebro wrote: > > > Happy Holidays! Here is the update of PEP 431 with the changes that emerged > > after the earlier discussion. > > Why i

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2012-12-30 Thread Cameron Simpson
On 30Dec2012 07:42, Lennart Regebro wrote: | On Sat, Dec 29, 2012 at 11:55 PM, Cameron Simpson wrote: | | > On 29Dec2012 21:16, Lennart Regebro wrote: | > | On Sat, Dec 29, 2012 at 8:04 PM, Antoine Pitrou | > wrote: | > | > Why should we care about that situation if we *do* provide a database?

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2012-12-29 Thread Lennart Regebro
On Sat, Dec 29, 2012 at 11:59 PM, Terry Reedy wrote: > On 12/29/2012 3:16 PM, Lennart Regebro wrote: > > Yes, but a comprehensible error message is useful even if somebody >> messed up the system/configuration. >> > > Just reuse whatever exception type you create and add a sensible message. > Ho

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2012-12-29 Thread Lennart Regebro
On Sat, Dec 29, 2012 at 11:55 PM, Cameron Simpson wrote: > On 29Dec2012 21:16, Lennart Regebro wrote: > | On Sat, Dec 29, 2012 at 8:04 PM, Antoine Pitrou > wrote: > | > Why should we care about that situation if we *do* provide a database? > | > Distributions can decide to exclude some files fr

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2012-12-29 Thread Terry Reedy
On 12/29/2012 3:16 PM, Lennart Regebro wrote: Yes, but a comprehensible error message is useful even if somebody messed up the system/configuration. Just reuse whatever exception type you create and add a sensible message. Hopefully, it will never be seen. -- Terry Jan Reedy __

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2012-12-29 Thread Cameron Simpson
On 29Dec2012 21:16, Lennart Regebro wrote: | On Sat, Dec 29, 2012 at 8:04 PM, Antoine Pitrou wrote: | > Why should we care about that situation if we *do* provide a database? | > Distributions can decide to exclude some files from their packages, but | > it's their problem, not ours. | | Yes, bu

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2012-12-29 Thread Lennart Regebro
On Sat, Dec 29, 2012 at 8:04 PM, Antoine Pitrou wrote: > On Sat, 29 Dec 2012 19:56:43 +0100 > Lennart Regebro wrote: > > On Sat, Dec 29, 2012 at 7:54 PM, Lennart Regebro > wrote: > > > > > On Sat, Dec 29, 2012 at 7:38 PM, Tres Seaver >wrote: > > > > > >> - -Lots for enabling fallback by defaul

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2012-12-29 Thread Antoine Pitrou
On Sat, 29 Dec 2012 19:56:43 +0100 Lennart Regebro wrote: > On Sat, Dec 29, 2012 at 7:54 PM, Lennart Regebro wrote: > > > On Sat, Dec 29, 2012 at 7:38 PM, Tres Seaver wrote: > > > >> - -Lots for enabling fallback by default except on platforms known not to > >> have their own database > > > > >

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2012-12-29 Thread Arfrever Frehtes Taifersar Arahesis
2012-12-29 19:54:42 Lennart Regebro napisał(a): > On Sat, Dec 29, 2012 at 7:38 PM, Tres Seaver wrote: > > > - -Lots for enabling fallback by default except on platforms known not to > > have their own database > > Well, it's the same thing really. If the platform does have a database, the > fall

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2012-12-29 Thread Lennart Regebro
On Sat, Dec 29, 2012 at 7:54 PM, Lennart Regebro wrote: > On Sat, Dec 29, 2012 at 7:38 PM, Tres Seaver wrote: > >> - -Lots for enabling fallback by default except on platforms known not to >> have their own database > > > Well, it's the same thing really. If the platform does have a database, > t

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2012-12-29 Thread Lennart Regebro
On Sat, Dec 29, 2012 at 7:38 PM, Tres Seaver wrote: > - -Lots for enabling fallback by default except on platforms known not to > have their own database Well, it's the same thing really. If the platform does have a database, the fallback will not be used. Of course, there is the case of the da

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2012-12-29 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/29/2012 01:00 AM, Nick Coghlan wrote: > I'm still a fan of *always* shipping fallback tzdata, regardless of > platform. The stdlib would then look in three places for timezone > data when datetime.timezone was first imported: > > 1. the "tzdat

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2012-12-29 Thread Lennart Regebro
On Sat, Dec 29, 2012 at 7:00 AM, Nick Coghlan wrote: > On Sat, Dec 29, 2012 at 6:23 AM, Lennart Regebro > wrote: > > Happy Holidays! Here is the update of PEP 431 with the changes that > emerged > > after the earlier discussion. > > > > A raw download is here: > > https://raw.github.com/regebro/

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2012-12-29 Thread Dirkjan Ochtman
On Sat, Dec 29, 2012 at 11:45 AM, Antoine Pitrou wrote: >> I'm still a fan of *always* shipping fallback tzdata, regardless of >> platform. The stdlib would then look in three places for timezone data >> when datetime.timezone was first imported: >> >> 1. the "tzdata-update" database >> 2. the OS

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2012-12-29 Thread Antoine Pitrou
On Sat, 29 Dec 2012 16:00:39 +1000 Nick Coghlan wrote: > > > Discussion > > == > > > > Should the windows installer include the data package? > > -- > > > > It has been suggested that the Windows installer should include the data > > pac

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2012-12-28 Thread Nick Coghlan
On Sat, Dec 29, 2012 at 6:23 AM, Lennart Regebro wrote: > Happy Holidays! Here is the update of PEP 431 with the changes that emerged > after the earlier discussion. > > A raw download is here: > https://raw.github.com/regebro/tz-pep/master/pep-04tz.txt For UI purposes, "pytz" has some helpers to

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2012-12-28 Thread Benjamin Peterson
2012/12/28 Lennart Regebro : > It will make the datetime.py twice as long though, and the second longest > module in the stdlib, beaten only by decimal.py. Perhaps this is not a > problem. No one ever accused datetime manipulation of being simple. -- Regards, Benjamin __

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2012-12-28 Thread Lennart Regebro
On Fri, Dec 28, 2012 at 10:12 PM, Ronald Oussoren wrote: > > On 28 Dec, 2012, at 21:23, Lennart Regebro wrote: > > > Happy Holidays! Here is the update of PEP 431 with the changes that > emerged after the earlier discussion. > > Why is the new timezone support added in a submodule of datetime?

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2012-12-28 Thread Ronald Oussoren
On 28 Dec, 2012, at 21:23, Lennart Regebro wrote: > Happy Holidays! Here is the update of PEP 431 with the changes that emerged > after the earlier discussion. Why is the new timezone support added in a submodule of datetime? Adding the new function and exception to datetime itself wouldn't

[Python-Dev] PEP 431 Time zone support improvements - Update

2012-12-28 Thread Lennart Regebro
Happy Holidays! Here is the update of PEP 431 with the changes that emerged after the earlier discussion. A raw download is here: https://raw.github.com/regebro/tz-pep/master/pep-04tz.txt PEP: 431 Title: Time zone support improvements Version: $Revision$ Last-Modified: $Date$ Author: Lennart Rege