mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
Fix import of HTTPError (GH-22304) (GH-26047)
Import HTTPError from urllib.error instead of urllib.request.
(cherry picked from commit 5fedf71439
)
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
This commit is contained in:
parent
1e4ca09d82
commit
6098214b98
2 changed files with 3 additions and 2 deletions
|
@ -9,7 +9,8 @@ import os
|
|||
import io
|
||||
import hashlib
|
||||
from base64 import standard_b64encode
|
||||
from urllib.request import urlopen, Request, HTTPError
|
||||
from urllib.error import HTTPError
|
||||
from urllib.request import urlopen, Request
|
||||
from urllib.parse import urlparse
|
||||
from distutils.errors import DistutilsError, DistutilsOptionError
|
||||
from distutils.core import PyPIRCCommand
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import os
|
||||
import unittest
|
||||
import unittest.mock as mock
|
||||
from urllib.request import HTTPError
|
||||
from urllib.error import HTTPError
|
||||
|
||||
from test.support import run_unittest
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue