]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-99352: Respect `http.client.HTTPConnection.debuglevel` in `urllib.request.Abstract...
authorWheeler Law <wheeler.law@outlook.com>
Fri, 21 Apr 2023 02:04:25 +0000 (21:04 -0500)
committerGitHub <noreply@github.com>
Fri, 21 Apr 2023 02:04:25 +0000 (19:04 -0700)
commit5c00a6224d55f8818ef567b93f484b5429e2ae80
tree9acd708383767c467730fc9d8677278b67495b1a
parent4898415df724380d4c8b0ec08e8cb92f126193c3
gh-99352: Respect `http.client.HTTPConnection.debuglevel` in `urllib.request.AbstractHTTPHandler`  (#99353)

* bugfix: let the HTTP- and HTTPSHandlers respect the value of http.client.HTTPConnection.debuglevel

* add tests

* add news

* ReSTify NEWS and reword a bit.

* Address Review Comments.

* Use mock.patch.object instead of settting the module level value.
* Used test values to assert the debuglevel.

---------

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Senthil Kumaran <senthil@python.org>
Lib/test/test_urllib2.py
Lib/urllib/request.py
Misc/NEWS.d/next/Library/2022-11-10-16-26-47.gh-issue-99353.DQFjnt.rst [new file with mode: 0644]