<div class="gmail_quote">On Mon, Oct 1, 2012 at 1:24 AM, Christian Heimes <span dir="ltr"><<a href="mailto:christian@python.org" target="_blank">christian@python.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I like your basic approach but I'm suggesting a slightly different<br>
approach. Before I explain my proposal I like to get a naming convention<br>
straight.<br>
<br>
integrated tz database<br>
----------------------<br>
<br>
A copy of the Olson database that is shipped with every version of<br>
Python (not just Windows). The integrated database is updated with every<br>
feature release of Python.<br>
<br>
<br>
system tz database<br>
------------------<br>
<br>
That's an interface to the operating system's or platform's tz database.<br>
We probably have to provide multiple backends for different OSes, Java etc.<br>
<br>
<br>
update tz database<br>
------------------<br>
<br>
A PyPI package that contains a current version of the Olson database. A<br>
new version of the update tz should be provided by the Python core<br>
developer team every time a new Olson database is available. The<br>
updatetz must never be distributed with the Python source code and shall<br>
not be installed by a distributor.<br>
Optionally we can include the code that creates an update tz package<br>
from a Olson database.<br>
<br>
<br>
By default Python tries to load the updatetz first, then systemtz (if<br>
available) and finally the integratedtz. A user can query the status and<br>
version of the databases, set and get the currently used database with<br>
three functions. The used database can also be set with an environment<br>
variable:<br>
<br>
datetime.gettzdatabase() -> "integrated" or "system" or "update"<br>
datetime.settzdatabase(name)<br>
datetime.listtzdatabases() -><br>
{"integrated": "version",<br>
"system": "???"<br>
"update": "version", # only if an update tz db is installed<br>
}<br>
PYTHON_TZDB = "integrated" or "system" or "update"<br>
<br>
With this setup users get the full benefit of system updates but can use<br>
the integrated or update database if they don't like the operating<br>
system's data.<br></blockquote><div> </div><div>I don't want to default to a database that is guaranteed to be out of date. I don't see the purpose. This is also why I'm skeptical at including the data on Windows.</div>
<div><br></div><div>//Lennart</div></div>