)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"c7310c263e9302cfc5321ddd2677fa2c341f3374","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Refactored class to wrap default SQLAlchemy insert from"},{"line_number":10,"context_line":"select logic, added columns param to __init__ method."},{"line_number":11,"context_line":"Refactoring was needed because current implementation doesn\u0027t"},{"line_number":12,"context_line":"specify columns to insert values in INSERT clause"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: Ica5cdea10d9aa253f395ec553559dba54e062028"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a80dd14_63c0277d","line":12,"updated":"2015-03-11 15:58:37.000000000","message":"could you please file a  bug to track this and mention it here?","commit_id":"7a13a4e9dd52152c56b028f2a2060d8c2acea812"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"39efcddb773cd5922f08d42842a89ca84bc03624","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Refactored class to wrap default SQLAlchemy insert from"},{"line_number":10,"context_line":"select logic, added columns param to __init__ method."},{"line_number":11,"context_line":"Refactoring was needed because current implementation doesn\u0027t"},{"line_number":12,"context_line":"specify columns to insert values in INSERT clause"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: Ica5cdea10d9aa253f395ec553559dba54e062028"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a80dd14_afd4c1bd","line":12,"in_reply_to":"9a80dd14_63c0277d","updated":"2015-03-11 16:21:48.000000000","message":"Done","commit_id":"7a13a4e9dd52152c56b028f2a2060d8c2acea812"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"53c7c7153e882c3b78466a2d02a8d2218ac12c3c","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Timofey Durakov \u003ctdurakov@mirantis.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-03-12 12:50:21 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"InsertFromSelect class refactored"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Refactored class to wrap default SQLAlchemy insert from"},{"line_number":10,"context_line":"select logic, added columns param to __init__ method."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9a80dd14_a3f2f197","line":7,"updated":"2015-03-12 12:46:05.000000000","message":"This is mostly about fixing the insertion order - reusing of SQLAlchemy tools is an implementation detail, IMO","commit_id":"20fa392cbf0b5009d9d0f48db51a71ef7a3b10f7"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"1265465020ae8b907bfac39d02047a6bd10af4fb","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Timofey Durakov \u003ctdurakov@mirantis.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-03-12 12:50:21 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"InsertFromSelect class refactored"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Refactored class to wrap default SQLAlchemy insert from"},{"line_number":10,"context_line":"select logic, added columns param to __init__ method."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9a80dd14_7c67aab7","line":7,"in_reply_to":"9a80dd14_a3f2f197","updated":"2015-03-12 16:30:28.000000000","message":"Done","commit_id":"20fa392cbf0b5009d9d0f48db51a71ef7a3b10f7"}],"oslo_db/sqlalchemy/utils.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"c7310c263e9302cfc5321ddd2677fa2c341f3374","unresolved":false,"context_lines":[{"line_number":350,"context_line":"    # starting from version 0.8.7. Default SQLAlchemy implementation should be"},{"line_number":351,"context_line":"    # used instead of this. Deprecated."},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"    def __init__(self, table, select, cols\u003d[]):"},{"line_number":354,"context_line":"        if not cols:"},{"line_number":355,"context_line":"            cols \u003d [c.name for c in table.c]"},{"line_number":356,"context_line":"        self.insert \u003d table.insert().from_select(cols, select)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_c35d53ee","line":353,"updated":"2015-03-11 15:58:37.000000000","message":"nit: fwiw, it\u0027s better to avoid using of mutable data types as default values of method arguments. Let\u0027s use None or an empty tuple here\n\n+\n\nif we are changing this ,could you please add info on arguments and a usage example?","commit_id":"7a13a4e9dd52152c56b028f2a2060d8c2acea812"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"39efcddb773cd5922f08d42842a89ca84bc03624","unresolved":false,"context_lines":[{"line_number":350,"context_line":"    # starting from version 0.8.7. Default SQLAlchemy implementation should be"},{"line_number":351,"context_line":"    # used instead of this. Deprecated."},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"    def __init__(self, table, select, cols\u003d[]):"},{"line_number":354,"context_line":"        if not cols:"},{"line_number":355,"context_line":"            cols \u003d [c.name for c in table.c]"},{"line_number":356,"context_line":"        self.insert \u003d table.insert().from_select(cols, select)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_6fcac91b","line":353,"in_reply_to":"9a80dd14_c35d53ee","updated":"2015-03-11 16:21:48.000000000","message":"Done","commit_id":"7a13a4e9dd52152c56b028f2a2060d8c2acea812"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"7e66cf1a3d8dab767321f5dc5e5ae925650b1f60","unresolved":false,"context_lines":[{"line_number":366,"context_line":"        \"\"\""},{"line_number":367,"context_line":"        if not cols:"},{"line_number":368,"context_line":"            cols \u003d [c.name for c in table.c]"},{"line_number":369,"context_line":"        self.insert \u003d table.insert().from_select(cols, select)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    def __getattr__(self, item):"},{"line_number":372,"context_line":"        return getattr(self.insert, item)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_4777a102","line":369,"updated":"2015-03-11 20:48:10.000000000","message":"oh this also needs a flag \"inline\u003dTrue\", e.g. table.insert(inline\u003dTrue), see the note at http://docs.sqlalchemy.org/en/rel_0_9/core/dml.html?highlight\u003dfrom_select#sqlalchemy.sql.expression.Insert.from_select for background on this.","commit_id":"e627bef7b6b2f91b0800833640bdba15b3a3840a"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"5720f749d9c8141380a0d3b8bc15d48c3622bcf5","unresolved":false,"context_lines":[{"line_number":366,"context_line":"        \"\"\""},{"line_number":367,"context_line":"        if not cols:"},{"line_number":368,"context_line":"            cols \u003d [c.name for c in table.c]"},{"line_number":369,"context_line":"        self.insert \u003d table.insert().from_select(cols, select)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    def __getattr__(self, item):"},{"line_number":372,"context_line":"        return getattr(self.insert, item)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_026d9732","line":369,"in_reply_to":"9a80dd14_4777a102","updated":"2015-03-11 21:21:24.000000000","message":"Michael, thanks for your comment. I\u0027ll add flag to next patch set.","commit_id":"e627bef7b6b2f91b0800833640bdba15b3a3840a"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"885923f90638c0a5659a9543e4f578049dae4346","unresolved":false,"context_lines":[{"line_number":368,"context_line":"            cols \u003d [c.name for c in table.c]"},{"line_number":369,"context_line":"        self.insert \u003d table.insert().from_select(cols, select)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    def __getattr__(self, item):"},{"line_number":372,"context_line":"        return getattr(self.insert, item)"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_a715bd9c","line":371,"updated":"2015-03-11 20:46:50.000000000","message":"I\u0027ve always found `__getattr__` to be a tricky road to travel.  If we are really just building up `InsertFromSelect`, and then we\u0027re done, why don\u0027t we just make `InsertFromSelect` a def, that just returns the Insert() object directly?","commit_id":"e627bef7b6b2f91b0800833640bdba15b3a3840a"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"7391eaa79b944dec86250fd412d40c5a3ec46011","unresolved":false,"context_lines":[{"line_number":368,"context_line":"            cols \u003d [c.name for c in table.c]"},{"line_number":369,"context_line":"        self.insert \u003d table.insert().from_select(cols, select)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    def __getattr__(self, item):"},{"line_number":372,"context_line":"        return getattr(self.insert, item)"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_219538e4","line":371,"in_reply_to":"9a80dd14_9d61e6aa","updated":"2015-03-11 21:57:20.000000000","message":"OK so why do you need `__getattr__` at all?  because when one calls upon it to call some method, you get back the Insert() object.  Your InsertFromSelect is gone.   knowing what methods or attributes are needed would help here.","commit_id":"e627bef7b6b2f91b0800833640bdba15b3a3840a"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"5720f749d9c8141380a0d3b8bc15d48c3622bcf5","unresolved":false,"context_lines":[{"line_number":368,"context_line":"            cols \u003d [c.name for c in table.c]"},{"line_number":369,"context_line":"        self.insert \u003d table.insert().from_select(cols, select)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    def __getattr__(self, item):"},{"line_number":372,"context_line":"        return getattr(self.insert, item)"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_fd6742e8","line":371,"in_reply_to":"9a80dd14_a715bd9c","updated":"2015-03-11 21:21:24.000000000","message":"\u0027__getattr__\u0027 is tricky, but it usage allows to realize simple proxy pattern here. Changing InsertFromSelect to def breaks naming convention, and a bit ugly. Also such proxy implementation is about 2 methods long, and there is no rocket science to understand how it works.","commit_id":"e627bef7b6b2f91b0800833640bdba15b3a3840a"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"34b2a1a45b5cdbe4ba103a22008387a32f27fc81","unresolved":false,"context_lines":[{"line_number":368,"context_line":"            cols \u003d [c.name for c in table.c]"},{"line_number":369,"context_line":"        self.insert \u003d table.insert().from_select(cols, select)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    def __getattr__(self, item):"},{"line_number":372,"context_line":"        return getattr(self.insert, item)"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_9d61e6aa","line":371,"in_reply_to":"9a80dd14_fd6742e8","updated":"2015-03-11 21:24:37.000000000","message":"This class is marked as deprecated in note, so my expectations would be that no one will use it in new code.","commit_id":"e627bef7b6b2f91b0800833640bdba15b3a3840a"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"fba56ea6b4814390e18f518e802a2a848eb73c8d","unresolved":false,"context_lines":[{"line_number":368,"context_line":"            cols \u003d [c.name for c in table.c]"},{"line_number":369,"context_line":"        self.insert \u003d table.insert(inline\u003dTrue).from_select(cols, select)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    def __getattr__(self, item):"},{"line_number":372,"context_line":"        return getattr(self.insert, item)"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_5a5bdd2d","line":371,"updated":"2015-03-12 09:30:57.000000000","message":"I liked Mike\u0027s point from the previous patch set on just using def and returning table.insert() value. How about we do something like http://xsnippet.org/360567/ here? Thus, InsertFromSelect remains a class, so we don\u0027t mess with naming convention and yet we don\u0027t need a custom __getattr__ implementation.","commit_id":"39badddbee67b7048bee93636defe30e891bbd43"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"d515cabb44523de205a7dab8654d7a8aa1f2a94e","unresolved":false,"context_lines":[{"line_number":368,"context_line":"            cols \u003d [c.name for c in table.c]"},{"line_number":369,"context_line":"        self.insert \u003d table.insert(inline\u003dTrue).from_select(cols, select)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    def __getattr__(self, item):"},{"line_number":372,"context_line":"        return getattr(self.insert, item)"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_652486af","line":371,"in_reply_to":"9a80dd14_5a5bdd2d","updated":"2015-03-12 09:53:24.000000000","message":"Done","commit_id":"39badddbee67b7048bee93636defe30e891bbd43"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"53c7c7153e882c3b78466a2d02a8d2218ac12c3c","unresolved":false,"context_lines":[{"line_number":351,"context_line":"    # used instead of this. Deprecated."},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"    def __new__(cls, table, select, cols\u003dNone):"},{"line_number":354,"context_line":"        if not cols:"},{"line_number":355,"context_line":"            cols \u003d [c.name for c in table.c]"},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"        return table.insert(inline\u003dTrue).from_select(cols, select)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_e38f8921","line":354,"updated":"2015-03-12 12:46:05.000000000","message":"could you please add a test case for this new cols argument?","commit_id":"20fa392cbf0b5009d9d0f48db51a71ef7a3b10f7"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"1265465020ae8b907bfac39d02047a6bd10af4fb","unresolved":false,"context_lines":[{"line_number":351,"context_line":"    # used instead of this. Deprecated."},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"    def __new__(cls, table, select, cols\u003dNone):"},{"line_number":354,"context_line":"        if not cols:"},{"line_number":355,"context_line":"            cols \u003d [c.name for c in table.c]"},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"        return table.insert(inline\u003dTrue).from_select(cols, select)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_5c03c6b7","line":354,"in_reply_to":"9a80dd14_e38f8921","updated":"2015-03-12 16:30:28.000000000","message":"Done","commit_id":"20fa392cbf0b5009d9d0f48db51a71ef7a3b10f7"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"53c7c7153e882c3b78466a2d02a8d2218ac12c3c","unresolved":false,"context_lines":[{"line_number":359,"context_line":"    def __init__(self, table, select, cols\u003dNone):"},{"line_number":360,"context_line":"        \"\"\"Form the base for `INSERT INTO table (SELECT ... )` statement."},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"        :param table: table to insert records"},{"line_number":363,"context_line":"        :param select: select query"},{"line_number":364,"context_line":"        :param cols: list of columns to specify in insert clause"},{"line_number":365,"context_line":"        :return:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_43869514","line":362,"updated":"2015-03-12 12:46:05.000000000","message":"looks like this didn\u0027t make it into API reference - http://docs-draft.openstack.org/69/163469/4/check/gate-oslo.db-docs/ef401f0//doc/build/html/api/sqlalchemy/utils.html#oslo_db.sqlalchemy.utils.InsertFromSelect","commit_id":"20fa392cbf0b5009d9d0f48db51a71ef7a3b10f7"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"1265465020ae8b907bfac39d02047a6bd10af4fb","unresolved":false,"context_lines":[{"line_number":359,"context_line":"    def __init__(self, table, select, cols\u003dNone):"},{"line_number":360,"context_line":"        \"\"\"Form the base for `INSERT INTO table (SELECT ... )` statement."},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"        :param table: table to insert records"},{"line_number":363,"context_line":"        :param select: select query"},{"line_number":364,"context_line":"        :param cols: list of columns to specify in insert clause"},{"line_number":365,"context_line":"        :return:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_dc26d667","line":362,"in_reply_to":"9a80dd14_43869514","updated":"2015-03-12 16:30:28.000000000","message":"Done","commit_id":"20fa392cbf0b5009d9d0f48db51a71ef7a3b10f7"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"181cbb3db1a0550ed6f2bf53da09bc1a90dfa30f","unresolved":false,"context_lines":[{"line_number":349,"context_line":""},{"line_number":350,"context_line":"    DEPRECATED: this class is deprecated and will be removed from oslo.db"},{"line_number":351,"context_line":"    in a few releases. Use default SQLAlchemy insert from select implementation"},{"line_number":352,"context_line":"    instead"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"    :param table: table to insert records"},{"line_number":355,"context_line":"    :param select: select query"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_9ca7d50a","line":352,"updated":"2015-03-13 11:03:31.000000000","message":"If this is deprecated and part of the public API, this must use versionutils from oslo-incubator to track when we can removed this glue and print warning in application that consume the lib.","commit_id":"74b539baba99951563bce68799ac55fe824a7b60"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"5c5de125f6d220c974e10c4fa0cb28c6edb1be04","unresolved":false,"context_lines":[{"line_number":349,"context_line":""},{"line_number":350,"context_line":"    DEPRECATED: this class is deprecated and will be removed from oslo.db"},{"line_number":351,"context_line":"    in a few releases. Use default SQLAlchemy insert from select implementation"},{"line_number":352,"context_line":"    instead"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"    :param table: table to insert records"},{"line_number":355,"context_line":"    :param select: select query"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a6ced46_d0d53644","line":352,"in_reply_to":"9a80dd14_287b03bf","updated":"2015-03-23 14:32:27.000000000","message":"We use the similar pattern in oslo.db code, so my proposal is - to merge it as is, then file a bug fix all these things at once. Thoughts?","commit_id":"74b539baba99951563bce68799ac55fe824a7b60"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"73be8dbf81b16c83b8fd1f36d09fd7f9af2d853f","unresolved":false,"context_lines":[{"line_number":349,"context_line":""},{"line_number":350,"context_line":"    DEPRECATED: this class is deprecated and will be removed from oslo.db"},{"line_number":351,"context_line":"    in a few releases. Use default SQLAlchemy insert from select implementation"},{"line_number":352,"context_line":"    instead"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"    :param table: table to insert records"},{"line_number":355,"context_line":"    :param select: select query"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_287b03bf","line":352,"in_reply_to":"9a80dd14_9ca7d50a","updated":"2015-03-13 12:56:07.000000000","message":"Do we really need that? That way this warning will go into logs and will probably confuse operators, when the target audience here is developers. I believe, just marking it DEPRECATED in docs is OK.\n\nAnd we don\u0027t even use oslo-incubator modules now (except for tools/run_cross_tests.sh). I\u0027m not sure if it\u0027s worth it to reintroduce openstack/common again...","commit_id":"74b539baba99951563bce68799ac55fe824a7b60"}]}
