Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Hooks broken in Python 3 #73
Having two functions registered to the same hook results in a TypeError when backend.hook attempts to order the tuples:
Traceback (most recent call last): File "test.py", line 7, in app.setup() File "/Users/wdierkes/devel/cement/src/cement2/cement2/core/foundation.py", line 87, in setup for res in hook.run('cement_post_setup_hook', self): File "/Users/wdierkes/devel/cement/src/cement2/cement2/core/hook.py", line 120, in run backend.hooks[name].sort() # Will order based on weight TypeError: unorderable types: function() < function()
In python 3 it appears the entire tuple is compared rather than just the first item in the tuple (weight) in Python < 3.