#4351: more appropriate DeprecationWarning stacklevels

This commit is contained in:
Philip Jenvey 2009-05-08 02:28:39 +00:00
parent 6f9977852f
commit d846f1d4c2
9 changed files with 22 additions and 16 deletions

View file

@ -216,7 +216,8 @@ def walk(top, func, arg):
beyond that arg is always passed to func. It can be used, e.g., to pass
a filename pattern, or a mutable object designed to accumulate
statistics. Passing None for arg is common."""
warnings.warnpy3k("In 3.x, os.path.walk is removed in favor of os.walk.")
warnings.warnpy3k("In 3.x, os.path.walk is removed in favor of os.walk.",
stacklevel=2)
try:
names = os.listdir(top)
except os.error: