On Mon, Oct 1, 2012 at 1:24 AM, Christian Heimes <christ...@python.org>wrote:
> I like your basic approach but I'm suggesting a slightly different > approach. Before I explain my proposal I like to get a naming convention > straight. > > integrated tz database > ---------------------- > > A copy of the Olson database that is shipped with every version of > Python (not just Windows). The integrated database is updated with every > feature release of Python. > > > system tz database > ------------------ > > That's an interface to the operating system's or platform's tz database. > We probably have to provide multiple backends for different OSes, Java etc. > > > update tz database > ------------------ > > A PyPI package that contains a current version of the Olson database. A > new version of the update tz should be provided by the Python core > developer team every time a new Olson database is available. The > updatetz must never be distributed with the Python source code and shall > not be installed by a distributor. > Optionally we can include the code that creates an update tz package > from a Olson database. > > > By default Python tries to load the updatetz first, then systemtz (if > available) and finally the integratedtz. A user can query the status and > version of the databases, set and get the currently used database with > three functions. The used database can also be set with an environment > variable: > > datetime.gettzdatabase() -> "integrated" or "system" or "update" > datetime.settzdatabase(name) > datetime.listtzdatabases() -> > {"integrated": "version", > "system": "???" > "update": "version", # only if an update tz db is installed > } > PYTHON_TZDB = "integrated" or "system" or "update" > > With this setup users get the full benefit of system updates but can use > the integrated or update database if they don't like the operating > system's data. > 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. //Lennart
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com