mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-133036: Deprecate codecs.open (#133038)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
732d1b0241
commit
4e294f6feb
11 changed files with 58 additions and 37 deletions
|
|
@ -314,7 +314,8 @@ def test_bug1728403(self):
|
|||
f.write(b'\xa1')
|
||||
finally:
|
||||
f.close()
|
||||
f = codecs.open(TESTFN, encoding='cp949')
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
f = codecs.open(TESTFN, encoding='cp949')
|
||||
try:
|
||||
self.assertRaises(UnicodeDecodeError, f.read, 2)
|
||||
finally:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue