From 1e5a8a4dabc625509d561569f3c97e3e9429e1b5 Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Fri, 1 Sep 2023 13:57:34 +0300 Subject: [PATCH] [3.12] gh-101100: Fix sphinx warnings in `tutorial/appendix.rst` (GH-108750) Co-authored-by: Hugo van Kemenade . (cherry picked from commit 3047f09490ae63f25d57efe1d14a9a65d9b5f6db) Co-authored-by: Nikita Sobolev --- Doc/constraints.txt | 2 +- Doc/tools/.nitignore | 1 - Doc/tutorial/appendix.rst | 8 ++++---- Tools/scripts/run_tests.py | 1 + 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Doc/constraints.txt b/Doc/constraints.txt index 54888eaab242eea..de0e8e255ba827b 100644 --- a/Doc/constraints.txt +++ b/Doc/constraints.txt @@ -11,7 +11,7 @@ imagesize<1.5 Jinja2<3.2 packaging<24 # Pygments==2.15.0 breaks CI -Pygments<2.16,!=2.15.0 +Pygments>=2.15,<3 requests<3 snowballstemmer<3 sphinxcontrib-applehelp<1.1 diff --git a/Doc/tools/.nitignore b/Doc/tools/.nitignore index 765fbe2ca9e2409..eb70e5e08cb849d 100644 --- a/Doc/tools/.nitignore +++ b/Doc/tools/.nitignore @@ -171,7 +171,6 @@ Doc/reference/datamodel.rst Doc/reference/expressions.rst Doc/reference/import.rst Doc/reference/simple_stmts.rst -Doc/tutorial/appendix.rst Doc/tutorial/classes.rst Doc/tutorial/controlflow.rst Doc/tutorial/datastructures.rst diff --git a/Doc/tutorial/appendix.rst b/Doc/tutorial/appendix.rst index 241a812037469e2..588591fcdb726f7 100644 --- a/Doc/tutorial/appendix.rst +++ b/Doc/tutorial/appendix.rst @@ -101,8 +101,8 @@ in the script:: The Customization Modules ------------------------- -Python provides two hooks to let you customize it: :mod:`sitecustomize` and -:mod:`usercustomize`. To see how it works, you need first to find the location +Python provides two hooks to let you customize it: :index:`sitecustomize` and +:index:`usercustomize`. To see how it works, you need first to find the location of your user site-packages directory. Start Python and run this code:: >>> import site @@ -113,9 +113,9 @@ Now you can create a file named :file:`usercustomize.py` in that directory and put anything you want in it. It will affect every invocation of Python, unless it is started with the :option:`-s` option to disable the automatic import. -:mod:`sitecustomize` works in the same way, but is typically created by an +:index:`sitecustomize` works in the same way, but is typically created by an administrator of the computer in the global site-packages directory, and is -imported before :mod:`usercustomize`. See the documentation of the :mod:`site` +imported before :index:`usercustomize`. See the documentation of the :mod:`site` module for more details. diff --git a/Tools/scripts/run_tests.py b/Tools/scripts/run_tests.py index 445a34ae3e8eeeb..a0e448bd2e9104d 100644 --- a/Tools/scripts/run_tests.py +++ b/Tools/scripts/run_tests.py @@ -29,6 +29,7 @@ def main(regrtest_args): args = [sys.executable, '-u', # Unbuffered stdout and stderr '-W', 'default', # Warnings set to 'default' + '-W', 'error::DeprecationWarning', # TODO '-bb', # Warnings about bytes/bytearray ]