mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
gh-105382: Remove urllib.request cafile parameter (#105384)
Remove cafile, capath and cadefault parameters of the urllib.request.urlopen() function, deprecated in Python 3.6.
This commit is contained in:
parent
94d5f9827d
commit
2587b9f64e
6 changed files with 17 additions and 77 deletions
|
@ -597,15 +597,6 @@ Connection: close
|
|||
with warnings_helper.check_warnings(('',DeprecationWarning)):
|
||||
urllib.request.URLopener()
|
||||
|
||||
@unittest.skipUnless(ssl, "ssl module required")
|
||||
def test_cafile_and_context(self):
|
||||
context = ssl.create_default_context()
|
||||
with warnings_helper.check_warnings(('', DeprecationWarning)):
|
||||
with self.assertRaises(ValueError):
|
||||
urllib.request.urlopen(
|
||||
"https://localhost", cafile="/nonexistent/path", context=context
|
||||
)
|
||||
|
||||
|
||||
class urlopen_DataTests(unittest.TestCase):
|
||||
"""Test urlopen() opening a data URL."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue