#4351: more appropriate DeprecationWarning stacklevels
diff --git a/Lib/gzip.py b/Lib/gzip.py
index 019c3e2..983e0ce 100644
--- a/Lib/gzip.py
+++ b/Lib/gzip.py
@@ -136,7 +136,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