Renato Cunha <renatoc@gmail.com> [Wed, 14 Jul 2010 23:15:03 -0300] rev 11569
check-code: added check for reduce usage
Renato Cunha <renatoc@gmail.com> [Wed, 14 Jul 2010 23:15:00 -0300] rev 11568
check-code: check for tuple parameter unpacking (missing in py3k)
Renato Cunha <renatoc@gmail.com> [Wed, 14 Jul 2010 23:03:21 -0300] rev 11567
removed exception args indexing (not supported by py3k)
Py3k removed __getitem__ for exception classes. The correct way of
getting the exception arguments is by using the args method.
Renato Cunha <renatoc@gmail.com> [Wed, 14 Jul 2010 22:59:57 -0300] rev 11566
util: use fakebuffer as buffer in py3k
There's no buffer type in py3k, util.py has a function, called
fakebuffer, that implements a similar API. This patch implements
fakebuffer as a memoryview wrapper in py3k.
Renato Cunha <renatoc@gmail.com> [Wed, 14 Jul 2010 22:59:43 -0300] rev 11565
util: improved the check for the existence of the 'buffer' builtin
2to3 is unable to translate '__builtin__' calls to 'builtins' when
hasattr is used (as in hasattr(__builtin__, buffer)). Translating the
check to the format
try:
whatever
except NameError
# define whatever
__builtin__.whatever = whatever
is a correct way of checking for the name and has the benefit of being
translated by 2to3. This patch implements the same idea for the
aforementioned example.
Renato Cunha <renatoc@gmail.com> [Wed, 14 Jul 2010 22:58:29 -0300] rev 11564
record: removed 'has_key' usage
Py3k has removed the dictionary has_key method. This patch implements
a one argument function that can be used as a callback by hg.revert in
the record extension.