diff options
author | Paul Ganssle <git@m.ganssle.io> | 2023-03-23 15:36:22 (GMT) |
---|---|---|
committer | T. Wouters <thomas@python.org> | 2023-05-03 09:09:45 (GMT) |
commit | 0a5cd984b215f28d3c205eadf0daf201b3388c90 (patch) | |
tree | c516b176dc5295bbdd769c6a0134307f7774a45c /Misc | |
parent | 65c4a2b326086875ecbedf032204d1ff24ba74d7 (diff) | |
download | cpython-0a5cd984b215f28d3c205eadf0daf201b3388c90.zip cpython-0a5cd984b215f28d3c205eadf0daf201b3388c90.tar.gz cpython-0a5cd984b215f28d3c205eadf0daf201b3388c90.tar.bz2 |
GH-84976: Re-introduce `datetime.py` and fix reprs
Without the change to the reprs, pure-python classes would have a repr
of `datetime._pydatetime.time`, etc.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2023-04-19-16-08-53.gh-issue-84976.HwbzlD.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2023-04-19-16-08-53.gh-issue-84976.HwbzlD.rst b/Misc/NEWS.d/next/Library/2023-04-19-16-08-53.gh-issue-84976.HwbzlD.rst new file mode 100644 index 0000000..8658627 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2023-04-19-16-08-53.gh-issue-84976.HwbzlD.rst @@ -0,0 +1,5 @@ +Create a new ``Lib/_pydatetime.py`` file that defines the Python version of +the ``datetime`` module, and make ``datetime`` import the contents of the +new library only if the C implementation is missing. Currently, the full +Python implementation is defined and then deleted if the C implementation is +not available, slowing down ``import datetime`` unnecessarily. |