)]}'
{"oslo_db/sqlalchemy/utils.py":[{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"875834b55adeb5e0dd5c503dae4223a2ed19a95d","unresolved":false,"context_lines":[{"line_number":236,"context_line":"                    crit_attrs.append((model_attr \u003d\u003d marker_values[j]))"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"                model_attr \u003d getattr(model, sort_keys[i])"},{"line_number":239,"context_line":"                val \u003d marker_values[i]"},{"line_number":240,"context_line":"                # sqlalchemy doesn\u0027t like booleans in \u003c \u003e. bug/1656947"},{"line_number":241,"context_line":"                val \u003d int(val) if isinstance(val, bool) else val"},{"line_number":242,"context_line":"                if sort_dirs[i].startswith(\u0027desc\u0027):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_9d4908ba","line":239,"updated":"2017-01-17 15:01:00.000000000","message":"Postgresql won\u0027t allow this:\n\n\ttest\u003d# select true \u003e 1;\n\tERROR:  operator does not exist: boolean \u003e integer\n\tLINE 1: select true \u003e 1;\n\t                    ^\n\tHINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.\n\n\nthe column needs to be cast:\n\n    if isinstance(model_attr.type, Boolean):\n        model_attr \u003d cast(model_attr, Integer)","commit_id":"7c366a35fc63bf805c33a5db97dcff27777ecf79"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"beaecdf4736374b005c657dcaba593935778b274","unresolved":false,"context_lines":[{"line_number":236,"context_line":"                    crit_attrs.append((model_attr \u003d\u003d marker_values[j]))"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"                model_attr \u003d getattr(model, sort_keys[i])"},{"line_number":239,"context_line":"                val \u003d marker_values[i]"},{"line_number":240,"context_line":"                # sqlalchemy doesn\u0027t like booleans in \u003c \u003e. bug/1656947"},{"line_number":241,"context_line":"                val \u003d int(val) if isinstance(val, bool) else val"},{"line_number":242,"context_line":"                if sort_dirs[i].startswith(\u0027desc\u0027):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_d02d32a9","line":239,"in_reply_to":"7a3c09a3_9d4908ba","updated":"2017-01-17 16:06:26.000000000","message":"Agreed. And it\u0027s not the value which, causes the traceback, but the column type (although, it still would later, as in the PostreSQL case demonstrated above, if SQLAlchemy allowed for it).","commit_id":"7c366a35fc63bf805c33a5db97dcff27777ecf79"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"d05db462f487fe0e0f799dc2d5d20ad992e2e328","unresolved":false,"context_lines":[{"line_number":236,"context_line":"                    crit_attrs.append((model_attr \u003d\u003d marker_values[j]))"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"                model_attr \u003d getattr(model, sort_keys[i])"},{"line_number":239,"context_line":"                val \u003d marker_values[i]"},{"line_number":240,"context_line":"                # sqlalchemy doesn\u0027t like booleans in \u003c \u003e. bug/1656947"},{"line_number":241,"context_line":"                val \u003d int(val) if isinstance(val, bool) else val"},{"line_number":242,"context_line":"                if sort_dirs[i].startswith(\u0027desc\u0027):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_1f1a5717","line":239,"in_reply_to":"7a3c09a3_9d4908ba","updated":"2017-01-17 20:49:46.000000000","message":"Done","commit_id":"7c366a35fc63bf805c33a5db97dcff27777ecf79"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"7319f4e8834055146f18a37a287ffa182580cd92","unresolved":false,"context_lines":[{"line_number":236,"context_line":"                    crit_attrs.append((model_attr \u003d\u003d marker_values[j]))"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"                model_attr \u003d getattr(model, sort_keys[i])"},{"line_number":239,"context_line":"                val \u003d marker_values[i]"},{"line_number":240,"context_line":"                # sqlalchemy doesn\u0027t like booleans in \u003c \u003e. bug/1656947"},{"line_number":241,"context_line":"                val \u003d int(val) if isinstance(val, bool) else val"},{"line_number":242,"context_line":"                if sort_dirs[i].startswith(\u0027desc\u0027):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_377ae577","line":239,"in_reply_to":"7a3c09a3_d02d32a9","updated":"2017-01-17 17:26:52.000000000","message":"Well the value does cause a traceback from sqlalchemy. Undo the change in this file and run the test. :)","commit_id":"7c366a35fc63bf805c33a5db97dcff27777ecf79"}],"oslo_db/tests/sqlalchemy/test_utils.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"31c8a803fc67056b4802c57264e330750b5bca78","unresolved":false,"context_lines":[{"line_number":455,"context_line":"    def test_paginate_with_boolean_sort(self):"},{"line_number":456,"context_line":"        s \u003d Session()"},{"line_number":457,"context_line":"        q \u003d s.query(FakeTable)"},{"line_number":458,"context_line":"        q \u003d utils.paginate_query(q, FakeTable, 5, [\u0027enabled\u0027],"},{"line_number":459,"context_line":"                                 sort_dirs\u003d[\u0027asc\u0027],"},{"line_number":460,"context_line":"                                 marker\u003dFakeTable(user_id\u003d\u0027hello\u0027,"},{"line_number":461,"context_line":"                                                  enabled\u003dFalse))"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a3c09a3_50667351","line":458,"updated":"2017-01-18 10:22:33.000000000","message":"nit: we could add a PK column here to avoid the warning in stderr when running this test case:\n\n WARNING [oslo_db.sqlalchemy.utils] Unique keys not in sort_keys. The sorting order may be unstable.","commit_id":"adeaa7bdcc6f5af18b0a8016864f5cbbc08d92f0"}]}
