Index: Lib/gzip.py =================================================================== --- Lib/gzip.py (revision 67276) +++ Lib/gzip.py (working copy) @@ -114,7 +114,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