The gzip.Gzip.filename attribute is deprecated since Python 2.6. I propose to either remove it, or remove the deprecation. The deprecation was added by issue #44518: commit 5b1a7857023d15a2f51467c765bade1d6f349c5e. Attached PR #94197 removes the filename attribute.