Closed major closed 9 months ago
Testing with Python 3.12 on Fedora Rawhide (soon to be Fedora 40):
=================================== FAILURES =================================== ___________________________ test_version_check_ready ___________________________ mocker = <pytest_mock.plugin.MockerFixture object at 0x7ffaca202210> def test_version_check_ready(mocker): old_datetime = datetime(2000, 2, 3, 5, 35, 2) mocker.patch( "watchdog.EFSUtilsVersionChecker.get_last_version_check_time", return_value=old_datetime, ) > assert watchdog.EFSUtilsVersionChecker.version_check_ready() test/watchdog_test/test_check_if_using_old_version.py:133: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @staticmethod def version_check_ready(): """Inspect the last version check file and return true if the time since last version check is greater than VERSION_CHECK_POLL_INTERVAL""" last_version_check_time = EFSUtilsVersionChecker.get_last_version_check_time() if not last_version_check_time: return True > elapsed_seconds = (get_utc_now() - last_version_check_time).total_seconds() E TypeError: can't subtract offset-naive and offset-aware datetimes src/watchdog/__init__.py:360: TypeError
Thanks for pointing this out. This will be addressed in v1.35.2. We'll need to update our test infra to run against Python 3.12.
Closing the issue since v1.35.2 reverted the version checker.
Testing with Python 3.12 on Fedora Rawhide (soon to be Fedora 40):