mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-123084: Turn shutil.ExecError
into a deprecated alias of RuntimeError
(#123125)
This commit is contained in:
parent
f88c14d412
commit
9dbd123755
4 changed files with 25 additions and 4 deletions
|
@ -3393,7 +3393,7 @@ class PublicAPITests(unittest.TestCase):
|
|||
self.assertTrue(hasattr(shutil, '__all__'))
|
||||
target_api = ['copyfileobj', 'copyfile', 'copymode', 'copystat',
|
||||
'copy', 'copy2', 'copytree', 'move', 'rmtree', 'Error',
|
||||
'SpecialFileError', 'ExecError', 'make_archive',
|
||||
'SpecialFileError', 'make_archive',
|
||||
'get_archive_formats', 'register_archive_format',
|
||||
'unregister_archive_format', 'get_unpack_formats',
|
||||
'register_unpack_format', 'unregister_unpack_format',
|
||||
|
@ -3402,6 +3402,8 @@ class PublicAPITests(unittest.TestCase):
|
|||
if hasattr(os, 'statvfs') or os.name == 'nt':
|
||||
target_api.append('disk_usage')
|
||||
self.assertEqual(set(shutil.__all__), set(target_api))
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
from shutil import ExecError
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue