[issue24255] Replace debuglevel-related logic with logging

2019-06-17 Thread Aldwin Pollefeyt
Aldwin Pollefeyt added the comment: PR waiting review, Stage should be 'patch review' -- nosy: +aldwinaldwin ___ Python tracker ___

[issue24255] Replace debuglevel-related logic with logging

2018-08-08 Thread Sanyam Khurana
Sanyam Khurana added the comment: Yeah, that is understandable. I've reverted major chunk of it. Just in the http client file, I've added blank lines where ever necessary (which I think won't change the blame information for any of the code :)) Would that be okay? Also, I did a change in

[issue24255] Replace debuglevel-related logic with logging

2018-08-07 Thread R. David Murray
R. David Murray added the comment: We generally do not fix "linting errors" unless they reveal logic errors or we touch the lines of code for some other reason. We also follow the existing style of a module rather than any particular style guide (the stdlib modules are often older than all

[issue24255] Replace debuglevel-related logic with logging

2018-08-07 Thread Sanyam Khurana
Sanyam Khurana added the comment: Hey Conrad, I've merged your fixes as well. They are in the PR now. Also added your name in the NEWS entry :) @Vinay, I noticed that there are linting errors in `test_logging.py`. Does it make sense to issue a separate Pull Request to fix those? Currently,

[issue24255] Replace debuglevel-related logic with logging

2018-08-07 Thread Conrad Ho
Conrad Ho added the comment: Hi Sanyam, were you able to fix the CI errors? The fixes for the infinite loop that you are seeing in your PR CI run and the changes to test correct logging (vs testing stdout) etc are in my original patch already. I've checked that the test suite passes with my

[issue24255] Replace debuglevel-related logic with logging

2018-08-02 Thread Sanyam Khurana
Sanyam Khurana added the comment: Sure Conrad, Yeah, indeed. The patch didn't apply cleanly, so I"ve done it manually. I've raised the PR here: https://github.com/python/cpython/pull/8633 I'll check your patch and merge :) Thanks for your help too! I'm adding Python 3.7 and Python 3.8 for

[issue24255] Replace debuglevel-related logic with logging

2018-08-02 Thread Sanyam Khurana
Change by Sanyam Khurana : -- pull_requests: +8138 stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue24255] Replace debuglevel-related logic with logging

2018-08-02 Thread Conrad Ho
Conrad Ho added the comment: @Eryn in the news blurb thing I'm going to say "original patch done by Eryn Wells." Your employer should be okay with that right? :D -- ___ Python tracker

[issue24255] Replace debuglevel-related logic with logging

2018-08-02 Thread Conrad Ho
Conrad Ho added the comment: Thanks Eryn! @Sanyam if you apply the original patch directly that will currently result in some merge failures, and there are test fixes etc that I did on the second patch. Think we should combine them. I just made the chgs suggested by David on my own forked

[issue24255] Replace debuglevel-related logic with logging

2018-08-02 Thread Sanyam Khurana
Sanyam Khurana added the comment: That's okay Eryn. We really appreciate all your help. I will take this patch forward :) -- ___ Python tracker ___

[issue24255] Replace debuglevel-related logic with logging

2018-08-02 Thread Eryn Wells
Eryn Wells added the comment: Actually, I spoke too soon. My current employer isn't too keen on us contributing to open source, so I can't do this. Sorry! -- ___ Python tracker

[issue24255] Replace debuglevel-related logic with logging

2018-08-02 Thread Eryn Wells
Eryn Wells added the comment: Hi, it sounds like my original patch is the preferred approach. I can put up a GitHub PR for that. -- ___ Python tracker ___

[issue24255] Replace debuglevel-related logic with logging

2018-08-02 Thread R. David Murray
R. David Murray added the comment: Conrad: thanks for the effort, but using f-strings with logging is counterproductive. The idea behind logging is that the logged strings are not materialized unless something actually wants to output them. Using fstrings means you are doing all the work

[issue24255] Replace debuglevel-related logic with logging

2018-08-01 Thread Conrad Ho
Conrad Ho added the comment: Hi, I have referenced the original patch and created an updated patch that uses the logging module + f-strings in place of the print statements in the http.client module. Also updated the relevant tests for print/logging in test_httplib to reflect these

[issue24255] Replace debuglevel-related logic with logging

2018-05-14 Thread Megan Sosey
Megan Sosey added the comment: I'm going to work on this one since the original reporter last commented 3 years ago. I took a quick look at how the other modules are handling logging to see if I could make it consistent, and they all do it a bit differently. It might be

[issue24255] Replace debuglevel-related logic with logging

2018-02-20 Thread Sanyam Khurana
Sanyam Khurana added the comment: Hey Erin, Can you please convert your patch to a PR on Github? -- nosy: +CuriousLearner ___ Python tracker

[issue24255] Replace debuglevel-related logic with logging

2018-02-10 Thread Xavier G. Domingo
Change by Xavier G. Domingo : -- nosy: +xgdomingo ___ Python tracker ___ ___

[issue24255] Replace debuglevel-related logic with logging

2018-02-09 Thread Simon Lipp
Change by Simon Lipp : -- nosy: +sloonz ___ Python tracker ___ ___ Python-bugs-list

[issue24255] Replace debuglevel-related logic with logging

2015-06-07 Thread Eryn Wells
Eryn Wells added the comment: Here's a patch that replaces all the debuglevel stuff with logging. There's a single module-level logger that handles it all. I wasn't sure if it would be okay to break API compatibility, so I kept the debuglevel flag and the set_debuglevel() method even though

[issue24255] Replace debuglevel-related logic with logging

2015-06-06 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24255 ___ ___

[issue24255] Replace debuglevel-related logic with logging

2015-06-06 Thread Eryn Wells
Eryn Wells added the comment: Hi. This is my first issue, but I'd be willing to have a go at updating this module. Do either of you have specific ideas about what changes you want here? My thought was to import logging, create a logger object, and start by replacing all the self.debuglevel

[issue24255] Replace debuglevel-related logic with logging

2015-05-21 Thread Demian Brecht
New submission from Demian Brecht: Far too many times have I wished that changing the logging output in http.client was controllable through logging configuration rather than code changes modifying a connection's debuglevel. It would be nice if the http package was brought up to date and had

[issue24255] Replace debuglevel-related logic with logging

2015-05-21 Thread R. David Murray
R. David Murray added the comment: +1 -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24255 ___ ___ Python-bugs-list

[issue24255] Replace debuglevel-related logic with logging

2015-05-21 Thread Demian Brecht
Changes by Demian Brecht demianbre...@gmail.com: -- keywords: +easy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24255 ___ ___ Python-bugs-list