)]}'
{"taskflow/states.py":[{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"e12b17e1257140001a14090b89b5e63f5a76f52b","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":14,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":15,"context_line":"#    under the License."},{"line_number":16,"context_line":"from sqlalchemy import util"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from taskflow import exceptions as exc"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"dab895d6_adda55e7","line":16,"updated":"2014-06-29 07:29:04.000000000","message":"Eck, can we get our own *similar* symbol class here and put it in our own types/ module. I\u0027d rather not have to import sqlalchemy (which shouldn\u0027t be a required dependency) just for its symbol utility class.","commit_id":"d3ea57265f81d706b01db2d0fa92fdfc5f072809"},{"author":{"_account_id":9608,"name":"Pranesh Pandurangan","email":"praneshpg@gmail.com","username":"pran1990"},"change_message_id":"b869ee17f1065819014c03013d2e6941d4ef2ba1","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":14,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":15,"context_line":"#    under the License."},{"line_number":16,"context_line":"from sqlalchemy import util"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from taskflow import exceptions as exc"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"dab895d6_4d9a9915","line":16,"in_reply_to":"dab895d6_adda55e7","updated":"2014-06-29 07:36:26.000000000","message":"K, I\u0027l do this anyway.","commit_id":"d3ea57265f81d706b01db2d0fa92fdfc5f072809"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"e12b17e1257140001a14090b89b5e63f5a76f52b","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from taskflow import exceptions as exc"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"# Job states."},{"line_number":21,"context_line":"claimed \u003d util.symbol(\u0027CLAIMED\u0027)"},{"line_number":22,"context_line":"# CLAIMED \u003d \u0027CLAIMED\u0027"},{"line_number":23,"context_line":"COMPLETE \u003d \u0027COMPLETE\u0027"},{"line_number":24,"context_line":"UNCLAIMED \u003d \u0027UNCLAIMED\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"dab895d6_ede44dae","line":21,"updated":"2014-06-29 07:29:04.000000000","message":"Lets keep them uppercase, since uppercase means the variable is constant in python and symbols should be constants.\n\nhttp://legacy.python.org/dev/peps/pep-0008/#constants","commit_id":"d3ea57265f81d706b01db2d0fa92fdfc5f072809"},{"author":{"_account_id":9608,"name":"Pranesh Pandurangan","email":"praneshpg@gmail.com","username":"pran1990"},"change_message_id":"b869ee17f1065819014c03013d2e6941d4ef2ba1","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from taskflow import exceptions as exc"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"# Job states."},{"line_number":21,"context_line":"claimed \u003d util.symbol(\u0027CLAIMED\u0027)"},{"line_number":22,"context_line":"# CLAIMED \u003d \u0027CLAIMED\u0027"},{"line_number":23,"context_line":"COMPLETE \u003d \u0027COMPLETE\u0027"},{"line_number":24,"context_line":"UNCLAIMED \u003d \u0027UNCLAIMED\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"dab895d6_6d9f5d04","line":21,"in_reply_to":"dab895d6_ede44dae","updated":"2014-06-29 07:36:26.000000000","message":"ok.","commit_id":"d3ea57265f81d706b01db2d0fa92fdfc5f072809"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"fd69ed0e3c44a7865ecda155e017e80b392ab375","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from taskflow import exceptions as exc"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class Symbol(int):"},{"line_number":22,"context_line":"    known_symbols \u003d {}"},{"line_number":23,"context_line":"    _lock \u003d threading.Lock()"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_145ed745","line":20,"updated":"2014-07-01 05:53:18.000000000","message":"Can we place this in the types folder.\n\nAlso why inherit from int (out of curosity)?","commit_id":"cf5eead02fd0a593401f21930cfa7693e1021b7f"},{"author":{"_account_id":9608,"name":"Pranesh Pandurangan","email":"praneshpg@gmail.com","username":"pran1990"},"change_message_id":"722cbe5f94915886b37b18aee18247aa246634d8","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from taskflow import exceptions as exc"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class Symbol(int):"},{"line_number":22,"context_line":"    known_symbols \u003d {}"},{"line_number":23,"context_line":"    _lock \u003d threading.Lock()"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_49f423f2","line":20,"in_reply_to":"baada198_145ed745","updated":"2014-07-01 16:41:28.000000000","message":"Note: This is the model sqlalchemy uses. \nnew_sym \u003d int.__new__(Symbol, hash(name))  below stores any new symbol as an int, so I made symbol a subtype.","commit_id":"cf5eead02fd0a593401f21930cfa7693e1021b7f"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"de7e672094b68456131ce858c92abc325fac6c59","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class Symbol(int):"},{"line_number":22,"context_line":"    known_symbols \u003d {}"},{"line_number":23,"context_line":"    _lock \u003d threading.Lock()"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    def __new__(cls, name, desc\u003dNone):"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_673127ec","line":22,"updated":"2014-07-01 05:55:31.000000000","message":"Did u want to make this visible as a public property?","commit_id":"cf5eead02fd0a593401f21930cfa7693e1021b7f"},{"author":{"_account_id":9608,"name":"Pranesh Pandurangan","email":"praneshpg@gmail.com","username":"pran1990"},"change_message_id":"722cbe5f94915886b37b18aee18247aa246634d8","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class Symbol(int):"},{"line_number":22,"context_line":"    known_symbols \u003d {}"},{"line_number":23,"context_line":"    _lock \u003d threading.Lock()"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    def __new__(cls, name, desc\u003dNone):"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_49426311","line":22,"in_reply_to":"baada198_673127ec","updated":"2014-07-01 16:41:28.000000000","message":"nope. changed.","commit_id":"cf5eead02fd0a593401f21930cfa7693e1021b7f"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"fd69ed0e3c44a7865ecda155e017e80b392ab375","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    _lock \u003d threading.Lock()"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    def __new__(cls, name, desc\u003dNone):"},{"line_number":26,"context_line":"        cls._lock.acquire()"},{"line_number":27,"context_line":"        if not isinstance(name, str):"},{"line_number":28,"context_line":"            raise exc.InvalidState(\"Cannot create state, name is not a string\")"},{"line_number":29,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_94182786","line":26,"updated":"2014-07-01 05:53:18.000000000","message":"Might as well use the lock like the following (to avoid leaving it locked).\n\nwith cls._lock:\n   \u003cdo stuff\u003e","commit_id":"cf5eead02fd0a593401f21930cfa7693e1021b7f"},{"author":{"_account_id":9608,"name":"Pranesh Pandurangan","email":"praneshpg@gmail.com","username":"pran1990"},"change_message_id":"722cbe5f94915886b37b18aee18247aa246634d8","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    _lock \u003d threading.Lock()"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    def __new__(cls, name, desc\u003dNone):"},{"line_number":26,"context_line":"        cls._lock.acquire()"},{"line_number":27,"context_line":"        if not isinstance(name, str):"},{"line_number":28,"context_line":"            raise exc.InvalidState(\"Cannot create state, name is not a string\")"},{"line_number":29,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_a9c77f44","line":26,"in_reply_to":"baada198_94182786","updated":"2014-07-01 16:41:28.000000000","message":"Good point, general question: When can I do things with \"with\"?","commit_id":"cf5eead02fd0a593401f21930cfa7693e1021b7f"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"fd69ed0e3c44a7865ecda155e017e80b392ab375","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    def __new__(cls, name, desc\u003dNone):"},{"line_number":26,"context_line":"        cls._lock.acquire()"},{"line_number":27,"context_line":"        if not isinstance(name, str):"},{"line_number":28,"context_line":"            raise exc.InvalidState(\"Cannot create state, name is not a string\")"},{"line_number":29,"context_line":"        try:"},{"line_number":30,"context_line":"            if cls.known_symbols.get(name) is None:"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_b4360b02","line":27,"updated":"2014-07-01 05:53:18.000000000","message":"Probably better to use six.string_types here and raise TypeError?","commit_id":"cf5eead02fd0a593401f21930cfa7693e1021b7f"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"e29fbc2ec61e81399baac71cb4d805af8868dbef","unresolved":false,"context_lines":[{"line_number":27,"context_line":"        if not isinstance(name, str):"},{"line_number":28,"context_line":"            raise exc.InvalidState(\"Cannot create state, name is not a string\")"},{"line_number":29,"context_line":"        try:"},{"line_number":30,"context_line":"            if cls.known_symbols.get(name) is None:"},{"line_number":31,"context_line":"                new_sym \u003d int.__new__(Symbol, hash(name))"},{"line_number":32,"context_line":"                new_sym.name \u003d name"},{"line_number":33,"context_line":"                if desc is not None:"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_07414b39","line":30,"updated":"2014-07-01 05:56:57.000000000","message":"Why not use:\n\n  if name in cls.known_symbols:","commit_id":"cf5eead02fd0a593401f21930cfa7693e1021b7f"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"fd69ed0e3c44a7865ecda155e017e80b392ab375","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        return repr(self)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def __eq__(self, other):"},{"line_number":50,"context_line":"        if isinstance(other, str) and self.name \u003d\u003d other:"},{"line_number":51,"context_line":"            return True"},{"line_number":52,"context_line":"        return False"},{"line_number":53,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_140c1742","line":50,"updated":"2014-07-01 05:53:18.000000000","message":"Same six.string_types usage instead of str.","commit_id":"cf5eead02fd0a593401f21930cfa7693e1021b7f"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"de7e672094b68456131ce858c92abc325fac6c59","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    def __eq__(self, other):"},{"line_number":50,"context_line":"        if isinstance(other, str) and self.name \u003d\u003d other:"},{"line_number":51,"context_line":"            return True"},{"line_number":52,"context_line":"        return False"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"# Job states."},{"line_number":55,"context_line":"CLAIMED \u003d Symbol(\u0027CLAIMED\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_27100f4e","line":52,"updated":"2014-07-01 05:55:31.000000000","message":"What if the `other` object is a symbol? Seems like u want to allow to symbols to be compared, perhaps using:\n\nif other is self:\n  return True","commit_id":"cf5eead02fd0a593401f21930cfa7693e1021b7f"},{"author":{"_account_id":9608,"name":"Pranesh Pandurangan","email":"praneshpg@gmail.com","username":"pran1990"},"change_message_id":"722cbe5f94915886b37b18aee18247aa246634d8","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    def __eq__(self, other):"},{"line_number":50,"context_line":"        if isinstance(other, str) and self.name \u003d\u003d other:"},{"line_number":51,"context_line":"            return True"},{"line_number":52,"context_line":"        return False"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"# Job states."},{"line_number":55,"context_line":"CLAIMED \u003d Symbol(\u0027CLAIMED\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_2918cfd2","line":52,"in_reply_to":"baada198_27100f4e","updated":"2014-07-01 16:41:28.000000000","message":"done","commit_id":"cf5eead02fd0a593401f21930cfa7693e1021b7f"}],"taskflow/types/symbol.py":[{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"f829edb1173a848c73c69543dccfc4e3c831cf24","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    def __new__(cls, name, desc\u003dNone):"},{"line_number":25,"context_line":"        with cls._lock:"},{"line_number":26,"context_line":"            if not isinstance(name, six.string_types):"},{"line_number":27,"context_line":"                raise TypeError(\"Cannot create state, name is not a string\")"},{"line_number":28,"context_line":"            if cls._known_symbols.get(name) is None:"},{"line_number":29,"context_line":"                new_sym \u003d int.__new__(Symbol, hash(name))"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_0def901f","line":26,"updated":"2014-07-01 18:40:05.000000000","message":"This string seems off ;)\n\n\"Can not create symbol?\"","commit_id":"f96b90d8907ceda105d7ff6efac55f452bb4e190"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"f829edb1173a848c73c69543dccfc4e3c831cf24","unresolved":false,"context_lines":[{"line_number":25,"context_line":"        with cls._lock:"},{"line_number":26,"context_line":"            if not isinstance(name, six.string_types):"},{"line_number":27,"context_line":"                raise TypeError(\"Cannot create state, name is not a string\")"},{"line_number":28,"context_line":"            if cls._known_symbols.get(name) is None:"},{"line_number":29,"context_line":"                new_sym \u003d int.__new__(Symbol, hash(name))"},{"line_number":30,"context_line":"                new_sym.name \u003d name"},{"line_number":31,"context_line":"                if desc is not None:"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_4df988e8","line":28,"updated":"2014-07-01 18:40:05.000000000","message":"I\u0027m still a fan of just doing \u0027name in cls._known_symbols\u0027 (since this is doing the same thing here in a more non-obvious manner).","commit_id":"f96b90d8907ceda105d7ff6efac55f452bb4e190"}]}
