)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"65f4f0fbac672b07d832a6870505227882c2efde","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"a58491f7_bf0e6f33","updated":"2025-02-04 20:42:09.000000000","message":"I\u0027d be tempted to switch to uncompressed mode when writing `R1NG`, flush, then switch back to compressed -- I don\u0027t love needing to inline/modify an upstream method. I might give that a crack if I get a chance...\n\nEither way, we can\u0027t expect it to work for old rings.\n\nOTOH, maybe there\u0027s something to be said for using a \"standard\" mechanism like this?","commit_id":"0114b7b5cda3bf842b4082560107dac4566939b4"}],"etc/magic":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"65f4f0fbac672b07d832a6870505227882c2efde","unresolved":true,"context_lines":[{"line_number":11,"context_line":"\u003e\u003e10 search/0x40 \\0 was \"%s\":"},{"line_number":12,"context_line":"\u003e\u003e\u003e\u00260 search/0x100 \\0 %s"},{"line_number":13,"context_line":"\u003e2 beshort 0x0810"},{"line_number":14,"context_line":"\u003e\u003e10 search/0x100 \\0 %s"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"b51312a9_5c85ef18","line":14,"updated":"2025-02-04 20:42:09.000000000","message":"Only trouble is this will *also* catch any other gzip with a comment...","commit_id":"0114b7b5cda3bf842b4082560107dac4566939b4"}],"swift/common/ring/io.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"65f4f0fbac672b07d832a6870505227882c2efde","unresolved":true,"context_lines":[{"line_number":368,"context_line":"            yield reader"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"class GzipWriter(object):"},{"line_number":372,"context_line":"    def __init__(self, fileobj, filename\u003d\u0027\u0027, mtime\u003d1300507380.0, comment\u003dNone):"},{"line_number":373,"context_line":"        self.raw_fp \u003d fileobj"},{"line_number":374,"context_line":"        self.gzip_fp \u003d GzipFile("}],"source_content_type":"text/x-python","patch_set":2,"id":"1f52ca72_11c91a4c","line":371,"updated":"2025-02-04 20:42:09.000000000","message":"If we go this route, I think I\u0027d prefer to get our `GzipFile` overrides into `GzipWriter` directly. I already worry that I put too much class hierarchy into the main patch.","commit_id":"0114b7b5cda3bf842b4082560107dac4566939b4"}],"swift/common/utils/gzip.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"65f4f0fbac672b07d832a6870505227882c2efde","unresolved":true,"context_lines":[{"line_number":53,"context_line":"            if fcomment and not isinstance(fcomment, bytes):"},{"line_number":54,"context_line":"                fcomment \u003d fcomment.encode(\u0027latin-1\u0027)"},{"line_number":55,"context_line":"        except UnicodeEncodeError:"},{"line_number":56,"context_line":"            fcomment \u003d None"},{"line_number":57,"context_line":"        flags \u003d 0"},{"line_number":58,"context_line":"        if fname:"},{"line_number":59,"context_line":"            flags \u003d gzip.FNAME"}],"source_content_type":"text/x-python","patch_set":2,"id":"eedb797e_69fb0815","line":56,"updated":"2025-02-04 20:42:09.000000000","message":"I think it\u0027d be better to raise an error here. Upstream does something like this for `fname`, sure, but that doesn\u0027t mean we have to perpetuate it and remove some guardrails for ourselves.","commit_id":"0114b7b5cda3bf842b4082560107dac4566939b4"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"65f4f0fbac672b07d832a6870505227882c2efde","unresolved":true,"context_lines":[{"line_number":59,"context_line":"            flags \u003d gzip.FNAME"},{"line_number":60,"context_line":"        if fcomment:"},{"line_number":61,"context_line":"            flags |\u003d gzip.FCOMMENT"},{"line_number":62,"context_line":"        self.fileobj.write(chr(flags).encode(\u0027latin-1\u0027))"},{"line_number":63,"context_line":"        mtime \u003d self._write_mtime"},{"line_number":64,"context_line":"        if mtime is None:"},{"line_number":65,"context_line":"            mtime \u003d time.time()"}],"source_content_type":"text/x-python","patch_set":2,"id":"1491a7fa_f885fbc0","line":62,"range":{"start_line":62,"start_character":27,"end_line":62,"end_character":56},"updated":"2025-02-04 20:42:09.000000000","message":"Better as `struct.pack(\u0027B\u0027, flags)` (IMO)\n\nOh, but I see -- this is how stdlib does it, too...","commit_id":"0114b7b5cda3bf842b4082560107dac4566939b4"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"65f4f0fbac672b07d832a6870505227882c2efde","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        elif compresslevel \u003d\u003d gzip._COMPRESS_LEVEL_FAST:"},{"line_number":70,"context_line":"            xfl \u003d b\u0027\\004\u0027"},{"line_number":71,"context_line":"        else:"},{"line_number":72,"context_line":"            xfl \u003d b\u0027\\000\u0027"},{"line_number":73,"context_line":"        self.fileobj.write(xfl)"},{"line_number":74,"context_line":"        self.fileobj.write(b\u0027\\377\u0027)"},{"line_number":75,"context_line":"        if fname:"}],"source_content_type":"text/x-python","patch_set":2,"id":"835356cb_27e7e32e","line":72,"updated":"2025-02-04 20:42:09.000000000","message":"These flags seem wild to me (*everything* in between gets the same zero?? **and** outside -- if you set `compresslevel\u003d0`, it\u0027s indistinguishable!), but that matches both stdlib and the spec 🤷","commit_id":"0114b7b5cda3bf842b4082560107dac4566939b4"}]}
