[Bug libstdc++/108212] [13 Regression] pretty printers don't work with Python 2 due to imports for chrono
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jan 5 16:28:56 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108212
--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:
https://gcc.gnu.org/g:80ff207da6d8784e227eb93f75c4ac5a300c8420
commit r13-5034-g80ff207da6d8784e227eb93f75c4ac5a300c8420
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Thu Jan 5 13:41:21 2023 +0000
libstdc++: Fix <chrono> printers for Python 2 [PR108212]
The datetime.timezone.utc singleton doesn't exist in Python 2, but we
can create it ourselves by deriving from datetime.tzinfo.
libstdc++-v3/ChangeLog:
PR libstdc++/108212
* python/libstdcxx/v6/printers.py (_utc_timezone): New global
variable.
(StdChronoTimePointPrinter::to_string): Use it.
More information about the Gcc-bugs
mailing list