Skip to content

Commit

Permalink
Use skip_file_prefixes for the warning
Browse files Browse the repository at this point in the history
  • Loading branch information
encukou committed Apr 3, 2024
1 parent 92e30b8 commit f1bd314
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit f1bd314

Please sign in to comment.