Skip to content

Commit 4e3effc

Browse files
Ignore warnings
1 parent dfe4252 commit 4e3effc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Lib/test/datetimetester.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3390,6 +3390,7 @@ def test_fromisoformat_timespecs(self):
33903390
dt_rt = self.theclass.fromisoformat(dtstr)
33913391
self.assertEqual(dt, dt_rt)
33923392

3393+
@warnings_helper.ignore_warnings(category=DeprecationWarning)
33933394
def test_fromisoformat_datetime_examples(self):
33943395
UTC = timezone.utc
33953396
BST = timezone(timedelta(hours=1), 'BST')

Modules/_datetimemodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,7 @@ parse_isoformat_time(const char *dtstr, size_t dtlen, int *hour, int *minute,
11351135
if (tzinfo_pos + 2 < p_end && tzinfo_pos[2] != ':' && strlen(tzinfo_pos) > 2) {
11361136
PyErr_WarnEx(PyExc_DeprecationWarning,
11371137
"Support for partially expanded formats is deprecated in "
1138-
"accordance with ISO 8601:2 and will be removed in 3.15", 2);
1138+
"accordance with ISO 8601:2 and will be removed in 3.15", 1);
11391139
}
11401140

11411141
rv = parse_hh_mm_ss_ff(tzinfo_pos, p_end, &tzhour, &tzminute, &tzsecond,

0 commit comments

Comments
 (0)