WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
291348
[webkitpy] DeprecationWarning: datetime.utcnow() and datetime.datetime.utcfromtimestamp()
https://bugs.webkit.org/show_bug.cgi?id=291348
Summary
[webkitpy] DeprecationWarning: datetime.utcnow() and datetime.datetime.utcfro...
Fujii Hironori
Reported
2025-04-09 18:25:52 PDT
datetime.utcnow() and datetime.utcfromtimestamp(timestamp) are deprecated since Python 3.12. By setting PYTHONWARNINGS=module, test-webkitpy report some DeprecationWarning. For example,
> [1609/2144] webkitscmpy.test.clone_unittest.TestClone.test_no_radar passedC:\webkit\wc\Tools\Scripts\libraries\webkitscmpy\webkitscmpy\commit.py:269: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC). > result += ' @ {}'.format(datetime.utcfromtimestamp(self.timestamp)) > C:\webkit\wc\Tools\Scripts\libraries\webkitscmpy\webkitscmpy\test\commit_unittest.py:130: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC). > '''.format(datetime.utcfromtimestamp(1000)),
Attachments
Add attachment
proposed patch, testcase, etc.
Fujii Hironori
Comment 1
2025-04-09 18:27:31 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/43880
Radar WebKit Bug Importer
Comment 2
2025-04-16 18:26:16 PDT
<
rdar://problem/149435408
>
EWS
Comment 3
2025-04-23 15:05:46 PDT
Committed
294023@main
(4d1af55b74c9): <
https://commits.webkit.org/294023@main
> Reviewed commits have been landed. Closing PR #43880 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug