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.
This commit is contained in:
Paul Ganssle 2023-03-23 11:36:22 -04:00 committed by T. Wouters
parent 65c4a2b326
commit 0a5cd984b2
3 changed files with 27 additions and 29 deletions

9
Lib/datetime.py Normal file
View file

@ -0,0 +1,9 @@
try:
from _datetime import *
from _datetime import __doc__
except ImportError:
from _pydatetime import *
from _pydatetime import __doc__
__all__ = ("date", "datetime", "time", "timedelta", "timezone", "tzinfo",
"MINYEAR", "MAXYEAR")