prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Broken source links on the stable version of the documentation
  ## Description of bug / unexpected behavior
  Source links on the stable version of documentation does not work. It links to something like this: https://github.com/ManimCommunity/manim/blob/stable/manim/mobject/changing.py which is a 404 error. 
  
  ## Expected behavior
  Source links should link to a file containing source code for the stable version. 
  
  ## How to reproduce the issue
  On the documentation website, switch the version to stable. Navigate to and click the source link of any class. 
  
  ## Additional comments
  Perhaps this is an access rights issue, which explains why it evaded detection from community devs for so long?
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `docs/source/conf.py`
  Content:
  ```
  1 # Configuration file for the Sphinx documentation builder.
  2 #
  3 # This file only contains a selection of the most common options. For a full
  4 # list see the documentation:
  5 # https://www.sphinx-doc.org/en/master/usage/configuration.html
  6 
  7 # -- Path setup --------------------------------------------------------------
  8 
  9 # If extensions (or modules to document with autodoc) are in another directory,
  10 # add these directories to sys.path here. If the directory is relative to the
  11 # documentation root, use os.path.abspath to make it absolute, like shown here.
  12 
  13 import os
  14 import sys
  15 from distutils.sysconfig import get_python_lib
  16 from pathlib import Path
  17 
  18 sys.path.insert(0, os.path.abspath("."))
  19 
  20 
  21 if os.environ.get("READTHEDOCS") == "True":
  22     site_path = get_python_lib()
  23     # we need to add ffmpeg to the path
  24     ffmpeg_path = os.path.join(site_path, "imageio_ffmpeg", "binaries")
  25     # the included binary is named ffmpeg-linux..., create a symlink
  26     [ffmpeg_bin] = [
  27         file for file in os.listdir(ffmpeg_path) if file.startswith("ffmpeg-")
  28     ]
  29     os.symlink(
  30         os.path.join(ffmpeg_path, ffmpeg_bin), os.path.join(ffmpeg_path, "ffmpeg")
  31     )
  32     os.environ["PATH"] += os.pathsep + ffmpeg_path
  33 
  34 
  35 # -- Project information -----------------------------------------------------
  36 
  37 project = "Manim"
  38 copyright = "2020, The Manim Community Dev Team"
  39 author = "The Manim Community Dev Team"
  40 
  41 
  42 # -- General configuration ---------------------------------------------------
  43 
  44 # Add any Sphinx extension module names here, as strings. They can be
  45 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  46 # ones.
  47 extensions = [
  48     "sphinx.ext.autodoc",
  49     "recommonmark",
  50     "sphinx_copybutton",
  51     "sphinx.ext.napoleon",
  52     "sphinx.ext.autosummary",
  53     "sphinx.ext.doctest",
  54     "sphinx.ext.extlinks",
  55     "sphinx.ext.linkcode",
  56     "sphinxext.opengraph",
  57     "manim_directive",
  58 ]
  59 
  60 # Automatically generate stub pages when using the .. autosummary directive
  61 autosummary_generate = True
  62 
  63 # generate documentation from type hints
  64 autodoc_typehints = "description"
  65 autoclass_content = "both"
  66 
  67 # controls whether functions documented by the autofunction directive
  68 # appear with their full module names
  69 add_module_names = False
  70 
  71 # Add any paths that contain templates here, relative to this directory.
  72 templates_path = ["_templates"]
  73 
  74 # Custom section headings in our documentation
  75 napoleon_custom_sections = ["Tests", ("Test", "Tests")]
  76 
  77 # List of patterns, relative to source directory, that match files and
  78 # directories to ignore when looking for source files.
  79 # This pattern also affects html_static_path and html_extra_path.
  80 exclude_patterns = []
  81 
  82 
  83 # -- Options for HTML output -------------------------------------------------
  84 
  85 # The theme to use for HTML and HTML Help pages.  See the documentation for
  86 # a list of builtin themes.
  87 #
  88 import guzzle_sphinx_theme
  89 
  90 html_theme_path = guzzle_sphinx_theme.html_theme_path()
  91 html_theme = "guzzle_sphinx_theme"
  92 html_favicon = str(Path("_static/favicon.ico"))
  93 
  94 # There's a standing issue with Sphinx's new-style sidebars.  This is a
  95 # workaround.  Taken from
  96 # https://github.com/guzzle/guzzle_sphinx_theme/issues/33#issuecomment-637081826
  97 html_sidebars = {"**": ["logo-text.html", "globaltoc.html", "searchbox.html"]}
  98 
  99 # Register the theme as an extension to generate a sitemap.xml
  100 extensions.append("guzzle_sphinx_theme")
  101 
  102 # Add any paths that contain custom static files (such as style sheets) here,
  103 # relative to this directory. They are copied after the builtin static files,
  104 # so a file named "default.css" will overwrite the builtin "default.css".
  105 html_static_path = ["_static"]
  106 
  107 # This specifies any additional css files that will override the theme's
  108 html_css_files = ["custom.css"]
  109 
  110 # source links to github
  111 def linkcode_resolve(domain, info):
  112     if domain != "py":
  113         return None
  114     if not info["module"]:
  115         return None
  116     filename = info["module"].replace(".", "/")
  117     version = os.getenv("READTHEDOCS_VERSION", "master")
  118     if version == "latest":
  119         version = "master"
  120     return f"https://github.com/ManimCommunity/manim/blob/{version}/{filename}.py"
  121 
  122 
  123 # external links
  124 extlinks = {
  125     "issue": ("https://github.com/ManimCommunity/manim/issues/%s", "issue "),
  126     "pr": ("https://github.com/ManimCommunity/manim/pull/%s", "pull request "),
  127 }
  128 
  129 # opengraph settings
  130 ogp_image = "https://www.manim.community/logo.png"
  131 ogp_site_name = "Manim Community | Documentation"
  132 ogp_site_url = "https://docs.manim.community/"
  133
  ```
  --- 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()
  
  ```
  
golden_diff: diff --git a/docs/source/conf.py b/docs/source/conf.py
  --- a/docs/source/conf.py
  +++ b/docs/source/conf.py
  @@ -115,7 +115,7 @@
           return None
       filename = info["module"].replace(".", "/")
       version = os.getenv("READTHEDOCS_VERSION", "master")
  -    if version == "latest":
  +    if version == "latest" or version == "stable":
           version = "master"
       return f"https://github.com/ManimCommunity/manim/blob/{version}/{filename}.py"
  
verification_info: {"golden_diff": "diff --git a/docs/source/conf.py b/docs/source/conf.py\n--- a/docs/source/conf.py\n+++ b/docs/source/conf.py\n@@ -115,7 +115,7 @@\n         return None\n     filename = info[\"module\"].replace(\".\", \"/\")\n     version = os.getenv(\"READTHEDOCS_VERSION\", \"master\")\n-    if version == \"latest\":\n+    if version == \"latest\" or version == \"stable\":\n         version = \"master\"\n     return f\"https://github.com/ManimCommunity/manim/blob/{version}/{filename}.py\"\n", "issue": "Broken source links on the stable version of the documentation\n## Description of bug / unexpected behavior\nSource links on the stable version of documentation does not work. It links to something like this: https://github.com/ManimCommunity/manim/blob/stable/manim/mobject/changing.py which is a 404 error. \n\n## Expected behavior\nSource links should link to a file containing source code for the stable version. \n\n## How to reproduce the issue\nOn the documentation website, switch the version to stable. Navigate to and click the source link of any class. \n\n## Additional comments\nPerhaps this is an access rights issue, which explains why it evaded detection from community devs for so long?\n\n", "before_files": [{"content": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# https://www.sphinx-doc.org/en/master/usage/configuration.html\n\n# -- Path setup --------------------------------------------------------------\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\n\nimport os\nimport sys\nfrom distutils.sysconfig import get_python_lib\nfrom pathlib import Path\n\nsys.path.insert(0, os.path.abspath(\".\"))\n\n\nif os.environ.get(\"READTHEDOCS\") == \"True\":\n    site_path = get_python_lib()\n    # we need to add ffmpeg to the path\n    ffmpeg_path = os.path.join(site_path, \"imageio_ffmpeg\", \"binaries\")\n    # the included binary is named ffmpeg-linux..., create a symlink\n    [ffmpeg_bin] = [\n        file for file in os.listdir(ffmpeg_path) if file.startswith(\"ffmpeg-\")\n    ]\n    os.symlink(\n        os.path.join(ffmpeg_path, ffmpeg_bin), os.path.join(ffmpeg_path, \"ffmpeg\")\n    )\n    os.environ[\"PATH\"] += os.pathsep + ffmpeg_path\n\n\n# -- Project information -----------------------------------------------------\n\nproject = \"Manim\"\ncopyright = \"2020, The Manim Community Dev Team\"\nauthor = \"The Manim Community Dev Team\"\n\n\n# -- General configuration ---------------------------------------------------\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n    \"sphinx.ext.autodoc\",\n    \"recommonmark\",\n    \"sphinx_copybutton\",\n    \"sphinx.ext.napoleon\",\n    \"sphinx.ext.autosummary\",\n    \"sphinx.ext.doctest\",\n    \"sphinx.ext.extlinks\",\n    \"sphinx.ext.linkcode\",\n    \"sphinxext.opengraph\",\n    \"manim_directive\",\n]\n\n# Automatically generate stub pages when using the .. autosummary directive\nautosummary_generate = True\n\n# generate documentation from type hints\nautodoc_typehints = \"description\"\nautoclass_content = \"both\"\n\n# controls whether functions documented by the autofunction directive\n# appear with their full module names\nadd_module_names = False\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = [\"_templates\"]\n\n# Custom section headings in our documentation\nnapoleon_custom_sections = [\"Tests\", (\"Test\", \"Tests\")]\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This pattern also affects html_static_path and html_extra_path.\nexclude_patterns = []\n\n\n# -- Options for HTML output -------------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\n#\nimport guzzle_sphinx_theme\n\nhtml_theme_path = guzzle_sphinx_theme.html_theme_path()\nhtml_theme = \"guzzle_sphinx_theme\"\nhtml_favicon = str(Path(\"_static/favicon.ico\"))\n\n# There's a standing issue with Sphinx's new-style sidebars.  This is a\n# workaround.  Taken from\n# https://github.com/guzzle/guzzle_sphinx_theme/issues/33#issuecomment-637081826\nhtml_sidebars = {\"**\": [\"logo-text.html\", \"globaltoc.html\", \"searchbox.html\"]}\n\n# Register the theme as an extension to generate a sitemap.xml\nextensions.append(\"guzzle_sphinx_theme\")\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = [\"_static\"]\n\n# This specifies any additional css files that will override the theme's\nhtml_css_files = [\"custom.css\"]\n\n# source links to github\ndef linkcode_resolve(domain, info):\n    if domain != \"py\":\n        return None\n    if not info[\"module\"]:\n        return None\n    filename = info[\"module\"].replace(\".\", \"/\")\n    version = os.getenv(\"READTHEDOCS_VERSION\", \"master\")\n    if version == \"latest\":\n        version = \"master\"\n    return f\"https://github.com/ManimCommunity/manim/blob/{version}/{filename}.py\"\n\n\n# external links\nextlinks = {\n    \"issue\": (\"https://github.com/ManimCommunity/manim/issues/%s\", \"issue \"),\n    \"pr\": (\"https://github.com/ManimCommunity/manim/pull/%s\", \"pull request \"),\n}\n\n# opengraph settings\nogp_image = \"https://www.manim.community/logo.png\"\nogp_site_name = \"Manim Community | Documentation\"\nogp_site_url = \"https://docs.manim.community/\"\n", "path": "docs/source/conf.py"}], "after_files": [{"content": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# https://www.sphinx-doc.org/en/master/usage/configuration.html\n\n# -- Path setup --------------------------------------------------------------\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\n\nimport os\nimport sys\nfrom distutils.sysconfig import get_python_lib\nfrom pathlib import Path\n\nsys.path.insert(0, os.path.abspath(\".\"))\n\n\nif os.environ.get(\"READTHEDOCS\") == \"True\":\n    site_path = get_python_lib()\n    # we need to add ffmpeg to the path\n    ffmpeg_path = os.path.join(site_path, \"imageio_ffmpeg\", \"binaries\")\n    # the included binary is named ffmpeg-linux..., create a symlink\n    [ffmpeg_bin] = [\n        file for file in os.listdir(ffmpeg_path) if file.startswith(\"ffmpeg-\")\n    ]\n    os.symlink(\n        os.path.join(ffmpeg_path, ffmpeg_bin), os.path.join(ffmpeg_path, \"ffmpeg\")\n    )\n    os.environ[\"PATH\"] += os.pathsep + ffmpeg_path\n\n\n# -- Project information -----------------------------------------------------\n\nproject = \"Manim\"\ncopyright = \"2020, The Manim Community Dev Team\"\nauthor = \"The Manim Community Dev Team\"\n\n\n# -- General configuration ---------------------------------------------------\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n    \"sphinx.ext.autodoc\",\n    \"recommonmark\",\n    \"sphinx_copybutton\",\n    \"sphinx.ext.napoleon\",\n    \"sphinx.ext.autosummary\",\n    \"sphinx.ext.doctest\",\n    \"sphinx.ext.extlinks\",\n    \"sphinx.ext.linkcode\",\n    \"sphinxext.opengraph\",\n    \"manim_directive\",\n]\n\n# Automatically generate stub pages when using the .. autosummary directive\nautosummary_generate = True\n\n# generate documentation from type hints\nautodoc_typehints = \"description\"\nautoclass_content = \"both\"\n\n# controls whether functions documented by the autofunction directive\n# appear with their full module names\nadd_module_names = False\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = [\"_templates\"]\n\n# Custom section headings in our documentation\nnapoleon_custom_sections = [\"Tests\", (\"Test\", \"Tests\")]\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This pattern also affects html_static_path and html_extra_path.\nexclude_patterns = []\n\n\n# -- Options for HTML output -------------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\n#\nimport guzzle_sphinx_theme\n\nhtml_theme_path = guzzle_sphinx_theme.html_theme_path()\nhtml_theme = \"guzzle_sphinx_theme\"\nhtml_favicon = str(Path(\"_static/favicon.ico\"))\n\n# There's a standing issue with Sphinx's new-style sidebars.  This is a\n# workaround.  Taken from\n# https://github.com/guzzle/guzzle_sphinx_theme/issues/33#issuecomment-637081826\nhtml_sidebars = {\"**\": [\"logo-text.html\", \"globaltoc.html\", \"searchbox.html\"]}\n\n# Register the theme as an extension to generate a sitemap.xml\nextensions.append(\"guzzle_sphinx_theme\")\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = [\"_static\"]\n\n# This specifies any additional css files that will override the theme's\nhtml_css_files = [\"custom.css\"]\n\n# source links to github\ndef linkcode_resolve(domain, info):\n    if domain != \"py\":\n        return None\n    if not info[\"module\"]:\n        return None\n    filename = info[\"module\"].replace(\".\", \"/\")\n    version = os.getenv(\"READTHEDOCS_VERSION\", \"master\")\n    if version == \"latest\" or version == \"stable\":\n        version = \"master\"\n    return f\"https://github.com/ManimCommunity/manim/blob/{version}/{filename}.py\"\n\n\n# external links\nextlinks = {\n    \"issue\": (\"https://github.com/ManimCommunity/manim/issues/%s\", \"issue \"),\n    \"pr\": (\"https://github.com/ManimCommunity/manim/pull/%s\", \"pull request \"),\n}\n\n# opengraph settings\nogp_image = \"https://www.manim.community/logo.png\"\nogp_site_name = \"Manim Community | Documentation\"\nogp_site_url = \"https://docs.manim.community/\"\n", "path": "docs/source/conf.py"}]}