[issue27650] Implement `__repr__` methods for logging.Logger and others

2016-12-27 Thread Vinay Sajip
Vinay Sajip added the comment: This sounds like a Celery bug, so I don't propose to change anything in this area. -- ___ Python tracker ___

[issue27650] Implement `__repr__` methods for logging.Logger and others

2016-12-27 Thread Felix Yan
Changes by Felix Yan : -- nosy: +felixonmars ___ Python tracker ___ ___

[issue27650] Implement `__repr__` methods for logging.Logger and others

2016-12-27 Thread lilydjwg
lilydjwg added the comment: This hangs this test from celery: https://github.com/celery/celery/blob/master/t/unit/app/test_log.py#L72 It constructs a Logger with `.parent` to itself, making getEffectiveLevel loop forever. The code tries to raise an exception when such loops are detected, but

[issue27650] Implement `__repr__` methods for logging.Logger and others

2016-08-06 Thread Ram Rachum
Ram Rachum added the comment: Okay, but consider that if there are no tests, this code will never be run during testing. Consider that if there's a bug in that code that causes an exception to be raised (unlikely, I know, but maybe from the call to getLevelName) it won't be discovered until a

[issue27650] Implement `__repr__` methods for logging.Logger and others

2016-08-06 Thread Vinay Sajip
Vinay Sajip added the comment: IMO it's not really worth adding tests for __repr__() - because no external code should depend on the exact representation of instances of these kinds of classes. -- ___ Python tracker

[issue27650] Implement `__repr__` methods for logging.Logger and others

2016-08-06 Thread Ram Rachum
Ram Rachum added the comment: If you want, I can implement them. -- ___ Python tracker ___ ___

[issue27650] Implement `__repr__` methods for logging.Logger and others

2016-08-06 Thread Ram Rachum
Ram Rachum added the comment: Vinay: Looks good to me. What do you think about adding tests? -- ___ Python tracker ___

[issue27650] Implement `__repr__` methods for logging.Logger and others

2016-08-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6c304a2ca139 by Vinay Sajip in branch 'default': Closes #27650: Implemented repr methods for logging objects. https://hg.python.org/cpython/rev/6c304a2ca139 -- nosy: +python-dev resolution: -> fixed stage: patch review -> resolved status:

[issue27650] Implement `__repr__` methods for logging.Logger and others

2016-08-03 Thread Vinay Sajip
Vinay Sajip added the comment: See attached patch for proposed changes. -- assignee: -> vinay.sajip keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file43991/patch-1.diff ___ Python tracker

[issue27650] Implement `__repr__` methods for logging.Logger and others

2016-07-29 Thread Ram Rachum
New submission from Ram Rachum: A while ago I was debugging through code that uses the `logging` module, and I was looking at `Logger` objects and possibly other kinds of objects (maybe handlers? It was a while ago.) I was frustrated because I was trying to figure out what a particular logger