[issue14233] argparse: "append" action fails to override default values

2012-03-08 Thread guilherme-pg
Changes by guilherme-pg : -- type: crash -> behavior ___ Python tracker <http://bugs.python.org/issue14233> ___ ___ Python-bugs-list mailing list Unsubscri

[issue14233] argparse: "append" action fails to override default values

2012-03-08 Thread guilherme-pg
New submission from guilherme-pg : Trying to set a default value to arguments whose action is "append" causes argparse to raise AttributeError when such arguments are provided in the command line (see attached test case t1.py). This happens because _AppendAction doesn't expect

[issue14191] argparse: nargs='*' doesn't get out-of-order positional parameters

2012-03-06 Thread guilherme-pg
guilherme-pg added the comment: I uploaded an incomplete patch that might address the issue so it can be discussed. This patch introduces 'greedy_star', a new constructor parameter to ArgumentParser that makes "*" positional arguments behave as expected in the test case

[issue14177] marshal.loads accepts unicode strings

2012-03-02 Thread guilherme-pg
guilherme-pg added the comment: Guilherme Gonçalves Thanks for the quick review. -- ___ Python tracker <http://bugs.python.org/issue14177> ___ ___ Python-bug

[issue14177] marshal.loads accepts unicode strings

2012-03-02 Thread guilherme-pg
guilherme-pg added the comment: Oops, sorry, that was unintended. I uploaded a new version of the patch with the correct documentation update, making it explicit that loads() expects a bytes object. -- Added file: http://bugs.python.org/file24717/14177-marshal-loads-deny-strings-2

[issue14177] marshal.loads accepts unicode strings

2012-03-02 Thread guilherme-pg
guilherme-pg added the comment: The attached patch attempts to solve the issue. It makes sure marshal.loads only accepts objects conforming to the buffer protocol, updates the documentation for the method accordingly, adds a test case and updates existing test cases that rely on this issue