[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:
Miss Islington (bot) 2023-02-22 03:42:04 -08:00 committed by GitHub
parent 528e91c067
commit edbde8feb7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 1 deletions

View file

@ -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):