commit | d846f1d4c21f4589966512f78a4a4d74f8399d6d | [log] [tgz] |
---|---|---|
author | Philip Jenvey <pjenvey@underboss.org> | Fri May 08 02:28:39 2009 +0000 |
committer | Philip Jenvey <pjenvey@underboss.org> | Fri May 08 02:28:39 2009 +0000 |
tree | b0133d10453f7707201fa5328cd9ddd14e13a6ba | |
parent | 6f9977852ff61be2f55f82bbdb92e486c23d2dd9 [diff] [blame] |
#4351: more appropriate DeprecationWarning stacklevels
diff --git a/Lib/gzip.py b/Lib/gzip.py index f568796..9605d5d 100644 --- a/Lib/gzip.py +++ b/Lib/gzip.py
@@ -124,7 +124,7 @@ @property def filename(self): import warnings - warnings.warn("use the name attribute", DeprecationWarning) + warnings.warn("use the name attribute", DeprecationWarning, 2) if self.mode == WRITE and self.name[-3:] != ".gz": return self.name + ".gz" return self.name