Using commoncode.filetype.get_last_modified_date on Python 3.12 (for example indirectly through ScanCode Toolkit) will report a deprecation warning (in this case as part of unit/integration tests of my own package which uses ScanCode):
test_file_path (test_retrieval.RunTestCase.test_file_path) ... /opt/hostedtoolcache/Python/3.12.1/x64/lib/python3.12/site-packages/commoncode/filetype.py:167: 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).
datetime.utcfromtimestamp(os.path.getmtime(location))
Using
commoncode.filetype.get_last_modified_date
on Python 3.12 (for example indirectly through ScanCode Toolkit) will report a deprecation warning (in this case as part of unit/integration tests of my own package which uses ScanCode):