[issue23378] argparse.add_argument action parameter should allow value extend

2015-02-02 Thread the mulhern
New submission from the mulhern: As well as the append action it would be convenient for there to be an extend action. This is kind of useful to allow something like: parser.add_argument(--foo, action=extend, nargs=+, type=str) given parser.parse_args(--foo f1 --foo f2 f3 f4.split

[issue21794] stack frame contains name of wrapper method, not that of wrapped method

2014-06-17 Thread the mulhern
New submission from the mulhern: def decorator(f): ... @functools.wraps(f) ... def new_func(self, junk): ... stack = inspect.stack() ... for i, frame in enumerate(stack): ... print(%s % frame[3]) ... f(self, junk) ... return

[issue21133] unittest discover should allow option to run each package separately

2014-04-02 Thread the mulhern
New submission from the mulhern: You can run python -m unittest discover some args and the unittests discovered by discover will be run. This is nice. However, it is actually desirable to run each unittest package individually, rather than in the same interpreter instance. When run via

[issue20897] @abstractmethod does not enforce method signatures

2014-03-18 Thread the mulhern
the mulhern added the comment: I feel that I worded this in a way that makes it look like I'm asking for an enhancement, not reporting a bug, so I'll try again. The documentation for 2.7.6 and 3.4.0 says: Using this decorator requires that the class’s metaclass is ABCMeta or is derived from

[issue20918] Logging of logging exceptions can fail in 3.4 if args are unprintable

2014-03-18 Thread the mulhern
the mulhern added the comment: Thanks for the fix. When you say having repr raise is a pretty unusual occurrence you probably mean having repr raise should be a pretty unusual occurrence. I think its more usual than you realize and the regression in 3.4 will have consequences

[issue20918] Logging of logging exceptions can fail in 3.4 if args are unprintable

2014-03-14 Thread the mulhern
the mulhern added the comment: Yes, I really misinterpreted what I saw. So glad it's a bug anyway and I'm not just wasting your time ;) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20918

[issue20918] LogRecord.__init__ should handle exception if % operation fails

2014-03-13 Thread the mulhern
New submission from the mulhern: Here's my illustrating trace: Python 3.3.2 (default, Aug 23 2013, 19:00:04) [GCC 4.8.1 20130603 (Red Hat 4.8.1-1)] on linux Type help, copyright, credits or license for more information. class Junk(): ... def __repr__(self): ... raise

[issue20145] unittest.assert*Regex functions should verify that expected_regex has a valid type

2014-03-12 Thread the mulhern
the mulhern added the comment: Thanks, I'ld definitely be _much_ happier w/ a TypeError than with silent success. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20145

[issue20897] @abstractmethod does not enforce method signatures

2014-03-12 Thread the mulhern
New submission from the mulhern: Hi! Here is a simple class hierarchy: import abc class META(object): ... __metaclass__ = abc.ABCMeta ... @abc.abstractmethod ... def _junk(self): ... pass ... class Sub(META): ... def _junk(self, other): ... pass

[issue20659] Want to make a class method a property by combining decorators

2014-02-17 Thread the mulhern
New submission from the mulhern: The problems is that it is quite possible to define a property using @property in a class and then later to realize that it really ought to be a class method, not an instance method. But then, if you change it to a class method, using @classmethod annotation

[issue20145] unittest.assert*Regex functions should verify that expected_regex has a valid type

2014-02-17 Thread the mulhern
the mulhern added the comment: Yes. I'ld check if it was a string or a regex object...there is already code that converts the string to a regular expression in there. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20145

[issue20145] unittest.assert*Regex functions should verify that expected_regex has a valid type

2014-01-06 Thread the mulhern
New submission from the mulhern: A normal thing for a developer to do is to convert a use of an assert* function to a use of an assert*Regex function and foolishly forget to actually specify the expected regular expression. If they do this, the test will always pass because the callable