(original) (raw)
On Sat, Aug 15, 2015 at 8:49 PM, Alexander Belopolsky <alexander.belopolsky@gmail.com> wrote:
>
> PEP 495 \[1\] is a deliberately minimalistic proposal to remove an
> ambiguity in representing some local times as datetime.datetime
> objects.
A major issue has come up since my announcement above. Tim Peters have noticed that PEP 495 would violate the "hash invariant" unless the fold attribute is accounted for in inter-zone comparisons.
See \[2\] for details. This issue has been resolved by modifying the definition \[3\] of the "==" operator for aware datetimes with post-PEP tzinfo. Note that no program will be affected by this change unless it uses a post-PEP tzinfo implementation.
I made some smaller changes \[4\] to the PEP as well and it should finally be ready for pronouncement.
\[1\]: https://www.python.org/dev/peps/pep-0495
\[2\]: https://mail.python.org/pipermail/datetime-sig/2015-September/000625.html
\[3\]: https://www.python.org/dev/peps/pep-0495/#aware-datetime-equality-comparison
\[4\]: https://hg.python.org/peps/log/39b7c1da05a2/pep-0495.txt
>
> PEP 495 \[1\] is a deliberately minimalistic proposal to remove an
> ambiguity in representing some local times as datetime.datetime
> objects.
A major issue has come up since my announcement above. Tim Peters have noticed that PEP 495 would violate the "hash invariant" unless the fold attribute is accounted for in inter-zone comparisons.
See \[2\] for details. This issue has been resolved by modifying the definition \[3\] of the "==" operator for aware datetimes with post-PEP tzinfo. Note that no program will be affected by this change unless it uses a post-PEP tzinfo implementation.
I made some smaller changes \[4\] to the PEP as well and it should finally be ready for pronouncement.
\[1\]: https://www.python.org/dev/peps/pep-0495
\[2\]: https://mail.python.org/pipermail/datetime-sig/2015-September/000625.html
\[3\]: https://www.python.org/dev/peps/pep-0495/#aware-datetime-equality-comparison
\[4\]: https://hg.python.org/peps/log/39b7c1da05a2/pep-0495.txt