mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
more precise timezone-aware deprecation message (#12528)
This commit is contained in:
@@ -265,12 +265,12 @@ class datetime(date):
|
||||
def fromtimestamp(cls, timestamp: float, /, tz: _TzInfo | None = ...) -> Self: ...
|
||||
|
||||
@classmethod
|
||||
@deprecated("Use timezone-aware objects to represent datetimes in UTC; e.g. by calling .fromtimestamp(datetime.UTC)")
|
||||
@deprecated("Use timezone-aware objects to represent datetimes in UTC; e.g. by calling .fromtimestamp(datetime.timezone.utc)")
|
||||
def utcfromtimestamp(cls, t: float, /) -> Self: ...
|
||||
@classmethod
|
||||
def now(cls, tz: _TzInfo | None = None) -> Self: ...
|
||||
@classmethod
|
||||
@deprecated("Use timezone-aware objects to represent datetimes in UTC; e.g. by calling .now(datetime.UTC)")
|
||||
@deprecated("Use timezone-aware objects to represent datetimes in UTC; e.g. by calling .now(datetime.timezone.utc)")
|
||||
def utcnow(cls) -> Self: ...
|
||||
@classmethod
|
||||
def combine(cls, date: _Date, time: _Time, tzinfo: _TzInfo | None = ...) -> Self: ...
|
||||
|
||||
Reference in New Issue
Block a user