Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Dev

Re: cpython (2.7): Issue #14448: mention pytz; patch by Andrew Svetlov

 

 

Python dev RSS feed   Index | Next | Previous | View Threaded


g.brandl at gmx

Apr 25, 2012, 12:37 AM

Post #1 of 7 (288 views)
Permalink
Re: cpython (2.7): Issue #14448: mention pytz; patch by Andrew Svetlov

On 24.04.2012 19:48, sandro.tosi wrote:
> http://hg.python.org/cpython/rev/e0e421133d0f
> changeset: 76532:e0e421133d0f
> branch: 2.7
> parent: 76527:22767284de99
> user: Sandro Tosi <sandro.tosi [at] gmail>
> date: Tue Apr 24 19:43:33 2012 +0200
> summary:
> Issue #14448: mention pytz; patch by Andrew Svetlov
>
> files:
> Doc/library/datetime.rst | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
>
> diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst
> --- a/Doc/library/datetime.rst
> +++ b/Doc/library/datetime.rst
> @@ -1521,6 +1521,14 @@
> other fixed-offset :class:`tzinfo` subclass (such as a class representing only
> EST (fixed offset -5 hours), or only EDT (fixed offset -4 hours)).
>
> +.. seealso::
> +
> + `pytz <http://pypi.python.org/pypi/pytz/>`_
> + The Standard Library has no :class:`tzinfo` instances except for UTC, but

^^^^^^^^^^^^^^^^ we don't capitalize "standard library"

> + it exists a third-party library which brings Olson timezone database to

^^ there ^ the

Also, I'm not sure everybody knows what the "Olson database" is, so maybe that
should be explained too.

cheers,
Georg

_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


sandro.tosi at gmail

Apr 25, 2012, 1:21 AM

Post #2 of 7 (279 views)
Permalink
Re: cpython (2.7): Issue #14448: mention pytz; patch by Andrew Svetlov [In reply to]

Hi Georg,
thanks for the review!

On Wed, Apr 25, 2012 at 09:37, Georg Brandl <g.brandl [at] gmx> wrote:
> On 24.04.2012 19:48, sandro.tosi wrote:
>> http://hg.python.org/cpython/rev/e0e421133d0f
>> changeset:   76532:e0e421133d0f
>> branch:      2.7
>> parent:      76527:22767284de99
>> user:        Sandro Tosi <sandro.tosi [at] gmail>
>> date:        Tue Apr 24 19:43:33 2012 +0200
>> summary:
>>   Issue #14448: mention pytz; patch by Andrew Svetlov
>>
>> files:
>>   Doc/library/datetime.rst |  8 ++++++++
>>   1 files changed, 8 insertions(+), 0 deletions(-)
>>
>>
>> diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst
>> --- a/Doc/library/datetime.rst
>> +++ b/Doc/library/datetime.rst
>> @@ -1521,6 +1521,14 @@
>>  other fixed-offset :class:`tzinfo` subclass (such as a class representing only
>>  EST (fixed offset -5 hours), or only EDT (fixed offset -4 hours)).
>>
>> +.. seealso::
>> +
>> +   `pytz <http://pypi.python.org/pypi/pytz/>`_
>> +      The Standard Library has no :class:`tzinfo` instances except for UTC, but
>
>             ^^^^^^^^^^^^^^^^ we don't capitalize "standard library"
>
>> +      it exists a third-party library which brings Olson timezone database to
>
>         ^^ there                                    ^ the

sigh, you're right: I'll fix them once the below point is clarified

> Also, I'm not sure everybody knows what the "Olson database" is, so maybe that
> should be explained too.

I had considered that, but then I found another reference of "Olson
database" in an example right before the seealso note, so I left it as
it is. On a second thought, it might be better to clarify what Olson
db is, do you think a link (f.e to here:
http://www.iana.org/time-zones ) could be enough or (or in addition)
also a brief note is needed?

cheers,
--
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


ncoghlan at gmail

Apr 25, 2012, 2:55 AM

Post #3 of 7 (277 views)
Permalink
Re: cpython (2.7): Issue #14448: mention pytz; patch by Andrew Svetlov [In reply to]

On Wed, Apr 25, 2012 at 6:21 PM, Sandro Tosi <sandro.tosi [at] gmail> wrote:
> On Wed, Apr 25, 2012 at 09:37, Georg Brandl <g.brandl [at] gmx> wrote:
>> Also, I'm not sure everybody knows what the "Olson database" is, so maybe that
>> should be explained too.
>
> I had considered that, but then I found another reference of "Olson
> database" in an example right before the seealso note, so I left it as
> it is. On a second thought, it might be better to clarify what Olson
> db is, do you think a link (f.e to here:
> http://www.iana.org/time-zones ) could be enough or (or in addition)
> also a brief note is needed?

I think another "see also" with a link to that page would be
appropriate. With maintenance of the database transferred to the IANA,
I'd also rephrase the reference as the "IANA timezone database (also
known as the Olson database)"

Cheers,
Nick.

--
Nick Coghlan   |   ncoghlan [at] gmail   |   Brisbane, Australia
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


sandro.tosi at gmail

Apr 25, 2012, 10:21 AM

Post #4 of 7 (281 views)
Permalink
Re: cpython (2.7): Issue #14448: mention pytz; patch by Andrew Svetlov [In reply to]

On Wed, Apr 25, 2012 at 11:55, Nick Coghlan <ncoghlan [at] gmail> wrote:
> On Wed, Apr 25, 2012 at 6:21 PM, Sandro Tosi <sandro.tosi [at] gmail> wrote:
>> On Wed, Apr 25, 2012 at 09:37, Georg Brandl <g.brandl [at] gmx> wrote:
>>> Also, I'm not sure everybody knows what the "Olson database" is, so maybe that
>>> should be explained too.
>>
>> I had considered that, but then I found another reference of "Olson
>> database" in an example right before the seealso note, so I left it as
>> it is. On a second thought, it might be better to clarify what Olson
>> db is, do you think a link (f.e to here:
>> http://www.iana.org/time-zones ) could be enough or (or in addition)
>> also a brief note is needed?
>
> I think another "see also" with a link to that page would be
> appropriate. With maintenance of the database transferred to the IANA,
> I'd also rephrase the reference as the "IANA timezone database (also
> known as the Olson database)"

Ah yes, I like that; what about this change (where the IANA tz db
section is brutally copied from their website):

diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst
--- a/Doc/library/datetime.rst
+++ b/Doc/library/datetime.rst
@@ -1524,12 +1524,19 @@
.. seealso::

`pytz <http://pypi.python.org/pypi/pytz/>`_
- The Standard Library has no :class:`tzinfo` instances except for UTC, but
- it exists a third-party library which brings Olson timezone database to
- Python: `pytz`.
+ The standard library has no :class:`tzinfo` instances except for UTC, but
+ there exists a third-party library which brings the `IANA timezone
+ database` (also known as the Olson database) to Python: `pytz`.

`pytz` contains up-to-date information and its usage is recommended.

+ `IANA timezone database <http://www.iana.org/time-zones>`_
+ The Time Zone Database (often called tz or zoneinfo) contains code and
+ data that represent the history of local time for many representative
+ locations around the globe. It is updated periodically to reflect changes
+ made by political bodies to time zone boundaries, UTC offsets, and
+ daylight-saving rules.
+
.. _strftime-strptime-behavior:

Cheers,
--
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


g.brandl at gmx

Apr 25, 2012, 11:40 AM

Post #5 of 7 (280 views)
Permalink
Re: cpython (2.7): Issue #14448: mention pytz; patch by Andrew Svetlov [In reply to]

On 25.04.2012 19:21, Sandro Tosi wrote:
> On Wed, Apr 25, 2012 at 11:55, Nick Coghlan <ncoghlan [at] gmail> wrote:
>> On Wed, Apr 25, 2012 at 6:21 PM, Sandro Tosi <sandro.tosi [at] gmail> wrote:
>>> On Wed, Apr 25, 2012 at 09:37, Georg Brandl <g.brandl [at] gmx> wrote:
>>>> Also, I'm not sure everybody knows what the "Olson database" is, so maybe that
>>>> should be explained too.
>>>
>>> I had considered that, but then I found another reference of "Olson
>>> database" in an example right before the seealso note, so I left it as
>>> it is. On a second thought, it might be better to clarify what Olson
>>> db is, do you think a link (f.e to here:
>>> http://www.iana.org/time-zones ) could be enough or (or in addition)
>>> also a brief note is needed?
>>
>> I think another "see also" with a link to that page would be
>> appropriate. With maintenance of the database transferred to the IANA,
>> I'd also rephrase the reference as the "IANA timezone database (also
>> known as the Olson database)"
>
> Ah yes, I like that; what about this change (where the IANA tz db
> section is brutally copied from their website):
>
> diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst
> --- a/Doc/library/datetime.rst
> +++ b/Doc/library/datetime.rst
> @@ -1524,12 +1524,19 @@
> .. seealso::
>
> `pytz <http://pypi.python.org/pypi/pytz/>`_
> - The Standard Library has no :class:`tzinfo` instances except for UTC, but
> - it exists a third-party library which brings Olson timezone database to
> - Python: `pytz`.
> + The standard library has no :class:`tzinfo` instances except for UTC, but
> + there exists a third-party library which brings the `IANA timezone
> + database` (also known as the Olson database) to Python: `pytz`.
>
> `pytz` contains up-to-date information and its usage is recommended.

BTW, the single backticks don't do anything usable; use *pytz* to make something
emphasized.

> + `IANA timezone database <http://www.iana.org/time-zones>`_
> + The Time Zone Database (often called tz or zoneinfo) contains code and
> + data that represent the history of local time for many representative
> + locations around the globe. It is updated periodically to reflect changes
> + made by political bodies to time zone boundaries, UTC offsets, and
> + daylight-saving rules.
> +

Maybe it's useful to mention that that database is the one used on Linux (is
it on other Unices?) and Windows has its own?

Georg

_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


ncoghlan at gmail

Apr 25, 2012, 6:06 PM

Post #6 of 7 (273 views)
Permalink
Re: cpython (2.7): Issue #14448: mention pytz; patch by Andrew Svetlov [In reply to]

On Thu, Apr 26, 2012 at 4:40 AM, Georg Brandl <g.brandl [at] gmx> wrote:
> Maybe it's useful to mention that that database is the one used on Linux (is
> it on other Unices?) and Windows has its own?

pytz always uses the Olson/IANA database. I don't think we need to
confuse matters further by mentioning the fact that Microsoft invented
their own system without worrying about what anyone else was doing.

Cheers,
Nick.

--
Nick Coghlan   |   ncoghlan [at] gmail   |   Brisbane, Australia
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


sandro.tosi at gmail

Apr 28, 2012, 2:18 AM

Post #7 of 7 (268 views)
Permalink
Re: cpython (2.7): Issue #14448: mention pytz; patch by Andrew Svetlov [In reply to]

On Wed, Apr 25, 2012 at 20:40, Georg Brandl <g.brandl [at] gmx> wrote:
> BTW, the single backticks don't do anything usable; use *pytz* to make something
> emphasized.

yep, done.

On Thu, Apr 26, 2012 at 03:06, Nick Coghlan <ncoghlan [at] gmail> wrote:
> On Thu, Apr 26, 2012 at 4:40 AM, Georg Brandl <g.brandl [at] gmx> wrote:
>> Maybe it's useful to mention that that database is the one used on Linux (is
>> it on other Unices?) and Windows has its own?
>
> pytz always uses the Olson/IANA database. I don't think we need to
> confuse matters further by mentioning the fact that Microsoft invented
> their own system without worrying about what anyone else was doing.

I agree with that, so i'm about to commit a very similar diff than the
one posted here.

Thanks for your suggestions!

--
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com

Python dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.