[issue12776] argparse: type conversion function should be called only once

2012-05-02 Thread Mike Meyer
Mike Meyer m...@mired.org added the comment: I've just verified that this patch also fixes 13824 and 11839. The attached patchfile adds a test to verify that using a non-existent default file fails if you don't specify the argument, and succeeds if you do. Could someone please apply

[issue12776] argparse: type conversion function should be called only once

2012-05-02 Thread Mike Meyer
Mike Meyer m...@mired.org added the comment: Sorry - got ahead of myself. It doesn't fix 13824. A deeper reading reveals that the problem wasn't quite what I thought it on first glance. -- ___ Python tracker rep...@bugs.python.org http

[issue11839] argparse: unexpected behavior of default for FileType('w')

2012-05-02 Thread Mike Meyer
Mike Meyer m...@mired.org added the comment: Steven - 12776 indeed fixes this issue. I applied the patch from it to a build of todays checkout, verified that my simple test script worked, then wrote some test cases for test_argparse. I've uploaded the patch for that test to both issues. I

[issue13697] python RLock implementation unsafe with signals

2012-05-07 Thread Mike Meyer
Mike Meyer m...@mired.org added the comment: I just ran into this issue in the logging module using 2.7. Here's the TB in case it sheds any light on the issue Traceback (most recent call last): File ./crawler.py, line 531, in module main(argv[1:]1:) File ./crawler.py, line 522, in main

[issue5370] unpickling vs. __getattr__

2009-02-25 Thread Mike Meyer
New submission from Mike Meyer m...@users.sourceforge.net: The attached short file causes all of python 2.5, 2.6 and 3.0 to drop into infinite recursion trying to unpickle the created object, but the 2.5 version has the cleanest The problem appears to be that the unpickle code (C in 3.0; Python

[issue5370] unpickling vs. __getattr__

2009-02-28 Thread Mike Meyer
Mike Meyer m...@users.sourceforge.net added the comment: The args attribute gets created by __init__ and nothing in the class removes it. I don't think it's unreasonable for the class to expect the attribute to not vanish on it. Possibly it should be spelled __args (or declared private

[issue5370] unpickling vs. __getattr__

2009-03-09 Thread Mike Meyer
Mike Meyer m...@users.sourceforge.net added the comment: I don't believe in documenting bugs instead of fixing them. If this bug is going to stay in the code, I can either fix my install of Python to have non-broken Pickle modules, or I can fix every third-party libraries objects I use whose

[issue5370] unpickling vs. __getattr__

2009-03-09 Thread Mike Meyer
Mike Meyer m...@users.sourceforge.net added the comment: QAD patch for 2.6 pickle.py to fix this bug. Passes the 2.6 pickle unit tests. -- message_count: 5.0 - 6.0 Added file: http://bugs.python.org/file13290/pp ___ Python tracker rep

[issue5370] unpickling vs. __getattr__

2009-03-13 Thread Mike Meyer
Mike Meyer m...@users.sourceforge.net added the comment: True. But hat's why it was a QAD hack - all I did was make sure it didn't blow up on the test code, and that it passed the provided unit tests. It really needs to walk the class tree. So something like hasattr(inst.__class__