)]}'
{"oslo_db/sqlalchemy/test_migrations.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"59b8d7f1c04b000fb911d42a9e4d1fc636f52831","unresolved":false,"context_lines":[{"line_number":477,"context_line":"        if isinstance(meta_col.type, sqlalchemy.Boolean):"},{"line_number":478,"context_line":"            if meta_def is None or insp_def is None:"},{"line_number":479,"context_line":"                return meta_def !\u003d insp_def"},{"line_number":480,"context_line":"            insp_def \u003d re.sub(r\"^\u0027|\u0027$\", \u0027\u0027, insp_def)"},{"line_number":481,"context_line":"            return not ("},{"line_number":482,"context_line":"                isinstance(meta_def.arg, expr.True_) and insp_def \u003d\u003d \"1\" or"},{"line_number":483,"context_line":"                isinstance(meta_def.arg, expr.False_) and insp_def \u003d\u003d \"0\""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_56b738f6","line":480,"updated":"2018-02-21 20:19:47.000000000","message":"Should that pattern be \"(^\u0027|\u0027$)\"?","commit_id":"b5a26957f559787e3359029e5b4a9982e888ed73"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"4e828e528eaccee59a249d22844d52955704d449","unresolved":false,"context_lines":[{"line_number":477,"context_line":"        if isinstance(meta_col.type, sqlalchemy.Boolean):"},{"line_number":478,"context_line":"            if meta_def is None or insp_def is None:"},{"line_number":479,"context_line":"                return meta_def !\u003d insp_def"},{"line_number":480,"context_line":"            insp_def \u003d re.sub(r\"^\u0027|\u0027$\", \u0027\u0027, insp_def)"},{"line_number":481,"context_line":"            return not ("},{"line_number":482,"context_line":"                isinstance(meta_def.arg, expr.True_) and insp_def \u003d\u003d \"1\" or"},{"line_number":483,"context_line":"                isinstance(meta_def.arg, expr.False_) and insp_def \u003d\u003d \"0\""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_767914fa","line":480,"in_reply_to":"3fa0c359_56b738f6","updated":"2018-02-21 20:33:34.000000000","message":"we\u0027re subbing them out...so unless I\u0027m staring at a mistake (frequent occurrence) I don\u0027t see a difference:\n\n\u003e\u003e\u003e import re\n\u003e\u003e\u003e a \u003d \"\u002725\u0027\"\n\u003e\u003e\u003e b \u003d \"25\"\n\u003e\u003e\u003e re.sub(r\"^\u0027|\u0027$\", \"\", a)\n\u002725\u0027\n\u003e\u003e\u003e re.sub(r\"^\u0027|\u0027$\", \"\", b)\n\u002725\u0027\n\u003e\u003e\u003e re.sub(\"(^\u0027|\u0027$)\", \"\", a)\n\u002725\u0027\n\u003e\u003e\u003e re.sub(\"(^\u0027|\u0027$)\", \"\", b)\n\u002725\u0027","commit_id":"b5a26957f559787e3359029e5b4a9982e888ed73"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"22ab514453467a601732edc805e12791e2fd0e33","unresolved":false,"context_lines":[{"line_number":477,"context_line":"        if isinstance(meta_col.type, sqlalchemy.Boolean):"},{"line_number":478,"context_line":"            if meta_def is None or insp_def is None:"},{"line_number":479,"context_line":"                return meta_def !\u003d insp_def"},{"line_number":480,"context_line":"            insp_def \u003d re.sub(r\"^\u0027|\u0027$\", \u0027\u0027, insp_def)"},{"line_number":481,"context_line":"            return not ("},{"line_number":482,"context_line":"                isinstance(meta_def.arg, expr.True_) and insp_def \u003d\u003d \"1\" or"},{"line_number":483,"context_line":"                isinstance(meta_def.arg, expr.False_) and insp_def \u003d\u003d \"0\""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_e4beceac","line":480,"in_reply_to":"3fa0c359_767914fa","updated":"2018-02-21 21:57:04.000000000","message":"I may be interpreting the precedence ordering wrong, but I read \"^\u0027|\u0027$\" as \"(start of string) followed by (\u0027 or \u0027) followed by (end of string)\" rather than \"(start of string followed by \u0027) or (\u0027 followed by end of string)\".\n\nTry a test string that is not just the bits you want to extract.\n\nAlso, how do we know when *not* to do this? I\u0027m not that familiar with this code. Is it only run for ints? What if I have a string that includes these quotes?\n\nIf we always want to remove them, can we just use insp_def.strip(\"\u0027\")?","commit_id":"b5a26957f559787e3359029e5b4a9982e888ed73"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"bd539f720b4ffa3a59b038bd1e2af1f843259709","unresolved":false,"context_lines":[{"line_number":477,"context_line":"        if isinstance(meta_col.type, sqlalchemy.Boolean):"},{"line_number":478,"context_line":"            if meta_def is None or insp_def is None:"},{"line_number":479,"context_line":"                return meta_def !\u003d insp_def"},{"line_number":480,"context_line":"            insp_def \u003d re.sub(r\"^\u0027|\u0027$\", \u0027\u0027, insp_def)"},{"line_number":481,"context_line":"            return not ("},{"line_number":482,"context_line":"                isinstance(meta_def.arg, expr.True_) and insp_def \u003d\u003d \"1\" or"},{"line_number":483,"context_line":"                isinstance(meta_def.arg, expr.False_) and insp_def \u003d\u003d \"0\""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_a7242c0e","line":480,"in_reply_to":"3fa0c359_c70cd8ed","updated":"2018-02-22 20:48:34.000000000","message":"all the characters on either side of the pipe constitute the full expression, so it translates to \"match a quote at the start of the string, OR match a quote at the end of the string\".  the regexes are run inside the conditional that first looks at the datatype of the column within the model metadata.   There\u0027s the chance that the diff here is comparing to a database column type that is completely different, which may make this interpretation of the default inappropriate, however this is all within the context of \"prove to me these two database schemas are the same\", so you\u0027d want a false result in that case anyway.\n\n\u003e If we always want to remove them, can we just use insp_def.strip(\"\u0027\")?\n\nstrip accepts a character....im sure I knew that a long time ago.  Though it would strip any number of quotes off.  that\u0027s again something that shouldn\u0027t happen here, but seems a little weird.  but sure let\u0027s just do that.","commit_id":"b5a26957f559787e3359029e5b4a9982e888ed73"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"e839ea3d994a7e50df694933f66f5fadfc977938","unresolved":false,"context_lines":[{"line_number":477,"context_line":"        if isinstance(meta_col.type, sqlalchemy.Boolean):"},{"line_number":478,"context_line":"            if meta_def is None or insp_def is None:"},{"line_number":479,"context_line":"                return meta_def !\u003d insp_def"},{"line_number":480,"context_line":"            insp_def \u003d re.sub(r\"^\u0027|\u0027$\", \u0027\u0027, insp_def)"},{"line_number":481,"context_line":"            return not ("},{"line_number":482,"context_line":"                isinstance(meta_def.arg, expr.True_) and insp_def \u003d\u003d \"1\" or"},{"line_number":483,"context_line":"                isinstance(meta_def.arg, expr.False_) and insp_def \u003d\u003d \"0\""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_c70cd8ed","line":480,"in_reply_to":"3fa0c359_e4beceac","updated":"2018-02-22 20:36:12.000000000","message":"After giving it some more thought I see how the pattern is working as expected.\n\nMy other questions still stand.","commit_id":"b5a26957f559787e3359029e5b4a9982e888ed73"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"59b8d7f1c04b000fb911d42a9e4d1fc636f52831","unresolved":false,"context_lines":[{"line_number":489,"context_line":"        if isinstance(impl_type, (sqlalchemy.Integer, sqlalchemy.BigInteger)):"},{"line_number":490,"context_line":"            if meta_def is None or insp_def is None:"},{"line_number":491,"context_line":"                return meta_def !\u003d insp_def"},{"line_number":492,"context_line":"            insp_def \u003d re.sub(r\"^\u0027|\u0027$\", \u0027\u0027, insp_def)"},{"line_number":493,"context_line":"            return meta_def.arg !\u003d insp_def"},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"    @_compare_server_default.dispatch_for(\u0027postgresql\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_d6c26853","line":492,"updated":"2018-02-21 20:19:47.000000000","message":"Same. And maybe since we have it twice the pattern should go into a variable?","commit_id":"b5a26957f559787e3359029e5b4a9982e888ed73"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"4e828e528eaccee59a249d22844d52955704d449","unresolved":false,"context_lines":[{"line_number":489,"context_line":"        if isinstance(impl_type, (sqlalchemy.Integer, sqlalchemy.BigInteger)):"},{"line_number":490,"context_line":"            if meta_def is None or insp_def is None:"},{"line_number":491,"context_line":"                return meta_def !\u003d insp_def"},{"line_number":492,"context_line":"            insp_def \u003d re.sub(r\"^\u0027|\u0027$\", \u0027\u0027, insp_def)"},{"line_number":493,"context_line":"            return meta_def.arg !\u003d insp_def"},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"    @_compare_server_default.dispatch_for(\u0027postgresql\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_d66fc825","line":492,"in_reply_to":"3fa0c359_d6c26853","updated":"2018-02-21 20:33:34.000000000","message":"lets agree on the pattern first then sure","commit_id":"b5a26957f559787e3359029e5b4a9982e888ed73"}]}
