)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"9bfb95f85f2eabeaf85a14cd36773cddf07ab1b4","unresolved":false,"context_lines":[{"line_number":9,"context_line":"If you try to use nova python client with multiprocessing.Pool"},{"line_number":10,"context_line":"it won\u0027t work."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Reason is that all global variables automaticaly becomes shared objects"},{"line_number":13,"context_line":"between processes. And shared instances of socket actually doesn\u0027t work properly."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"The better way to \"cache\" sockets is to \"cache\" them inside Client"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAWH%2F%2Bf9s%3D","line":12,"updated":"2014-03-26 11:39:10.000000000","message":"automatically become","commit_id":"badb0ac8379dfad0ae9d55fbc7bcf774368ccfbc"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"58502621dc8be8d76fa30f8e91885da9a9c08529","unresolved":false,"context_lines":[{"line_number":9,"context_line":"If you try to use nova python client with multiprocessing.Pool"},{"line_number":10,"context_line":"it won\u0027t work."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Reason is that all global variables automaticaly becomes shared objects"},{"line_number":13,"context_line":"between processes. And shared instances of socket actually doesn\u0027t work properly."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"The better way to \"cache\" sockets is to \"cache\" them inside Client"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAWH%2F%2Bf7E%3D","line":12,"in_reply_to":"AAAAWH%2F%2Bf9s%3D","updated":"2014-03-26 11:43:01.000000000","message":"Done","commit_id":"badb0ac8379dfad0ae9d55fbc7bcf774368ccfbc"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"9bfb95f85f2eabeaf85a14cd36773cddf07ab1b4","unresolved":false,"context_lines":[{"line_number":13,"context_line":"between processes. And shared instances of socket actually doesn\u0027t work properly."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"The better way to \"cache\" sockets is to \"cache\" them inside Client"},{"line_number":16,"context_line":"insntace. So if you don\u0027t share Client instances, everything will work well."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"This fix is really important for such projects like Rally, that uses"},{"line_number":19,"context_line":"python clients in multiply processes to produce load on the cloud."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAWH%2F%2Bf9k%3D","line":16,"updated":"2014-03-26 11:39:10.000000000","message":"instance","commit_id":"badb0ac8379dfad0ae9d55fbc7bcf774368ccfbc"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"58502621dc8be8d76fa30f8e91885da9a9c08529","unresolved":false,"context_lines":[{"line_number":13,"context_line":"between processes. And shared instances of socket actually doesn\u0027t work properly."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"The better way to \"cache\" sockets is to \"cache\" them inside Client"},{"line_number":16,"context_line":"insntace. So if you don\u0027t share Client instances, everything will work well."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"This fix is really important for such projects like Rally, that uses"},{"line_number":19,"context_line":"python clients in multiply processes to produce load on the cloud."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAWH%2F%2Bf68%3D","line":16,"in_reply_to":"AAAAWH%2F%2Bf9k%3D","updated":"2014-03-26 11:43:01.000000000","message":"Done","commit_id":"badb0ac8379dfad0ae9d55fbc7bcf774368ccfbc"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"638f4f61533f90d5da09f3522ab295621673e495","unresolved":false,"context_lines":[{"line_number":10,"context_line":"it won\u0027t work."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Reason is that all global variables automatically become shared objects"},{"line_number":13,"context_line":"between processes. And shared instances of socket actually doesn\u0027t work properly."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"The better way to \"cache\" sockets is to \"cache\" them inside Client"},{"line_number":16,"context_line":"instance. So if you don\u0027t share Client instances, everything will work well."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAWH%2F%2BfgA%3D","line":13,"updated":"2014-03-26 12:49:48.000000000","message":"Also this is technically not true - they are not \"shared\" as this implies a single location, the process is forked and along with it it\u0027s fd table which will point to the same sockets.","commit_id":"2e34255394c89a5cfb8122422564cc0d79653c07"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"40cd012f274157fd1080e658da0982e7d4e7a522","unresolved":false,"context_lines":[{"line_number":16,"context_line":"instance. So if you don\u0027t share Client instances, everything will work well."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"This fix is really important for such projects like Rally, that uses"},{"line_number":19,"context_line":"python clients in multiply processes to produce load on the cloud."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: Id59e48f61bb3f3c6223302355c849e1e99673410"},{"line_number":22,"context_line":"Closes-Bug: #1297796"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAWH%2F%2Bf3U%3D","line":19,"updated":"2014-03-26 11:54:52.000000000","message":"The commit message should note that this is a regression caused by this recentish commit\n\nhttps://review.openstack.org/#/c/75196/","commit_id":"2e34255394c89a5cfb8122422564cc0d79653c07"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"bb552d0d2ba0d5725f08cd1b1e4d320c8b208664","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"*) Build a class for Pool of sockets, that simplify creation of it in other projects (e.g. Horizon)"},{"line_number":22,"context_line":"*) Add new parameter to __init__ of Client class to set pool of sockets:"},{"line_number":23,"context_line":"if pool is not setted \u003d\u003e create new Pool of sockets (and store it inside instance of client)"},{"line_number":24,"context_line":"If pool is setted \u003d\u003e use it"},{"line_number":25,"context_line":"*) Create in Horizon global pool and create all nova Clinets instances with it"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAAWH%2F%2Bc8k%3D","line":23,"updated":"2014-03-26 17:25:25.000000000","message":"s/setted/set/ (femtonit)","commit_id":"b85b5b38251a3df9d39483f5e9312dce05e5c13d"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"bb552d0d2ba0d5725f08cd1b1e4d320c8b208664","unresolved":false,"context_lines":[{"line_number":22,"context_line":"*) Add new parameter to __init__ of Client class to set pool of sockets:"},{"line_number":23,"context_line":"if pool is not setted \u003d\u003e create new Pool of sockets (and store it inside instance of client)"},{"line_number":24,"context_line":"If pool is setted \u003d\u003e use it"},{"line_number":25,"context_line":"*) Create in Horizon global pool and create all nova Clinets instances with it"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Change-Id: Id59e48f61bb3f3c6223302355c849e1e99673410"},{"line_number":28,"context_line":"Closes-Bug: #1297796"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAAWH%2F%2Bc8c%3D","line":25,"updated":"2014-03-26 17:25:25.000000000","message":"s/Clinets/Clients/ (femtonit)","commit_id":"b85b5b38251a3df9d39483f5e9312dce05e5c13d"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"db92baa48a1eaef9532a0f629d40ea0864ccb022","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"*) Build a class for Pool of sockets, that simplify creation of it in other projects (e.g. Horizon)"},{"line_number":22,"context_line":"*) Add new parameter to __init__ of Client class to set pool of sockets:"},{"line_number":23,"context_line":"if pool is not setted \u003d\u003e create new Pool of sockets (and store it inside instance of client)"},{"line_number":24,"context_line":"If pool is setted \u003d\u003e use it"},{"line_number":25,"context_line":"*) Create in Horizon global pool and create all nova Clinets instances with it"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAWH%2F%2BSV4%3D","line":23,"updated":"2014-03-27 20:49:15.000000000","message":"s/setted/set/ (femtonit)","commit_id":"1a6362c707f3e864af5098a077a5619a7d770570"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"cfea4f55f126e0b51a00d3e9979aaa72220dfec0","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"*) Build a class for Pool of sockets, that simplify creation of it in other projects (e.g. Horizon)"},{"line_number":22,"context_line":"*) Add new parameter to __init__ of Client class to set pool of sockets:"},{"line_number":23,"context_line":"if pool is not setted \u003d\u003e create new Pool of sockets (and store it inside instance of client)"},{"line_number":24,"context_line":"If pool is setted \u003d\u003e use it"},{"line_number":25,"context_line":"*) Create in Horizon global pool and create all nova Clinets instances with it"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAWH%2F%2BRgI%3D","line":23,"in_reply_to":"AAAAWH%2F%2BSV4%3D","updated":"2014-03-27 22:35:22.000000000","message":"thanks fixed","commit_id":"1a6362c707f3e864af5098a077a5619a7d770570"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"db92baa48a1eaef9532a0f629d40ea0864ccb022","unresolved":false,"context_lines":[{"line_number":22,"context_line":"*) Add new parameter to __init__ of Client class to set pool of sockets:"},{"line_number":23,"context_line":"if pool is not setted \u003d\u003e create new Pool of sockets (and store it inside instance of client)"},{"line_number":24,"context_line":"If pool is setted \u003d\u003e use it"},{"line_number":25,"context_line":"*) Create in Horizon global pool and create all nova Clinets instances with it"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Change-Id: Id59e48f61bb3f3c6223302355c849e1e99673410"},{"line_number":28,"context_line":"Closes-Bug: #1297796"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAWH%2F%2BSVs%3D","line":25,"updated":"2014-03-27 20:49:15.000000000","message":"s/Clinets/Clients/ (femtonit)","commit_id":"1a6362c707f3e864af5098a077a5619a7d770570"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"cfea4f55f126e0b51a00d3e9979aaa72220dfec0","unresolved":false,"context_lines":[{"line_number":22,"context_line":"*) Add new parameter to __init__ of Client class to set pool of sockets:"},{"line_number":23,"context_line":"if pool is not setted \u003d\u003e create new Pool of sockets (and store it inside instance of client)"},{"line_number":24,"context_line":"If pool is setted \u003d\u003e use it"},{"line_number":25,"context_line":"*) Create in Horizon global pool and create all nova Clinets instances with it"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Change-Id: Id59e48f61bb3f3c6223302355c849e1e99673410"},{"line_number":28,"context_line":"Closes-Bug: #1297796"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAWH%2F%2BRgE%3D","line":25,"in_reply_to":"AAAAWH%2F%2BSVs%3D","updated":"2014-03-27 22:35:22.000000000","message":"thanks fixed","commit_id":"1a6362c707f3e864af5098a077a5619a7d770570"}],"novaclient/client.py":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"52861e588b2ff4f45410c5d430e569a4f86e0184","unresolved":false,"context_lines":[{"line_number":39,"context_line":"from novaclient import utils"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"class AdapterPool(object):"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def __init__(self):"},{"line_number":45,"context_line":"        self._adapters \u003d {}"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2Be78%3D","line":42,"updated":"2014-03-26 14:05:35.000000000","message":"I would only maybe change the name to something that is a bit more \"underlying implementation agnostic\". Maybe ClientConnectionPool ?","commit_id":"b85b5b38251a3df9d39483f5e9312dce05e5c13d"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"7da5c0c5248bd36a761f39c1b5e30bff6a8b4cf3","unresolved":false,"context_lines":[{"line_number":39,"context_line":"from novaclient import utils"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"class AdapterPool(object):"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def __init__(self):"},{"line_number":45,"context_line":"        self._adapters \u003d {}"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BeuM%3D","line":42,"in_reply_to":"AAAAWH%2F%2Be78%3D","updated":"2014-03-26 14:29:56.000000000","message":"yep it\u0027s better\u003d)","commit_id":"b85b5b38251a3df9d39483f5e9312dce05e5c13d"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"ffefb9ec1b06380b1b557c62f28a3af638fbbf3f","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                 http_log_debug\u003dFalse, auth_system\u003d\u0027keystone\u0027,"},{"line_number":68,"context_line":"                 auth_plugin\u003dNone, auth_token\u003dNone,"},{"line_number":69,"context_line":"                 cacert\u003dNone, tenant_id\u003dNone, user_id\u003dNone,"},{"line_number":70,"context_line":"                 adapter_pool\u003dNone):"},{"line_number":71,"context_line":"        self.user \u003d user"},{"line_number":72,"context_line":"        self.user_id \u003d user_id"},{"line_number":73,"context_line":"        self.password \u003d password"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2Ber4%3D","line":70,"updated":"2014-03-26 14:34:23.000000000","message":"Then also rename this kwarg","commit_id":"b85b5b38251a3df9d39483f5e9312dce05e5c13d"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"bb552d0d2ba0d5725f08cd1b1e4d320c8b208664","unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        if adapter_pool and not isinstance(adapter_pool, AdapterPool):"},{"line_number":78,"context_line":"            raise TypeError(\"adapter_pool should be instance of %s\""},{"line_number":79,"context_line":"                            % AdapterPool)"},{"line_number":80,"context_line":"        self.adapter_pool \u003d adapter_pool or AdapterPool()"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        # This will be called by #_get_password if self.password is None."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2Bc6s%3D","line":79,"updated":"2014-03-26 17:25:25.000000000","message":"So, I\u0027m guilty of using code just like this, but I\u0027m going to argue for supporting Python duck typing  here, rather than enforcing that the adapter_pool (or client_connection_pool or whatever) be an instance of the class.  (Duck typing: if it walks like a duck and quacks like a duck, it\u0027s a duck.)  However, I\u0027m perfectly prepared to lose that argument :)","commit_id":"b85b5b38251a3df9d39483f5e9312dce05e5c13d"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"db92baa48a1eaef9532a0f629d40ea0864ccb022","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        if connection_pool and not isinstance(connection_pool,"},{"line_number":78,"context_line":"                                              ClientConnectionPool):"},{"line_number":79,"context_line":"            raise TypeError(\"connection_pool should be instance of %s\""},{"line_number":80,"context_line":"                            % ClientConnectionPool)"},{"line_number":81,"context_line":"        self.connection_pool \u003d connection_pool or ClientConnectionPool()"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        # This will be called by #_get_password if self.password is None."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2BSVk%3D","line":80,"updated":"2014-03-27 20:49:15.000000000","message":"So, I\u0027m guilty of using code just like this, but I\u0027m going to argue for supporting Python duck typing here, rather than enforcing that the adapter_pool (or client_connection_pool or whatever) be an instance of the class. (Duck typing: if it walks like a duck and quacks like a duck, it\u0027s a duck.) However, I\u0027m perfectly prepared to lose that argument :)","commit_id":"1a6362c707f3e864af5098a077a5619a7d770570"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"ed4969b9fb4e489e473b02f7c2d6793a1dc32e03","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        self.projectid \u003d projectid"},{"line_number":75,"context_line":"        self.tenant_id \u003d tenant_id"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        if connection_pool and not isinstance(connection_pool,"},{"line_number":78,"context_line":"                                              ClientConnectionPool):"},{"line_number":79,"context_line":"            raise TypeError(\"connection_pool should be instance of %s\""},{"line_number":80,"context_line":"                            % ClientConnectionPool)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2BKgA%3D","line":77,"updated":"2014-03-28 17:36:26.000000000","message":"This doesn\u0027t seem so pythonic (the isinstance check), since python is duck typed it seems better to not do this isinstance check (especially if someone wants to mock out the connection_pool object with something else for testing).","commit_id":"4cf513756e3be1e143508b5fd21a88a475bc9615"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"8bfe2ffaa9deaf575e4f589a19dcfa0fce17f5f2","unresolved":false,"context_lines":[{"line_number":193,"context_line":"            self._session \u003d requests.Session()"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    def close_session(self):"},{"line_number":196,"context_line":"        if self._session:"},{"line_number":197,"context_line":"            self._session.close()"},{"line_number":198,"context_line":"            self._session \u003d None"},{"line_number":199,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F9uGE%3D","line":196,"updated":"2014-04-02 15:47:26.000000000","message":"Why not predicate this on self._connection_pool also?  Then you don\u0027t need to have a separate _pooled_session, but can just reuse the _session attribute.","commit_id":"d35a1d951376d2dbd76993210b4b23906eaad10c"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"c1c164b76d38a3a6194626373b5f6c4b31997bdd","unresolved":false,"context_lines":[{"line_number":193,"context_line":"            self._session \u003d requests.Session()"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    def close_session(self):"},{"line_number":196,"context_line":"        if self._session:"},{"line_number":197,"context_line":"            self._session.close()"},{"line_number":198,"context_line":"            self._session \u003d None"},{"line_number":199,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F9ngY%3D","line":196,"in_reply_to":"AAAAWH%2F9q2U%3D","updated":"2014-04-03 10:30:38.000000000","message":"Done","commit_id":"d35a1d951376d2dbd76993210b4b23906eaad10c"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"77078c6d0b377294caa12fbcb772595d0972031b","unresolved":false,"context_lines":[{"line_number":193,"context_line":"            self._session \u003d requests.Session()"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    def close_session(self):"},{"line_number":196,"context_line":"        if self._session:"},{"line_number":197,"context_line":"            self._session.close()"},{"line_number":198,"context_line":"            self._session \u003d None"},{"line_number":199,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F9q2U%3D","line":196,"in_reply_to":"AAAAWH%2F9uGE%3D","updated":"2014-04-02 22:50:49.000000000","message":"+1","commit_id":"d35a1d951376d2dbd76993210b4b23906eaad10c"}],"novaclient/tests/test_client.py":[{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"ed4969b9fb4e489e473b02f7c2d6793a1dc32e03","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    @mock.patch(\"novaclient.client.adapters\")"},{"line_number":34,"context_line":"    def test_get(self, mock_http_adapter):"},{"line_number":35,"context_line":"        mock_http_adapter.HTTPAdapter \u003d random.random"},{"line_number":36,"context_line":"        pool \u003d novaclient.client.ClientConnectionPool()"},{"line_number":37,"context_line":"        self.assertEqual(pool.get(\"abc\"), pool.get(\"abc\"))"},{"line_number":38,"context_line":"        self.assertNotEqual(pool.get(\"abc\"), pool.get(\"def\"))"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2BKfU%3D","line":35,"updated":"2014-03-28 17:36:26.000000000","message":"Why use random here (random in tests always seems odd, since tests are supposed to be predictable and random usage makes them unpredictable).","commit_id":"4cf513756e3be1e143508b5fd21a88a475bc9615"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"97e050e8449014b48a50f9025f6e297fd28dc7a7","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    @mock.patch(\"novaclient.client.adapters\")"},{"line_number":34,"context_line":"    def test_get(self, mock_http_adapter):"},{"line_number":35,"context_line":"        mock_http_adapter.HTTPAdapter \u003d random.random"},{"line_number":36,"context_line":"        pool \u003d novaclient.client.ClientConnectionPool()"},{"line_number":37,"context_line":"        self.assertEqual(pool.get(\"abc\"), pool.get(\"abc\"))"},{"line_number":38,"context_line":"        self.assertNotEqual(pool.get(\"abc\"), pool.get(\"def\"))"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2BKcE%3D","line":35,"in_reply_to":"AAAAWH%2F%2BKfU%3D","updated":"2014-03-28 17:42:19.000000000","message":"yep will change","commit_id":"4cf513756e3be1e143508b5fd21a88a475bc9615"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"8bfe2ffaa9deaf575e4f589a19dcfa0fce17f5f2","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    @mock.patch(\"novaclient.client.adapters.HTTPAdapter\")"},{"line_number":33,"context_line":"    def test_get(self, mock_http_adapter):"},{"line_number":34,"context_line":"        mock_http_adapter.side_effect \u003d lambda: mock.Mock()"},{"line_number":35,"context_line":"        pool \u003d novaclient.client._ClientConnectionPool()"},{"line_number":36,"context_line":"        self.assertEqual(pool.get(\"abc\"), pool.get(\"abc\"))"},{"line_number":37,"context_line":"        self.assertNotEqual(pool.get(\"abc\"), pool.get(\"def\"))"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F9uD0%3D","line":34,"updated":"2014-04-02 15:47:26.000000000","message":"Do you *need* to create a new Mock each time HTTPAdapter is called, or would simply returning the same Mock each time be sufficient?  This should work either way; I\u0027m just curious…","commit_id":"d35a1d951376d2dbd76993210b4b23906eaad10c"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"c1c164b76d38a3a6194626373b5f6c4b31997bdd","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    @mock.patch(\"novaclient.client.adapters.HTTPAdapter\")"},{"line_number":33,"context_line":"    def test_get(self, mock_http_adapter):"},{"line_number":34,"context_line":"        mock_http_adapter.side_effect \u003d lambda: mock.Mock()"},{"line_number":35,"context_line":"        pool \u003d novaclient.client._ClientConnectionPool()"},{"line_number":36,"context_line":"        self.assertEqual(pool.get(\"abc\"), pool.get(\"abc\"))"},{"line_number":37,"context_line":"        self.assertNotEqual(pool.get(\"abc\"), pool.get(\"def\"))"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F9nfo%3D","line":34,"in_reply_to":"AAAAWH%2F9uD0%3D","updated":"2014-04-03 10:30:38.000000000","message":"If I don\u0027;t the second assertion will fail - no - it hast to create a new object.","commit_id":"d35a1d951376d2dbd76993210b4b23906eaad10c"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"8bfe2ffaa9deaf575e4f589a19dcfa0fce17f5f2","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        fake_client \u003d mock.Mock()"},{"line_number":213,"context_line":"        mock_http_client.return_value \u003d fake_client"},{"line_number":214,"context_line":"        with (novaclient.v1_1.client.Client(\"user\", \"password\", \"project_id\","},{"line_number":215,"context_line":"                auth_url\u003d\"foo/v2\")) as client:"},{"line_number":216,"context_line":"            pass"},{"line_number":217,"context_line":"        self.assertTrue(fake_client.start_session.called)"},{"line_number":218,"context_line":"        self.assertTrue(fake_client.close_session.called)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F9t%2FI%3D","line":215,"updated":"2014-04-02 15:47:26.000000000","message":"The extra parentheses aren\u0027t necessary, since your line break is among the constructor arguments (meaning it\u0027s already enclosed in parentheses).","commit_id":"d35a1d951376d2dbd76993210b4b23906eaad10c"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"c1c164b76d38a3a6194626373b5f6c4b31997bdd","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        fake_client \u003d mock.Mock()"},{"line_number":213,"context_line":"        mock_http_client.return_value \u003d fake_client"},{"line_number":214,"context_line":"        with (novaclient.v1_1.client.Client(\"user\", \"password\", \"project_id\","},{"line_number":215,"context_line":"                auth_url\u003d\"foo/v2\")) as client:"},{"line_number":216,"context_line":"            pass"},{"line_number":217,"context_line":"        self.assertTrue(fake_client.start_session.called)"},{"line_number":218,"context_line":"        self.assertTrue(fake_client.close_session.called)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F9nfk%3D","line":215,"in_reply_to":"AAAAWH%2F9t%2FI%3D","updated":"2014-04-03 10:30:38.000000000","message":"Done","commit_id":"d35a1d951376d2dbd76993210b4b23906eaad10c"},{"author":{"_account_id":2455,"name":"Tihomir Trifonov","email":"t.trifonov@gmail.com","username":"ttrifonov"},"change_message_id":"aadce94339e82af288f692a82cefc861ea98a2bd","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        with novaclient.v1_1.client.Client(\"user\", \"password\", \"project_id\","},{"line_number":215,"context_line":"                auth_url\u003d\"foo/v2\") as client:"},{"line_number":216,"context_line":"            pass"},{"line_number":217,"context_line":"        self.assertTrue(fake_client.start_session.called)"},{"line_number":218,"context_line":"        self.assertTrue(fake_client.close_session.called)"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    @mock.patch(\u0027novaclient.client.HTTPClient\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F9m40%3D","line":217,"updated":"2014-04-03 11:52:10.000000000","message":"The client method name is open_session()","commit_id":"dce0ffa644ee48c004a534d6ecd1ffbcfd59076e"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"33e1694a465ca01cd6bd197955b9424428b808ce","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        with novaclient.v1_1.client.Client(\"user\", \"password\", \"project_id\","},{"line_number":215,"context_line":"                auth_url\u003d\"foo/v2\") as client:"},{"line_number":216,"context_line":"            pass"},{"line_number":217,"context_line":"        self.assertTrue(fake_client.start_session.called)"},{"line_number":218,"context_line":"        self.assertTrue(fake_client.close_session.called)"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    @mock.patch(\u0027novaclient.client.HTTPClient\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F9mNM%3D","line":217,"in_reply_to":"AAAAWH%2F9m40%3D","updated":"2014-04-03 13:30:33.000000000","message":"Ugh! Done","commit_id":"dce0ffa644ee48c004a534d6ecd1ffbcfd59076e"}],"novaclient/v1_1/client.py":[{"author":{"_account_id":2455,"name":"Tihomir Trifonov","email":"t.trifonov@gmail.com","username":"ttrifonov"},"change_message_id":"aadce94339e82af288f692a82cefc861ea98a2bd","unresolved":false,"context_lines":[{"line_number":168,"context_line":"                                    connection_pool\u003dconnection_pool)"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    def __enter__(self):"},{"line_number":171,"context_line":"        self.client.start_session()"},{"line_number":172,"context_line":"        return self"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    def __exit__(self, t, v, tb):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F9m5Q%3D","line":171,"updated":"2014-04-03 11:52:10.000000000","message":"The client method name is open_session()","commit_id":"dce0ffa644ee48c004a534d6ecd1ffbcfd59076e"}],"novaclient/v3/client.py":[{"author":{"_account_id":2455,"name":"Tihomir Trifonov","email":"t.trifonov@gmail.com","username":"ttrifonov"},"change_message_id":"aadce94339e82af288f692a82cefc861ea98a2bd","unresolved":false,"context_lines":[{"line_number":131,"context_line":"                                    connection_pool\u003dconnection_pool)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    def __enter__(self):"},{"line_number":134,"context_line":"        self.client.start_session()"},{"line_number":135,"context_line":"        return self"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def __exit__(self, t, v, tb):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F9m5M%3D","line":134,"updated":"2014-04-03 11:52:10.000000000","message":"The client method name is open_session()","commit_id":"dce0ffa644ee48c004a534d6ecd1ffbcfd59076e"}]}
