:meth:`mimetypes.MimeTypes.add_type`.
Undotted extensions now raise a :exc:`ValueError`.
+shutil
+------
+
+* The :exc:`!ExecError` exception which has been deprecated since Python 3.14.
+ It has not been used by any function in :mod:`!shutil` since Python 3.4.
+ (Contributed by Stan Ulbrych in :gh:`149567`.)
+
symtable
--------
* The :func:`!sysconfig.expand_makefile_vars` function
which has been deprecated since Python 3.14.
Use the ``vars`` argument of :func:`sysconfig.get_paths` instead.
+ (Contributed by Stan Ulbrych in :gh:`149499`.)
tarfile
-------
if _access_check(name, mode):
return name
return None
-
-def __getattr__(name):
- if name == "ExecError":
- import warnings
- warnings._deprecated(
- "shutil.ExecError",
- f"{warnings._DEPRECATED_MSG}; it "
- "isn't raised by any shutil function.",
- remove=(3, 16)
- )
- return RuntimeError
- raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
def f(self):
if x: pass
self.x
- from shutil import ExecError
- print(ExecError)
+ from heapq import heapify_max
+ print(heapify_max)
self.assertInBytecode(f, "LOAD_FAST_BORROW", "self")
class DirectCfgOptimizerTests(CfgOptimizationTestCase):
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 # noqa: F401
if __name__ == '__main__':
--- /dev/null
+Remove the :exc:`!shutil.ExecError` exception which has been deprecated
+since Python 3.14.