Skip to content
Prev Previous commit
Use skip_file_prefixes for the warning
  • Loading branch information
encukou committed Apr 3, 2024
commit f1bd314ce7dc430775365838376b44da27e100c3
3 changes: 2 additions & 1 deletion Lib/_strptime.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
strptime -- Calculates the time struct represented by the passed-in string

"""
import os
import time
import locale
import calendar
Expand Down Expand Up @@ -273,7 +274,7 @@ def pattern(self, format):
To avoid trouble, add a specific year to the input & format.
See https://github.com/python/cpython/issues/70647.""",
DeprecationWarning,
stacklevel=5)
skip_file_prefixes=(os.path.dirname(__file__),))
return "%s%s" % (processed_format, format)

def compile(self, format):
Expand Down