diff --git a/Doc/library/macpath.rst b/Doc/library/macpath.rst --- a/Doc/library/macpath.rst +++ b/Doc/library/macpath.rst @@ -1,16 +1,18 @@ :mod:`macpath` --- Mac OS 9 path manipulation functions ======================================================= .. module:: macpath :synopsis: Mac OS 9 path manipulation functions. **Source code:** :source:`Lib/macpath.py` +.. deprecated-removed:: 3.6 3.7 + -------------- This module is the Mac OS 9 (and earlier) implementation of the :mod:`os.path` module. It can be used to manipulate old-style Macintosh pathnames on Mac OS X (or any other platform). The following functions are available in this module: :func:`normcase`, :func:`normpath`, :func:`isabs`, :func:`join`, :func:`split`, :func:`isdir`, diff --git a/Lib/macpath.py b/Lib/macpath.py --- a/Lib/macpath.py +++ b/Lib/macpath.py @@ -1,14 +1,18 @@ """Pathname and path-related operations for the Macintosh.""" import os from stat import * import genericpath from genericpath import * +import warnings + +warnings.warn('the macpath module is deprecated in 3.6 and will be removed ' + 'in 3.7', DeprecationWarning, stacklevel=2) __all__ = ["normcase","isabs","join","splitdrive","split","splitext", "basename","dirname","commonprefix","getsize","getmtime", "getatime","getctime", "islink","exists","lexists","isdir","isfile", "expanduser","expandvars","normpath","abspath", "curdir","pardir","sep","pathsep","defpath","altsep","extsep", "devnull","realpath","supports_unicode_filenames"]