)]}'
{"keystone/tests/unit/test_alternative.py":[{"author":{"_account_id":11215,"name":"Vivek Dhayaal","email":"vivekdhayaal@gmail.com","username":"vivekdhayaal"},"change_message_id":"447c604a9ada5a15083b4a574d313d4591df63a8","unresolved":false,"context_lines":[{"line_number":22,"context_line":"class VersionedAPI(abc.ABCMeta):"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    def __new__(mcls, name, bases, namespace):"},{"line_number":25,"context_line":"        cls \u003d abc.ABCMeta.__new__(mcls, name, bases, namespace)"},{"line_number":26,"context_line":"        #print super(VersionedAPI, mcls)"},{"line_number":27,"context_line":"        #cls \u003d super(VersionedAPI, mcls).__new__(mcls, name, bases, namespace)"},{"line_number":28,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_a40e60e3","line":25,"updated":"2015-08-24 19:17:40.000000000","message":"Would be good to know why the class is created this way rather than the conventional \u0027super(...).__new__(...\u0027 way?","commit_id":"ff535233ec36d6355f8d67c15a4ca24f267d186b"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"3e84920cfcd6d5812f55ca358edabdf61ced9d0c","unresolved":false,"context_lines":[{"line_number":22,"context_line":"class VersionedAPI(abc.ABCMeta):"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    def __new__(mcls, name, bases, namespace):"},{"line_number":25,"context_line":"        cls \u003d abc.ABCMeta.__new__(mcls, name, bases, namespace)"},{"line_number":26,"context_line":"        #print super(VersionedAPI, mcls)"},{"line_number":27,"context_line":"        #cls \u003d super(VersionedAPI, mcls).__new__(mcls, name, bases, namespace)"},{"line_number":28,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_6de02897","line":25,"in_reply_to":"fa1b9901_a40e60e3","updated":"2015-08-24 20:41:18.000000000","message":"I did this so that it would be more obvious what is actually happening. For those that don\u0027t know that the __new__ method is a static method having \"super(VersionedAPI, mcls).__new__(mcls, ...)\" look incorrect.\n\nDoing the old way (I thought) pointed to attention to it. And beside there is no multiple inheritance to worry about or at least there shouldn\u0027t be.\n\nIf others like the the super() better I would have no issues changing it.","commit_id":"ff535233ec36d6355f8d67c15a4ca24f267d186b"},{"author":{"_account_id":11215,"name":"Vivek Dhayaal","email":"vivekdhayaal@gmail.com","username":"vivekdhayaal"},"change_message_id":"447c604a9ada5a15083b4a574d313d4591df63a8","unresolved":false,"context_lines":[{"line_number":30,"context_line":"        if not interface_version:"},{"line_number":31,"context_line":"            raise TypeError(\u0027Interface version not found\u0027)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        versioned_methods \u003d set(name for name, value in namespace.items()"},{"line_number":34,"context_line":"                                if hasattr(value, \u0027__version_added__\u0027) or"},{"line_number":35,"context_line":"                                    hasattr(value, \u0027__version_removed__\u0027))"},{"line_number":36,"context_line":"        cls.__versioned_methods__ \u003d frozenset(versioned_methods)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_24f1f0cd","line":33,"updated":"2015-08-24 19:17:40.000000000","message":"a \u0027if not required_version\u0027 check prior to this iteration, could limit the iteration to just interface classes and prevent unnecessary iterations in implementation classes.","commit_id":"ff535233ec36d6355f8d67c15a4ca24f267d186b"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"3e84920cfcd6d5812f55ca358edabdf61ced9d0c","unresolved":false,"context_lines":[{"line_number":30,"context_line":"        if not interface_version:"},{"line_number":31,"context_line":"            raise TypeError(\u0027Interface version not found\u0027)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        versioned_methods \u003d set(name for name, value in namespace.items()"},{"line_number":34,"context_line":"                                if hasattr(value, \u0027__version_added__\u0027) or"},{"line_number":35,"context_line":"                                    hasattr(value, \u0027__version_removed__\u0027))"},{"line_number":36,"context_line":"        cls.__versioned_methods__ \u003d frozenset(versioned_methods)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_4d3444dd","line":33,"in_reply_to":"fa1b9901_24f1f0cd","updated":"2015-08-24 20:41:18.000000000","message":"The class\u0027 __versioned_methods__ should be updated even if the required_version isn\u0027t set. This allow subclasses of the driver.","commit_id":"ff535233ec36d6355f8d67c15a4ca24f267d186b"},{"author":{"_account_id":11215,"name":"Vivek Dhayaal","email":"vivekdhayaal@gmail.com","username":"vivekdhayaal"},"change_message_id":"447c604a9ada5a15083b4a574d313d4591df63a8","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        required_version \u003d getattr(cls, \u0027required_version\u0027, None)"},{"line_number":39,"context_line":"        if not required_version:"},{"line_number":40,"context_line":"            return cls"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        if required_version \u003e interface_version:"},{"line_number":43,"context_line":"            raise TypeError(\u0027Required version is newer than interface version\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_042e2cfa","line":40,"updated":"2015-08-24 19:17:40.000000000","message":"What would happen if a driver implementation class didn\u0027t specify the \u0027required_version\u0027?\nThis would be the case, even with currently existing out-of-tree drivers.","commit_id":"ff535233ec36d6355f8d67c15a4ca24f267d186b"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"3e84920cfcd6d5812f55ca358edabdf61ced9d0c","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        required_version \u003d getattr(cls, \u0027required_version\u0027, None)"},{"line_number":39,"context_line":"        if not required_version:"},{"line_number":40,"context_line":"            return cls"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        if required_version \u003e interface_version:"},{"line_number":43,"context_line":"            raise TypeError(\u0027Required version is newer than interface version\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_ad35e0db","line":40,"in_reply_to":"fa1b9901_042e2cfa","updated":"2015-08-24 20:41:18.000000000","message":"We could probably make sure that required_version or interface_version exists in the namespace.","commit_id":"ff535233ec36d6355f8d67c15a4ca24f267d186b"}]}
