From 18ce6e6fba88d905da2176da11e921acf955a362 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Thu, 29 Jan 2026 11:20:42 -0600 Subject: [PATCH] BrowserCache: Add comment about py2 and gzip.decompress --- fanficfare/browsercache/base_browsercache.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fanficfare/browsercache/base_browsercache.py b/fanficfare/browsercache/base_browsercache.py index 262f1118..8c3dbd44 100644 --- a/fanficfare/browsercache/base_browsercache.py +++ b/fanficfare/browsercache/base_browsercache.py @@ -185,6 +185,10 @@ class BaseBrowserCache(object): def decompress(self, encoding, data): encoding = ensure_text(encoding) if encoding == 'gzip': + ## XXX py2 doesn't have gzip.decompress() and + ## zlib.decompress() isn't compatible. Ran into once, but + ## it's the site that choses the encoding and on reload, + ## got brotli instead. return gzip.decompress(data) elif encoding == 'br': return brotli.decompress(data)