[issue9000] Provide parseable repr to datetime.timezone
Changes by Éric Araujo mer...@netwok.org: -- resolution: accepted - fixed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9000 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9000] Provide parseable repr to datetime.timezone
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: I am attaching a python prototype. I am following the convention in place for the other datetime classes of prepending the repr with 'datetime.'. This may not be ideal, but better than to introduce an inconsistency. The only question I think is worth considering is the representation of timezone.utc. I would like to have repr(timezone(timedelta(0))) == 'datetime.timezone.utc' even though currently timezone(timedelta(0)) and timezone.utc are different but equal objects. This is going to change, however. See issue9051. [1] http://bugs.python.org/issue5094#msg106411 -- keywords: +patch Added file: http://bugs.python.org/file17882/issue9000-proto.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9000 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9000] Provide parseable repr to datetime.timezone
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Attaching a C patch. -- resolution: - accepted stage: unit test needed - commit review Added file: http://bugs.python.org/file17887/issue9000.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9000 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9000] Provide parseable repr to datetime.timezone
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Replacing the patch. The previously attached patch reverted issue9051 a bit too aggressively. -- Added file: http://bugs.python.org/file17888/issue9000.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9000 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9000] Provide parseable repr to datetime.timezone
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: Removed file: http://bugs.python.org/file17887/issue9000.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9000 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9000] Provide parseable repr to datetime.timezone
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Committed in r82617. Python version committed to sandbox in r82616. -- stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9000 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9000] Provide parseable repr to datetime.timezone
New submission from Alexander Belopolsky belopol...@users.sourceforge.net: Recently added datetime.timezone class does not have a custom repr, so one gets timezone.utc datetime.timezone object at 0x100681ef0 instead of parseable datetime.timezone(datetime.timedelta(0)) This is inconsistent with the way other classes in datetime module behave. -- assignee: belopolsky keywords: easy messages: 107876 nosy: belopolsky priority: normal severity: normal stage: unit test needed status: open title: Provide parseable repr to datetime.timezone type: feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9000 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9000] Provide parseable repr to datetime.timezone
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- dependencies: +datetime lacks concrete tzinfo implementation for UTC versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9000 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9000] Provide parseable repr to datetime.timezone
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Merged issue5094 nosy list. -- nosy: +ajaksu2, akira, brett.cannon, doerwalter, durban, ezio.melotti, gagenellina, kawai, l0nwlf, mark.dickinson, merwok, pitrou, r.david.murray, rafe, techtonik, tim_one ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9000 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9000] Provide parseable repr to datetime.timezone
Changes by Brett Cannon br...@python.org: -- nosy: -brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9000 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com