Add strptime for datetime.time and datetime.date (3.14) (#13991)

This commit is contained in:
Max Muoto
2025-05-10 14:02:43 -05:00
committed by GitHub
parent f67a0df2b8
commit f90424014b
2 changed files with 10 additions and 2 deletions
@@ -364,8 +364,6 @@ dataclasses.Field.__init__
dataclasses.Field.doc
dataclasses.field
dataclasses.make_dataclass
datetime.date.strptime
datetime.time.strptime
decimal.Decimal.from_number
decimal.DecimalTuple.__annotate_func__
decimal.DecimalTuple.__annotations_cache__
+10
View File
@@ -73,6 +73,11 @@ class date:
@property
def day(self) -> int: ...
def ctime(self) -> str: ...
if sys.version_info >= (3, 14):
@classmethod
def strptime(cls, date_string: str, format: str, /) -> Self: ...
# On <3.12, the name of the parameter in the pure-Python implementation
# didn't match the name in the C implementation,
# meaning it is only *safe* to pass it as a keyword argument on 3.12+
@@ -142,6 +147,11 @@ class time:
def isoformat(self, timespec: str = ...) -> str: ...
@classmethod
def fromisoformat(cls, time_string: str, /) -> Self: ...
if sys.version_info >= (3, 14):
@classmethod
def strptime(cls, date_string: str, format: str, /) -> Self: ...
# On <3.12, the name of the parameter in the pure-Python implementation
# didn't match the name in the C implementation,
# meaning it is only *safe* to pass it as a keyword argument on 3.12+