)]}'
{"keystoneclient/session.py":[{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"7acdb5c126817f3b4b8a07cd28dea7ab08ee931c","unresolved":false,"context_lines":[{"line_number":907,"context_line":"                (socket.IPPROTO_TCP, socket.TCP_NODELAY, 1),"},{"line_number":908,"context_line":"                # Turn on TCP Keep-Alive"},{"line_number":909,"context_line":"                (socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1),"},{"line_number":910,"context_line":"                # Only perform keep-alives 4 times"},{"line_number":911,"context_line":"                (socket.IPPROTO_TCP, socket.TCP_KEEPCNT, 4),"},{"line_number":912,"context_line":"                # Perform keep-alives every 15 seconds"},{"line_number":913,"context_line":"                (socket.IPPROTO_TCP, socket.TCP_KEEPINTVL, 15),"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a50d1a3_bfb313e9","line":910,"updated":"2015-07-23 20:09:40.000000000","message":"Yeah, I\u0027m honestly not sure if after the 4th it errors, or if it is particularly the combination of those + the interval + keepidle (when keepidle is available). I haven\u0027t found really good documentation around these options yet. \u003d/","commit_id":"0729967428d5bfe748413a0935fa020fd95dcb75"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"502ae7f607d8553cce43d8fb5fca4e2b0e97eeca","unresolved":false,"context_lines":[{"line_number":907,"context_line":"                (socket.IPPROTO_TCP, socket.TCP_NODELAY, 1),"},{"line_number":908,"context_line":"                # Turn on TCP Keep-Alive"},{"line_number":909,"context_line":"                (socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1),"},{"line_number":910,"context_line":"                # Only perform keep-alives 4 times"},{"line_number":911,"context_line":"                (socket.IPPROTO_TCP, socket.TCP_KEEPCNT, 4),"},{"line_number":912,"context_line":"                # Perform keep-alives every 15 seconds"},{"line_number":913,"context_line":"                (socket.IPPROTO_TCP, socket.TCP_KEEPINTVL, 15),"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a50d1a3_446da6ca","line":910,"updated":"2015-07-22 21:30:56.000000000","message":"add \u0027 before erroring\u0027 I think.","commit_id":"0729967428d5bfe748413a0935fa020fd95dcb75"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"f5fd4cdb4d9a611ac1a30a443b9258f24bfaccd8","unresolved":false,"context_lines":[{"line_number":898,"context_line":"        return cls._make(**kwargs)"},{"line_number":899,"context_line":""},{"line_number":900,"context_line":""},{"line_number":901,"context_line":"class TCPKeepAliveAdapter(requests.adapters.HTTPAdapter):"},{"line_number":902,"context_line":"    \"\"\"The custom adapter used to set TCP Keep-Alive on all connections.\"\"\""},{"line_number":903,"context_line":"    def init_poolmanager(self, *args, **kwargs):"},{"line_number":904,"context_line":"        socket_options \u003d ["}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_fc03debc","line":901,"updated":"2015-07-24 00:59:43.000000000","message":"So here I have to disagree. This is specifically to turn on TCP Keep-Alive options. We could call it HTTPAdapter but that\u0027d be significantly less optimal.","commit_id":"42b5080cdf9696e3e5a8fbecdf0f89961746d1dd"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"3dd3dbb3521d7539bf870e489d7eb939c9477a40","unresolved":false,"context_lines":[{"line_number":898,"context_line":"        return cls._make(**kwargs)"},{"line_number":899,"context_line":""},{"line_number":900,"context_line":""},{"line_number":901,"context_line":"class TCPKeepAliveAdapter(requests.adapters.HTTPAdapter):"},{"line_number":902,"context_line":"    \"\"\"The custom adapter used to set TCP Keep-Alive on all connections.\"\"\""},{"line_number":903,"context_line":"    def init_poolmanager(self, *args, **kwargs):"},{"line_number":904,"context_line":"        socket_options \u003d ["}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_a27a1a76","line":901,"updated":"2015-07-23 20:24:02.000000000","message":"This is misnamed. Suggest call it HTTPAdapter.\n\nAlthough this appears to be a public symbol so will have to keep the old name.\n\nThis can be done as a separate commit.","commit_id":"42b5080cdf9696e3e5a8fbecdf0f89961746d1dd"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"f5fd4cdb4d9a611ac1a30a443b9258f24bfaccd8","unresolved":false,"context_lines":[{"line_number":899,"context_line":""},{"line_number":900,"context_line":""},{"line_number":901,"context_line":"class TCPKeepAliveAdapter(requests.adapters.HTTPAdapter):"},{"line_number":902,"context_line":"    \"\"\"The custom adapter used to set TCP Keep-Alive on all connections.\"\"\""},{"line_number":903,"context_line":"    def init_poolmanager(self, *args, **kwargs):"},{"line_number":904,"context_line":"        socket_options \u003d ["},{"line_number":905,"context_line":"            # Keep Nagle\u0027s algorithm off"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_1c09eadd","line":902,"updated":"2015-07-24 00:59:43.000000000","message":"So it\u0027s turning Nagle\u0027s algorithm off because that\u0027s the behaviour of requests. It\u0027s assumed we want to continue that behaviour when we turn on keep-alive. I\u0027m happy to document why we\u0027re turning it off, but the reason is entirely that requests already does that and we\u0027re trying to be backwards compatible here.","commit_id":"42b5080cdf9696e3e5a8fbecdf0f89961746d1dd"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"3dd3dbb3521d7539bf870e489d7eb939c9477a40","unresolved":false,"context_lines":[{"line_number":899,"context_line":""},{"line_number":900,"context_line":""},{"line_number":901,"context_line":"class TCPKeepAliveAdapter(requests.adapters.HTTPAdapter):"},{"line_number":902,"context_line":"    \"\"\"The custom adapter used to set TCP Keep-Alive on all connections.\"\"\""},{"line_number":903,"context_line":"    def init_poolmanager(self, *args, **kwargs):"},{"line_number":904,"context_line":"        socket_options \u003d ["},{"line_number":905,"context_line":"            # Keep Nagle\u0027s algorithm off"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_a2f1ba03","line":902,"updated":"2015-07-23 20:24:02.000000000","message":"and the docstring isn\u0027t correct anymore, since it sets up other options on the socket.\n\n The custom adapter used to set TCP options on all connections.","commit_id":"42b5080cdf9696e3e5a8fbecdf0f89961746d1dd"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"3dd3dbb3521d7539bf870e489d7eb939c9477a40","unresolved":false,"context_lines":[{"line_number":902,"context_line":"    \"\"\"The custom adapter used to set TCP Keep-Alive on all connections.\"\"\""},{"line_number":903,"context_line":"    def init_poolmanager(self, *args, **kwargs):"},{"line_number":904,"context_line":"        socket_options \u003d ["},{"line_number":905,"context_line":"            # Keep Nagle\u0027s algorithm off"},{"line_number":906,"context_line":"            (socket.IPPROTO_TCP, socket.TCP_NODELAY, 1),"},{"line_number":907,"context_line":"            # Turn on TCP Keep-Alive"},{"line_number":908,"context_line":"            (socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1),"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_02866e65","line":905,"updated":"2015-07-23 20:24:02.000000000","message":"Might want to link to some docs like http://blogs.msdn.com/b/windowsazurestorage/archive/2010/06/25/nagle-s-algorithm-is-not-friendly-towards-small-requests.aspx to explain why Nagle should be disabled.","commit_id":"42b5080cdf9696e3e5a8fbecdf0f89961746d1dd"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"f5fd4cdb4d9a611ac1a30a443b9258f24bfaccd8","unresolved":false,"context_lines":[{"line_number":913,"context_line":"        ]"},{"line_number":914,"context_line":""},{"line_number":915,"context_line":"        # Some operating systems (e.g., OSX) do not support setting keepidle"},{"line_number":916,"context_line":"        if getattr(socket, \u0027TCP_KEEPIDLE\u0027, None) is not None:"},{"line_number":917,"context_line":"            # This + keepcnt and keepintvl mean that the connection cannot"},{"line_number":918,"context_line":"            # hang for more than 2 minutes."},{"line_number":919,"context_line":"            socket_options +\u003d [(socket.IPPROTO_TCP, socket.TCP_KEEPIDLE, 60)]"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_bc0d56ea","line":916,"updated":"2015-07-24 00:59:43.000000000","message":"Will do.","commit_id":"42b5080cdf9696e3e5a8fbecdf0f89961746d1dd"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"3dd3dbb3521d7539bf870e489d7eb939c9477a40","unresolved":false,"context_lines":[{"line_number":913,"context_line":"        ]"},{"line_number":914,"context_line":""},{"line_number":915,"context_line":"        # Some operating systems (e.g., OSX) do not support setting keepidle"},{"line_number":916,"context_line":"        if getattr(socket, \u0027TCP_KEEPIDLE\u0027, None) is not None:"},{"line_number":917,"context_line":"            # This + keepcnt and keepintvl mean that the connection cannot"},{"line_number":918,"context_line":"            # hang for more than 2 minutes."},{"line_number":919,"context_line":"            socket_options +\u003d [(socket.IPPROTO_TCP, socket.TCP_KEEPIDLE, 60)]"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_02098edd","line":916,"updated":"2015-07-23 20:24:02.000000000","message":"hasattr is more obvious.","commit_id":"42b5080cdf9696e3e5a8fbecdf0f89961746d1dd"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"f5fd4cdb4d9a611ac1a30a443b9258f24bfaccd8","unresolved":false,"context_lines":[{"line_number":918,"context_line":"            # hang for more than 2 minutes."},{"line_number":919,"context_line":"            socket_options +\u003d [(socket.IPPROTO_TCP, socket.TCP_KEEPIDLE, 60)]"},{"line_number":920,"context_line":""},{"line_number":921,"context_line":"        if requests.__version__ \u003e\u003d \u00272.4.1\u0027:"},{"line_number":922,"context_line":"            kwargs.setdefault(\u0027socket_options\u0027, socket_options)"},{"line_number":923,"context_line":"        super(TCPKeepAliveAdapter, self).init_poolmanager(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_dc12a209","line":921,"updated":"2015-07-24 00:59:43.000000000","message":"We only call this method once. Nothing repeatedly calls init_poolmanager so this is perfectly fine to do unconditionally.","commit_id":"42b5080cdf9696e3e5a8fbecdf0f89961746d1dd"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"3dd3dbb3521d7539bf870e489d7eb939c9477a40","unresolved":false,"context_lines":[{"line_number":918,"context_line":"            # hang for more than 2 minutes."},{"line_number":919,"context_line":"            socket_options +\u003d [(socket.IPPROTO_TCP, socket.TCP_KEEPIDLE, 60)]"},{"line_number":920,"context_line":""},{"line_number":921,"context_line":"        if requests.__version__ \u003e\u003d \u00272.4.1\u0027:"},{"line_number":922,"context_line":"            kwargs.setdefault(\u0027socket_options\u0027, socket_options)"},{"line_number":923,"context_line":"        super(TCPKeepAliveAdapter, self).init_poolmanager(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_c2e086fd","line":921,"updated":"2015-07-23 20:24:02.000000000","message":"this line should be moved back up since there\u0027s no need to build socket_options if we can\u0027t set socket_options","commit_id":"42b5080cdf9696e3e5a8fbecdf0f89961746d1dd"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"a00bab0a1bdf38c6012a8838ca2bb72c82479bf6","unresolved":false,"context_lines":[{"line_number":906,"context_line":"    http://blogs.msdn.com/b/windowsazurestorage/archive/2010/06/25/nagle-s-algorithm-is-not-friendly-towards-small-requests.aspx"},{"line_number":907,"context_line":"    \"\"\""},{"line_number":908,"context_line":"    def init_poolmanager(self, *args, **kwargs):"},{"line_number":909,"context_line":"        if requests.__version__ \u003e\u003d \u00272.4.1\u0027:"},{"line_number":910,"context_line":"            socket_options \u003d ["},{"line_number":911,"context_line":"                # Keep Nagle\u0027s algorithm off"},{"line_number":912,"context_line":"                (socket.IPPROTO_TCP, socket.TCP_NODELAY, 1),"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_db030f41","line":909,"updated":"2015-07-27 20:46:35.000000000","message":"would be nice to have a comment why this version.\n\nbtw, keystoneclient requirements.txt has\n\n requests\u003e\u003d2.5.2\n\nso this is always going to be true and this line can be removed. Clean this up in a separate commit.","commit_id":"c6b14f94c5021452796d7bd151c2c98ae983afdd"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"a00bab0a1bdf38c6012a8838ca2bb72c82479bf6","unresolved":false,"context_lines":[{"line_number":912,"context_line":"                (socket.IPPROTO_TCP, socket.TCP_NODELAY, 1),"},{"line_number":913,"context_line":"                # Turn on TCP Keep-Alive"},{"line_number":914,"context_line":"                (socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1),"},{"line_number":915,"context_line":"                # Set the maximum number of keep-alive probes"},{"line_number":916,"context_line":"                (socket.IPPROTO_TCP, socket.TCP_KEEPCNT, 4),"},{"line_number":917,"context_line":"                # Send keep-alive probes every 15 seconds"},{"line_number":918,"context_line":"                (socket.IPPROTO_TCP, socket.TCP_KEEPINTVL, 15),"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_9b1d87c0","line":915,"updated":"2015-07-27 20:46:35.000000000","message":"the comment should say why, not what. Why 4?","commit_id":"c6b14f94c5021452796d7bd151c2c98ae983afdd"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"a00bab0a1bdf38c6012a8838ca2bb72c82479bf6","unresolved":false,"context_lines":[{"line_number":914,"context_line":"                (socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1),"},{"line_number":915,"context_line":"                # Set the maximum number of keep-alive probes"},{"line_number":916,"context_line":"                (socket.IPPROTO_TCP, socket.TCP_KEEPCNT, 4),"},{"line_number":917,"context_line":"                # Send keep-alive probes every 15 seconds"},{"line_number":918,"context_line":"                (socket.IPPROTO_TCP, socket.TCP_KEEPINTVL, 15),"},{"line_number":919,"context_line":"            ]"},{"line_number":920,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_7b7f5be0","line":917,"updated":"2015-07-27 20:46:35.000000000","message":"the comment should say why, not what... why 15?","commit_id":"c6b14f94c5021452796d7bd151c2c98ae983afdd"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"a00bab0a1bdf38c6012a8838ca2bb72c82479bf6","unresolved":false,"context_lines":[{"line_number":922,"context_line":"            # keepidle"},{"line_number":923,"context_line":"            if hasattr(socket, \u0027TCP_KEEPIDLE\u0027):"},{"line_number":924,"context_line":"                socket_options +\u003d ["},{"line_number":925,"context_line":"                    # Wait 60 seconds before sending keep-alive probes"},{"line_number":926,"context_line":"                    (socket.IPPROTO_TCP, socket.TCP_KEEPIDLE, 60)"},{"line_number":927,"context_line":"                ]"},{"line_number":928,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_9b74a7fe","line":925,"updated":"2015-07-27 20:46:35.000000000","message":"the comment should say why, not what... why 60?","commit_id":"c6b14f94c5021452796d7bd151c2c98ae983afdd"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"a00bab0a1bdf38c6012a8838ca2bb72c82479bf6","unresolved":false,"context_lines":[{"line_number":928,"context_line":""},{"line_number":929,"context_line":"            # After waiting 60 seconds, and then sending a probe once every 15"},{"line_number":930,"context_line":"            # seconds 4 times, these options should ensure that a connection"},{"line_number":931,"context_line":"            # hands for no longer than 2 minutes before a ConnectionError is"},{"line_number":932,"context_line":"            # raised."},{"line_number":933,"context_line":"            kwargs.setdefault(\u0027socket_options\u0027, socket_options)"},{"line_number":934,"context_line":"        super(TCPKeepAliveAdapter, self).init_poolmanager(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_db554f50","line":931,"updated":"2015-07-27 20:46:35.000000000","message":"change \"hands\" to \"hangs\"","commit_id":"c6b14f94c5021452796d7bd151c2c98ae983afdd"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"a00bab0a1bdf38c6012a8838ca2bb72c82479bf6","unresolved":false,"context_lines":[{"line_number":930,"context_line":"            # seconds 4 times, these options should ensure that a connection"},{"line_number":931,"context_line":"            # hands for no longer than 2 minutes before a ConnectionError is"},{"line_number":932,"context_line":"            # raised."},{"line_number":933,"context_line":"            kwargs.setdefault(\u0027socket_options\u0027, socket_options)"},{"line_number":934,"context_line":"        super(TCPKeepAliveAdapter, self).init_poolmanager(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_1b9c170d","line":933,"updated":"2015-07-27 20:46:35.000000000","message":"since this is using setdefault, might want to check if kwargs already has socket_options set before doing all this (at line 909).","commit_id":"c6b14f94c5021452796d7bd151c2c98ae983afdd"}]}
