summaryrefslogtreecommitdiff
path: root/Lib/posixpath.py
diff options
context:
space:
mode:
authorPhilip Jenvey <pjenvey@underboss.org>2009-05-08 02:28:39 +0000
committerPhilip Jenvey <pjenvey@underboss.org>2009-05-08 02:28:39 +0000
commitd846f1d4c21f4589966512f78a4a4d74f8399d6d (patch)
treeb0133d10453f7707201fa5328cd9ddd14e13a6ba /Lib/posixpath.py
parent6f9977852ff61be2f55f82bbdb92e486c23d2dd9 (diff)
downloadcpython-git-d846f1d4c21f4589966512f78a4a4d74f8399d6d.tar.gz
#4351: more appropriate DeprecationWarning stacklevels
Diffstat (limited to 'Lib/posixpath.py')
-rw-r--r--Lib/posixpath.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/posixpath.py b/Lib/posixpath.py
index 0ec430ddf7..15be83cd57 100644
--- a/Lib/posixpath.py
+++ b/Lib/posixpath.py
@@ -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: