summaryrefslogtreecommitdiffstats
path: root/Lib/urllib/error.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-02-22 11:42:28 (GMT)
committerGitHub <noreply@github.com>2023-02-22 11:42:28 (GMT)
commit0f28af589bd23a1daceedfe03d920a619b03cb6c (patch)
treeea9d1e80466e0ba04134df87bef8681405f5127a /Lib/urllib/error.py
parent3e9fb1a8390f84a3db56a398eb289fec487bc7da (diff)
downloadcpython-0f28af589bd23a1daceedfe03d920a619b03cb6c.zip
cpython-0f28af589bd23a1daceedfe03d920a619b03cb6c.tar.gz
cpython-0f28af589bd23a1daceedfe03d920a619b03cb6c.tar.bz2
[3.10] gh-101936: Update the default value of fp from io.StringIO to io.BytesIO (gh-102100) (#102118)
gh-101936: Update the default value of fp from io.StringIO to io.BytesIO (gh-102100) (cherry picked from commit 0d4c7fcd4f078708a5ac6499af378ce5ee8eb211) Co-authored-by: Long Vo <long.vo@linecorp.com>
Diffstat (limited to 'Lib/urllib/error.py')
-rw-r--r--Lib/urllib/error.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/urllib/error.py b/Lib/urllib/error.py
index feec0e7..a9cd1ec 100644
--- a/Lib/urllib/error.py
+++ b/Lib/urllib/error.py
@@ -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):