)]}'
{"os_loganalyze/filter.py":[{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"57bb225f03b92a05c453fc4baa7b4a58df1edecb","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        lineno \u003d 1"},{"line_number":113,"context_line":"        for line in self.iterable_buffer:"},{"line_number":114,"context_line":"            # bail early for limits"},{"line_number":115,"context_line":"            if self.limit and lineno \u003e int(self.limit):"},{"line_number":116,"context_line":"                raise StopIteration()"},{"line_number":117,"context_line":"            # strip control chars in case the console is ascii colored"},{"line_number":118,"context_line":"            if self.strip_control:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7aaa499b_4b79a6c7","line":115,"updated":"2015-04-15 00:09:47.000000000","message":"Why are we changing the comparison between lineno and self.limit here?\n\n-1 for this edit since it seems wrong.","commit_id":"d6e4613a2b3566d3d9c0444807bd040607f2feed"},{"author":{"_account_id":7069,"name":"Joshua Hesketh","email":"josh@nitrotech.org","username":"jhesketh"},"change_message_id":"0c8e2eeb51990e5cc4a7a3409e20366793d48322","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        lineno \u003d 1"},{"line_number":113,"context_line":"        for line in self.iterable_buffer:"},{"line_number":114,"context_line":"            # bail early for limits"},{"line_number":115,"context_line":"            if self.limit and lineno \u003e int(self.limit):"},{"line_number":116,"context_line":"                raise StopIteration()"},{"line_number":117,"context_line":"            # strip control chars in case the console is ascii colored"},{"line_number":118,"context_line":"            if self.strip_control:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7aaa499b_a8bdcd69","line":115,"in_reply_to":"7aaa499b_4b79a6c7","updated":"2015-04-15 01:25:45.000000000","message":"Actually I was surprised this was working before. If you look at the code and the way it\u0027s counting the line numbers, we should only be checking for when lineno is greater than the limit (not equal to). I\u0027m not entirely sure what changed though :-s","commit_id":"d6e4613a2b3566d3d9c0444807bd040607f2feed"}],"os_loganalyze/generator.py":[{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"57bb225f03b92a05c453fc4baa7b4a58df1edecb","unresolved":false,"context_lines":[{"line_number":150,"context_line":"            # compression algorithm was used"},{"line_number":151,"context_line":"            d \u003d zlib.decompressobj(16 + zlib.MAX_WBITS)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        if isinstance(self.obj, types.GeneratorType):"},{"line_number":154,"context_line":"            buf \u003d next(self.obj)"},{"line_number":155,"context_line":"            partial \u003d \u0027\u0027"},{"line_number":156,"context_line":"            while buf:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7aaa499b_eb54f221","line":153,"updated":"2015-04-15 00:09:47.000000000","message":"Note we can just convert the type of self.obj after we con.get_object() to avoid this if/else. But this is a smaller diff so works for me.","commit_id":"d6e4613a2b3566d3d9c0444807bd040607f2feed"}],"os_loganalyze/view.py":[{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"57bb225f03b92a05c453fc4baa7b4a58df1edecb","unresolved":false,"context_lines":[{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def __iter__(self):"},{"line_number":164,"context_line":"        igen \u003d (x for x in self.gen)"},{"line_number":165,"context_line":"        first_line \u003d next(igen)"},{"line_number":166,"context_line":"        self._discover_html(first_line.line)"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        if not self.is_html:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7aaa499b_0b083e2b","line":165,"updated":"2015-04-15 00:09:47.000000000","message":"Does this force python to load the entire file into memory all at once? its not a regression because the old code did this, but just noticing it as I review.\n\nI also wonder if the changes here are necessary? I think they are made so that we can use the for loop below on line 179. Can we just do:\n\n  first_line \u003d next(self.gen)\n\nhere instead then keep line 179 the same?","commit_id":"d6e4613a2b3566d3d9c0444807bd040607f2feed"},{"author":{"_account_id":7069,"name":"Joshua Hesketh","email":"josh@nitrotech.org","username":"jhesketh"},"change_message_id":"0c8e2eeb51990e5cc4a7a3409e20366793d48322","unresolved":false,"context_lines":[{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def __iter__(self):"},{"line_number":164,"context_line":"        igen \u003d (x for x in self.gen)"},{"line_number":165,"context_line":"        first_line \u003d next(igen)"},{"line_number":166,"context_line":"        self._discover_html(first_line.line)"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        if not self.is_html:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7aaa499b_c81c99c3","line":165,"in_reply_to":"7aaa499b_0b083e2b","updated":"2015-04-15 01:25:45.000000000","message":"Using next(self.gen) gives\n\n  File \"os_loganalyze/view.py\", line 165, in __iter__\n    first_line \u003d next(self.gen)\n  TypeError: Filter object is not an iterator\n\nI\u0027m not entirely sure why it doesn\u0027t think the filter is an iterator as using \"for line in self.gen\" works fine, but that doesn\u0027t give us an easy way of getting the first item (I guess we could break after the first one).\n\nFrom my testing though this doesn\u0027t load the whole file into memory.","commit_id":"d6e4613a2b3566d3d9c0444807bd040607f2feed"}]}
