https://github.com/python/cpython/commit/bf5f85dae505b92426b75108a44edf7d58a339f4 commit: bf5f85dae505b92426b75108a44edf7d58a339f4 branch: 3.13 author: Miss Islington (bot) <[email protected]> committer: tomasr8 <[email protected]> date: 2026-07-18T15:09:43+02:00 summary:
[3.13] Test `calendar.February` deprecation (GH-153893) (#153921) Test `calendar.February` deprecation (GH-153893) Calendar related tests now check if both deprecated constants surface the proper warnings. * extended `test_deprecation_warning` to check `constants.February` as well (cherry picked from commit 31c81e6ee3b1c874a807ea161182b83c6c607713) Co-authored-by: vjabuilds <[email protected]> Co-authored-by: Tomas R. <[email protected]> files: M Lib/test/test_calendar.py diff --git a/Lib/test/test_calendar.py b/Lib/test/test_calendar.py index c5296f50b3df0ec..9eda4edd8c535a1 100644 --- a/Lib/test/test_calendar.py +++ b/Lib/test/test_calendar.py @@ -509,6 +509,11 @@ def test_deprecation_warning(self): "The 'January' attribute is deprecated, use 'JANUARY' instead" ): calendar.January + with self.assertWarnsRegex( + DeprecationWarning, + "The 'February' attribute is deprecated, use 'FEBRUARY' instead" + ): + calendar.February def test_isleap(self): # Make sure that the return is right for a few years, and _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
