[Python-ideas] Re: FEATURE REQUEST: Make `logging` Module more Pythonic

2020-08-26 Thread Christopher Barker
On Tue, Aug 25, 2020 at 12:58 AM Alex Hall wrote: > > I haven't tried it myself but https://github.com/Delgan/loguru looks > promising. > Thanks -- that DOES look nice, and is on PyPi and maintained -- I'll give a try! -CHB -- Christopher Barker, PhD Python Language Consulting - Teaching

[Python-ideas] Re: FEATURE REQUEST: Make `logging` Module more Pythonic

2020-08-25 Thread Alex Hall
On Tue, Aug 25, 2020 at 8:11 AM Christopher Barker wrote: > After, of course, looking and seeing what's already out there. (though a > quick search in PyPi turns up, surprisingly, nothing. Lots of packages that > have to do with logging, but nothing that looks like a Pythonic API -- at > least

[Python-ideas] Re: FEATURE REQUEST: Make `logging` Module more Pythonic

2020-08-25 Thread Christopher Barker
On Mon, Aug 24, 2020 at 7:39 PM Adam Hendry wrote: > In the spirit of CHB's recommendation, this is my proposal: > > Would an update/addition/alternative API to the logging module be > considered for inclusion in the stdlib? > These look like good ideas to me. And whether or not it would be

[Python-ideas] Re: FEATURE REQUEST: Make `logging` Module more Pythonic

2020-08-24 Thread Richard Damon
On 8/24/20 10:39 PM, Adam Hendry wrote: > In the spirit of CHB's recommendation, this is my proposal: > > Would an update/addition/alternative API to the logging module be > considered for inclusion in the stdlib? > >     - Use properties and magic methods instead of getter and setter > methods >  

[Python-ideas] Re: FEATURE REQUEST: Make `logging` Module more Pythonic

2020-08-24 Thread Adam Hendry
In the spirit of CHB's recommendation, this is my proposal: Would an update/addition/alternative API to the logging module be considered for inclusion in the stdlib? - Use properties and magic methods instead of getter and setter methods - Add flag tfor `sys.excepthook` to choose whether

[Python-ideas] Re: FEATURE REQUEST: Make `logging` Module more Pythonic

2020-08-24 Thread Adam Hendry
Hello Everyone, Uh-oh, I think you misunderstood me. I was trying to be funny. Raymond always does his "fist-slamming" thing in a funny way, so I was trying to emulate that. I'm not mad. This is my first feature request post. The `logging` module works, so there's nothing that needs to be fixed.

[Python-ideas] Re: FEATURE REQUEST: Make `logging` Module more Pythonic

2020-08-24 Thread Mike Miller
On 2020-08-24 09:25, Christopher Barker wrote: > I agree about the heavy rhetoric, but the OP has a good point. I have often > thought the same thing. Yes, many folks have. I've thought about it a bit myself. The logging package is comprehensive, mature, *very* flexible, and Java-esque. I've

[Python-ideas] Re: FEATURE REQUEST: Make `logging` Module more Pythonic

2020-08-24 Thread Meitham Jamaa
On 08/24, Guido van Rossum wrote: > Because all the git history would be lost, and lots of code would break. > That used to be the case but Git has options around that now. ``--ignore-rev`` and ``--ignore-revs-file`` can be used to point at style changing commits that can be excluded from

[Python-ideas] Re: FEATURE REQUEST: Make `logging` Module more Pythonic

2020-08-24 Thread Stefano Borini
On Mon, 24 Aug 2020 at 22:00, Guido van Rossum wrote: > > Well then you can keep wondering. Sorry I don't get your point. I do understand that changing all the method names would have been a major breakage, but I don't see how it would affect git history (sure, I understand that changing all the

[Python-ideas] Re: FEATURE REQUEST: Make `logging` Module more Pythonic

2020-08-24 Thread Guido van Rossum
Well then you can keep wondering. On Mon, Aug 24, 2020 at 13:59 Stefano Borini wrote: > On Mon, 24 Aug 2020 at 21:54, Guido van Rossum wrote: > > > > > > Because all the git history would be lost, and lots of code would break. > > > > Well, names could have been converted to their snake case

[Python-ideas] Re: FEATURE REQUEST: Make `logging` Module more Pythonic

2020-08-24 Thread Stefano Borini
On Mon, 24 Aug 2020 at 21:54, Guido van Rossum wrote: > > Because all the git history would be lost, and lots of code would break. Well, names could have been converted to their snake case counterpart, possibly even leaving the old camelcase form as deprecated, and in any case the breakage was

[Python-ideas] Re: FEATURE REQUEST: Make `logging` Module more Pythonic

2020-08-24 Thread Guido van Rossum
Because all the git history would be lost, and lots of code would break. On Mon, Aug 24, 2020 at 13:14 Stefano Borini wrote: > Brings me to a question. Why weren't the logger and unittest module > > "PEP-8"ified in the transition from 2 to 3? > > > > And I agree that both modules are a bit odd.

[Python-ideas] Re: FEATURE REQUEST: Make `logging` Module more Pythonic

2020-08-24 Thread Stefano Borini
Brings me to a question. Why weren't the logger and unittest module "PEP-8"ified in the transition from 2 to 3? And I agree that both modules are a bit odd. On Mon, 24 Aug 2020 at 17:31, Christopher Barker wrote: > > I agree about the heavy rhetoric, but the OP has a good point. I have often >

[Python-ideas] Re: FEATURE REQUEST: Make `logging` Module more Pythonic

2020-08-24 Thread Christopher Barker
I agree about the heavy rhetoric, but the OP has a good point. I have often thought the same thing. Isn’t it a bit ironic that the stdlib version of an important module is a poor example of Pythonic style[*] and we have to find a third party package to do something as important as logging? But

[Python-ideas] Re: FEATURE REQUEST: Make `logging` Module more Pythonic

2020-08-24 Thread Guido van Rossum
There is no need for all that heavy rhetoric. There are many 3rd party modules that provide simpler interfaces to the logging module. Go do some Googling. On Mon, Aug 24, 2020 at 06:03 Adam Hendry wrote: > Dear Python-ideas, > > After looking at the `logging` module, I slammed my fist on my