We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Infra: Check Sphinx warnings on CI
This is similar to what we have in the CPython repo, most recently: https://github.com/python/cpython/pull/106460, and will help us gradually remove Sphinx warnings, and avoid new ones being introduces.

It checks three things:

1. If a file previously had no warnings (not listed in `.nitignore`), and new ones are introduced, it fails
    * -> To prevent regressions

2. If a file previously had warnings (it's lsited in `.nitignore`), but now has none, it fails and tells us to remove it from `.nitignore`
    * To help us incrementally improve over time

3. If a file previously had warnings (it's listed in `.nitignore`), and still has warnings, it doesn't fail, but it will annotate the PR to show the warning
    * To make them more visible, and give us the opportunity to fix them

I've intentionally kept the code and layout as close as possible to the CPython version (see https://github.com/python/cpython/tree/main/Doc/tools) for easier future maintenance.



<!-- readthedocs-preview pep-previews start -->
----
:books: Documentation preview :books:: https://pep-previews--3213.org.readthedocs.build/

<!-- readthedocs-preview pep-previews end -->

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `conf.py`
Content:
```
1 # This file is placed in the public domain or under the
2 # CC0-1.0-Universal license, whichever is more permissive.
3 
4 """Configuration for building PEPs using Sphinx."""
5 
6 from pathlib import Path
7 import sys
8 
9 sys.path.append(str(Path(".").absolute()))
10 
11 # -- Project information -----------------------------------------------------
12 
13 project = "PEPs"
14 master_doc = "contents"
15 
16 # -- General configuration ---------------------------------------------------
17 
18 # Add any Sphinx extension module names here, as strings.
19 extensions = [
20     "pep_sphinx_extensions",
21     "sphinx.ext.intersphinx",
22     "sphinx.ext.githubpages",
23 ]
24 
25 # The file extensions of source files. Sphinx uses these suffixes as sources.
26 source_suffix = {
27     ".rst": "pep",
28     ".txt": "pep",
29 }
30 
31 # List of patterns (relative to source dir) to ignore when looking for source files.
32 include_patterns = [
33     # Required for Sphinx
34     "contents.rst",
35     # PEP files
36     "pep-????.rst",
37     "pep-????.txt",
38     # PEP ancillary files
39     "pep-????/*.rst",
40     # Documentation
41     "docs/*.rst",
42 ]
43 exclude_patterns = [
44     # PEP Template
45     "pep-0012/pep-NNNN.rst",
46 ]
47 
48 # Intersphinx configuration
49 intersphinx_mapping = {
50     'python': ('https://docs.python.org/3/', None),
51     'packaging': ('https://packaging.python.org/en/latest/', None),
52     'devguide': ('https://devguide.python.org/', None),
53     'py3.11': ('https://docs.python.org/3.11/', None),
54     'py3.12': ('https://docs.python.org/3.12/', None),
55 }
56 intersphinx_disabled_reftypes = []
57 
58 # -- Options for HTML output -------------------------------------------------
59 
60 # HTML output settings
61 html_math_renderer = "maths_to_html"  # Maths rendering
62 
63 # Theme settings
64 html_theme_path = ["pep_sphinx_extensions"]
65 html_theme = "pep_theme"  # The actual theme directory (child of html_theme_path)
66 html_use_index = False  # Disable index (we use PEP 0)
67 html_style = ""  # must be defined here or in theme.conf, but is unused
68 html_permalinks = False  # handled in the PEPContents transform
69 html_baseurl = "https://peps.python.org"  # to create the CNAME file
70 gettext_auto_build = False  # speed-ups
71 
72 templates_path = ["pep_sphinx_extensions/pep_theme/templates"]  # Theme template relative paths from `confdir`
73
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/conf.py b/conf.py
--- a/conf.py
+++ b/conf.py
@@ -45,6 +45,9 @@
     "pep-0012/pep-NNNN.rst",
 ]
 
+# Warn on missing references
+nitpicky = True
+
 # Intersphinx configuration
 intersphinx_mapping = {
     'python': ('https://docs.python.org/3/', None),

{"golden_diff": "diff --git a/conf.py b/conf.py\n--- a/conf.py\n+++ b/conf.py\n@@ -45,6 +45,9 @@\n     \"pep-0012/pep-NNNN.rst\",\n ]\n \n+# Warn on missing references\n+nitpicky = True\n+\n # Intersphinx configuration\n intersphinx_mapping = {\n     'python': ('https://docs.python.org/3/', None),\n", "issue": "Infra: Check Sphinx warnings on CI\nThis is similar to what we have in the CPython repo, most recently: https://github.com/python/cpython/pull/106460, and will help us gradually remove Sphinx warnings, and avoid new ones being introduces.\r\n\r\nIt checks three things:\r\n\r\n1. If a file previously had no warnings (not listed in `.nitignore`), and new ones are introduced, it fails\r\n    * -> To prevent regressions\r\n\r\n2. If a file previously had warnings (it's lsited in `.nitignore`), but now has none, it fails and tells us to remove it from `.nitignore`\r\n    * To help us incrementally improve over time\r\n\r\n3. If a file previously had warnings (it's listed in `.nitignore`), and still has warnings, it doesn't fail, but it will annotate the PR to show the warning\r\n    * To make them more visible, and give us the opportunity to fix them\r\n\r\nI've intentionally kept the code and layout as close as possible to the CPython version (see https://github.com/python/cpython/tree/main/Doc/tools) for easier future maintenance.\r\n\r\n\r\n\r\n<!-- readthedocs-preview pep-previews start -->\r\n----\n:books: Documentation preview :books:: https://pep-previews--3213.org.readthedocs.build/\n\r\n<!-- readthedocs-preview pep-previews end -->\n", "before_files": [{"content": "# This file is placed in the public domain or under the\n# CC0-1.0-Universal license, whichever is more permissive.\n\n\"\"\"Configuration for building PEPs using Sphinx.\"\"\"\n\nfrom pathlib import Path\nimport sys\n\nsys.path.append(str(Path(\".\").absolute()))\n\n# -- Project information -----------------------------------------------------\n\nproject = \"PEPs\"\nmaster_doc = \"contents\"\n\n# -- General configuration ---------------------------------------------------\n\n# Add any Sphinx extension module names here, as strings.\nextensions = [\n    \"pep_sphinx_extensions\",\n    \"sphinx.ext.intersphinx\",\n    \"sphinx.ext.githubpages\",\n]\n\n# The file extensions of source files. Sphinx uses these suffixes as sources.\nsource_suffix = {\n    \".rst\": \"pep\",\n    \".txt\": \"pep\",\n}\n\n# List of patterns (relative to source dir) to ignore when looking for source files.\ninclude_patterns = [\n    # Required for Sphinx\n    \"contents.rst\",\n    # PEP files\n    \"pep-????.rst\",\n    \"pep-????.txt\",\n    # PEP ancillary files\n    \"pep-????/*.rst\",\n    # Documentation\n    \"docs/*.rst\",\n]\nexclude_patterns = [\n    # PEP Template\n    \"pep-0012/pep-NNNN.rst\",\n]\n\n# Intersphinx configuration\nintersphinx_mapping = {\n    'python': ('https://docs.python.org/3/', None),\n    'packaging': ('https://packaging.python.org/en/latest/', None),\n    'devguide': ('https://devguide.python.org/', None),\n    'py3.11': ('https://docs.python.org/3.11/', None),\n    'py3.12': ('https://docs.python.org/3.12/', None),\n}\nintersphinx_disabled_reftypes = []\n\n# -- Options for HTML output -------------------------------------------------\n\n# HTML output settings\nhtml_math_renderer = \"maths_to_html\"  # Maths rendering\n\n# Theme settings\nhtml_theme_path = [\"pep_sphinx_extensions\"]\nhtml_theme = \"pep_theme\"  # The actual theme directory (child of html_theme_path)\nhtml_use_index = False  # Disable index (we use PEP 0)\nhtml_style = \"\"  # must be defined here or in theme.conf, but is unused\nhtml_permalinks = False  # handled in the PEPContents transform\nhtml_baseurl = \"https://peps.python.org\"  # to create the CNAME file\ngettext_auto_build = False  # speed-ups\n\ntemplates_path = [\"pep_sphinx_extensions/pep_theme/templates\"]  # Theme template relative paths from `confdir`\n", "path": "conf.py"}], "after_files": [{"content": "# This file is placed in the public domain or under the\n# CC0-1.0-Universal license, whichever is more permissive.\n\n\"\"\"Configuration for building PEPs using Sphinx.\"\"\"\n\nfrom pathlib import Path\nimport sys\n\nsys.path.append(str(Path(\".\").absolute()))\n\n# -- Project information -----------------------------------------------------\n\nproject = \"PEPs\"\nmaster_doc = \"contents\"\n\n# -- General configuration ---------------------------------------------------\n\n# Add any Sphinx extension module names here, as strings.\nextensions = [\n    \"pep_sphinx_extensions\",\n    \"sphinx.ext.intersphinx\",\n    \"sphinx.ext.githubpages\",\n]\n\n# The file extensions of source files. Sphinx uses these suffixes as sources.\nsource_suffix = {\n    \".rst\": \"pep\",\n    \".txt\": \"pep\",\n}\n\n# List of patterns (relative to source dir) to ignore when looking for source files.\ninclude_patterns = [\n    # Required for Sphinx\n    \"contents.rst\",\n    # PEP files\n    \"pep-????.rst\",\n    \"pep-????.txt\",\n    # PEP ancillary files\n    \"pep-????/*.rst\",\n    # Documentation\n    \"docs/*.rst\",\n]\nexclude_patterns = [\n    # PEP Template\n    \"pep-0012/pep-NNNN.rst\",\n]\n\n# Warn on missing references\nnitpicky = True\n\n# Intersphinx configuration\nintersphinx_mapping = {\n    'python': ('https://docs.python.org/3/', None),\n    'packaging': ('https://packaging.python.org/en/latest/', None),\n    'devguide': ('https://devguide.python.org/', None),\n    'py3.11': ('https://docs.python.org/3.11/', None),\n    'py3.12': ('https://docs.python.org/3.12/', None),\n}\nintersphinx_disabled_reftypes = []\n\n# -- Options for HTML output -------------------------------------------------\n\n# HTML output settings\nhtml_math_renderer = \"maths_to_html\"  # Maths rendering\n\n# Theme settings\nhtml_theme_path = [\"pep_sphinx_extensions\"]\nhtml_theme = \"pep_theme\"  # The actual theme directory (child of html_theme_path)\nhtml_use_index = False  # Disable index (we use PEP 0)\nhtml_style = \"\"  # must be defined here or in theme.conf, but is unused\nhtml_permalinks = False  # handled in the PEPContents transform\nhtml_baseurl = \"https://peps.python.org\"  # to create the CNAME file\ngettext_auto_build = False  # speed-ups\n\ntemplates_path = [\"pep_sphinx_extensions/pep_theme/templates\"]  # Theme template relative paths from `confdir`\n", "path": "conf.py"}]}