[Python-Dev] Draft PEP for time zone support.
Terry Reedy
tjreedy at udel.edu
Thu Dec 13 21:45:59 CET 2012
On 12/13/2012 4:07 AM, Lennart Regebro wrote:
> On Thu, Dec 13, 2012 at 9:22 AM, Terry Reedy <tjreedy at udel.edu> wrote:
>> On 12/13/2012 1:06 AM, Lennart Regebro wrote:
>>> All in all I would say I would prefer to install this per Python.
>>
>> Then explicit update requires multiple downloads or copying. This is a
>> violation of DRY. If if is not too large, it would not hurt to never delete
>> it.
>
> Yes, but this is no different that if you want to keep any library
> updated over multiple Python versions.
How I do that for my multi-version packages is to put them in a separate
'python' directory and put python.pth with the path to that directory in
the various site-packages directories. Any change to the *one* copy is
available to all versions and all will operate the same if the code is
truly multi-version. When I installed 3.3, I copied python.pth into its
site-packages and was ready to go.
> And I don't want to invent another installation procedure
> that works for just this,
An email or so ago, you said that the tz database should go in
C:\programdata (which currently does not exist on my machine either).
That would be a new, invented installation procedure.
> or have a little script that checks periodically
> for updates only for this,
> adding to the plethora of update checkers on windows already.
I *never* suggested this. In fact, I said that installing an updated
database (available to all Python versions) with each release would be
sufficient for nearly everyone on Windows.
> either keep your Python and it's libraries updated or you do not, I
> don't think this is any different,and I think it should have the
> exact same mechanisms and functions as all other third-party PyPI
> packages.
When I suggested that users be able to put the database where they want,
*just like with any other third-party package PyPI package*, you are the
one who said no, this should be special cased.
The situation is this: most *nixes have or can have one system tz
database. Python code that uses it will give the same answer regardless
of the Python version. Windows apparently does not have such a thing. So
we can
a) not use the tz database in the stdlib because it would not work on
Windows (the defacto current situation);
b) use it but let the functions fail on Windows;
c) install a different version of the database with each Python
installation, that can only be used by that installation, so that
results may depend on the Python version. (This seem to be what you are
now proposing, and if bugfix releases update the data only for that
version, could result in earlier versions giving more accurate answers.);
d) install one database at a time so all Python versions give the same
answer, just as on *nix.
--
Terry Jan Reedy
More information about the Python-Dev
mailing list