From 089551b70e4a6a34fee4a3fa0428d49b48d8a486 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Thu, 7 Dec 2023 20:57:30 +0000 Subject: [PATCH] [3.12] gh-101100: Silence Sphinx warnings when `ntpath` or `posixpath` are referenced (#112833) (cherry-picked from commit 2c3906bc4b) --- Doc/conf.py | 4 ++++ Doc/tools/.nitignore | 1 - Doc/whatsnew/3.7.rst | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Doc/conf.py b/Doc/conf.py index 6bc8090f62f3d2..c8e4e0f5790f05 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -160,6 +160,10 @@ # Deprecated function that was never documented: ('py:func', 'getargspec'), ('py:func', 'inspect.getargspec'), + # Undocumented modules that users shouldn't have to worry about + # (implementation details of `os.path`): + ('py:mod', 'ntpath'), + ('py:mod', 'posixpath'), ] # Temporary undocumented names. diff --git a/Doc/tools/.nitignore b/Doc/tools/.nitignore index 039bbf7a844cc2..3b5bd6a108cd79 100644 --- a/Doc/tools/.nitignore +++ b/Doc/tools/.nitignore @@ -82,7 +82,6 @@ Doc/library/multiprocessing.shared_memory.rst Doc/library/nntplib.rst Doc/library/numbers.rst Doc/library/optparse.rst -Doc/library/os.path.rst Doc/library/os.rst Doc/library/ossaudiodev.rst Doc/library/pickle.rst diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst index 625140bb156138..fbd495e3d8651a 100644 --- a/Doc/whatsnew/3.7.rst +++ b/Doc/whatsnew/3.7.rst @@ -2144,9 +2144,9 @@ The following features and APIs have been removed from Python 3.7: * Removed support of the *exclude* argument in :meth:`tarfile.TarFile.add`. It was deprecated in Python 2.7 and 3.2. Use the *filter* argument instead. -* The ``splitunc()`` function in the :mod:`ntpath` module was deprecated in - Python 3.1, and has now been removed. Use the :func:`~os.path.splitdrive` - function instead. +* The :func:`!ntpath.splitunc` function was deprecated in + Python 3.1, and has now been removed. Use :func:`~os.path.splitdrive` + instead. * :func:`collections.namedtuple` no longer supports the *verbose* parameter or ``_source`` attribute which showed the generated source code for the