mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
[3.11] gh-101936: Update the default value of fp from io.StringIO to io.BytesIO (gh-102100) (gh-102117)
gh-101936: Update the default value of fp from io.StringIO to io.BytesIO (gh-102100)
(cherry picked from commit 0d4c7fcd4f
)
Co-authored-by: Long Vo <long.vo@linecorp.com>
This commit is contained in:
parent
528e91c067
commit
edbde8feb7
4 changed files with 5 additions and 1 deletions
|
@ -43,7 +43,7 @@ class HTTPError(URLError, urllib.response.addinfourl):
|
|||
self.fp = fp
|
||||
self.filename = url
|
||||
if fp is None:
|
||||
fp = io.StringIO()
|
||||
fp = io.BytesIO()
|
||||
self.__super_init(fp, hdrs, url, code)
|
||||
|
||||
def __str__(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue