We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
https://pyodide.org/en/latest/console.html doesn't show latest `main` version
## 🐛 Bug

The https://pyodide.org/en/latest/console.html console is stuck at `v0.21.0a3`. I believe this is because the version wasn't bumped to the next 'dev' version after the `v0.21.0a3` release, so somebody probably needs to run
```
./tools/bump_version.py --new-version 0.21.0.dev0

```
Without `dev` in the version, the documentation's console uses the release:
https://github.com/pyodide/pyodide/blob/7231cab3ffc83f6221fafb7458f9b223d2a7c759/docs/conf.py#L20-L23

### To Reproduce

Go to https://pyodide.org/en/latest/console.html and load a package added since v0.21.0a3, e.g., `import rebound`



--- 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/conf.py`
Content:
```
1 # Configuration file for the Sphinx documentation builder.
2 
3 # -- Path setup --------------------------------------------------------------
4 
5 import atexit
6 import os
7 import shutil
8 import subprocess
9 import sys
10 from pathlib import Path
11 from typing import Any
12 from unittest import mock
13 
14 # -- Project information -----------------------------------------------------
15 
16 project = "Pyodide"
17 copyright = "2019-2022, Pyodide contributors and Mozilla"
18 pyodide_version = "0.21.0a3"
19 
20 if ".dev" in pyodide_version:
21     CDN_URL = "https://cdn.jsdelivr.net/pyodide/dev/full/"
22 else:
23     CDN_URL = f"https://cdn.jsdelivr.net/pyodide/v{pyodide_version}/full/"
24 
25 # -- General configuration ---------------------------------------------------
26 
27 # If your documentation needs a minimal Sphinx version, state it here.
28 #
29 # needs_sphinx = '1.0'
30 
31 extensions = [
32     "sphinx.ext.autodoc",
33     "sphinx.ext.autosummary",
34     "sphinxcontrib.napoleon",
35     "myst_parser",
36     "sphinx_js",
37     "autodocsumm",
38     "sphinx_panels",
39     "sphinx_pyodide",
40     "sphinx_argparse_cli",
41     "versionwarning.extension",
42     "sphinx_issues",
43 ]
44 
45 myst_enable_extensions = ["substitution"]
46 
47 js_language = "typescript"
48 jsdoc_config_path = "../src/js/tsconfig.json"
49 root_for_relative_js_paths = "../src/"
50 issues_github_path = "pyodide/pyodide"
51 
52 versionwarning_messages = {
53     "latest": (
54         "This is the development version of the documentation. "
55         'See <a href="https://pyodide.org/">here</a> for latest stable '
56         "documentation. Please do not use Pyodide with non "
57         "versioned (`dev`) URLs from the CDN for deployed applications!"
58     )
59 }
60 versionwarning_body_selector = "#main-content > div"
61 
62 autosummary_generate = True
63 autodoc_default_flags = ["members", "inherited-members"]
64 
65 # Add modules to be mocked.
66 mock_modules = ["ruamel.yaml", "tomli"]
67 
68 # Add any paths that contain templates here, relative to this directory.
69 templates_path = ["_templates"]
70 
71 # The suffix(es) of source filenames.
72 source_suffix = [".rst", ".md"]
73 
74 # The master toctree document.
75 master_doc = "index"
76 
77 # The language for content autogenerated by Sphinx.
78 language = None
79 
80 # List of patterns, relative to source directory, that match files and
81 # directories to ignore when looking for source files.
82 exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "README.md"]
83 
84 # The name of the Pygments (syntax highlighting) style to use.
85 pygments_style = None
86 
87 # -- Options for HTML output -------------------------------------------------
88 
89 # The theme to use for HTML and HTML Help pages.  See the documentation for
90 # a list of builtin themes.
91 #
92 html_theme = "sphinx_book_theme"
93 html_logo = "_static/img/pyodide-logo.png"
94 
95 # theme-specific options
96 html_theme_options: dict[str, Any] = {}
97 
98 # paths that contain custom static files (such as style sheets)
99 html_static_path = ["_static"]
100 
101 
102 html_css_files = [
103     "css/pyodide.css",
104 ]
105 
106 # Custom sidebar templates, must be a dictionary that maps document names
107 # to template names.
108 # html_sidebars = {}
109 
110 # -- Options for HTMLHelp output ---------------------------------------------
111 
112 # Output file base name for HTML help builder.
113 htmlhelp_basename = "Pyodidedoc"
114 
115 # A list of files that should not be packed into the epub file.
116 epub_exclude_files = ["search.html"]
117 
118 
119 def delete_attrs(cls):
120     for name in dir(cls):
121         if not name.startswith("_"):
122             try:
123                 delattr(cls, name)
124             except Exception:
125                 pass
126 
127 
128 # Try not to cause side effects if we are imported incidentally.
129 
130 try:
131     import sphinx
132 
133     IN_SPHINX = hasattr(sphinx, "application")
134 except ImportError:
135     IN_SPHINX = False
136 
137 IN_READTHEDOCS = "READTHEDOCS" in os.environ
138 
139 if IN_READTHEDOCS:
140     env = {"PYODIDE_BASE_URL": CDN_URL}
141     os.makedirs("_build/html", exist_ok=True)
142     res = subprocess.check_output(
143         ["make", "-C", "..", "docs/_build/html/console.html"],
144         env=env,
145         stderr=subprocess.STDOUT,
146         encoding="utf-8",
147     )
148     print(res)
149 
150 if IN_SPHINX:
151     # Compatibility shims. sphinx-js and sphinxcontrib-napoleon have not been updated for Python 3.10
152     import collections
153     from typing import Callable, Mapping
154 
155     collections.Mapping = Mapping  # type: ignore[attr-defined]
156     collections.Callable = Callable  # type: ignore[attr-defined]
157 
158     base_dir = Path(__file__).resolve().parent.parent
159     path_dirs = [
160         str(base_dir),
161         str(base_dir / "pyodide-build"),
162         str(base_dir / "docs/sphinx_pyodide"),
163         str(base_dir / "src/py"),
164         str(base_dir / "packages/micropip/src"),
165     ]
166     sys.path = path_dirs + sys.path
167 
168     import micropip  # noqa: F401
169     import pyodide
170 
171     # We hacked it so that autodoc will look for submodules, but only if we import
172     # them here. TODO: look these up in the source directory?
173     import pyodide.code
174     import pyodide.console
175     import pyodide.ffi.wrappers
176     import pyodide.http
177     import pyodide.webloop
178 
179     # The full version, including alpha/beta/rc tags.
180     release = version = pyodide.__version__
181     html_title = f"Version {version}"
182 
183     shutil.copy("../src/core/pyproxy.ts", "../src/js/pyproxy.gen.ts")
184     shutil.copy("../src/core/error_handling.ts", "../src/js/error_handling.gen.ts")
185     js_source_path = [str(x) for x in Path("../src/js").glob("*.ts")]
186 
187     def remove_pyproxy_gen_ts():
188         Path("../src/js/pyproxy.gen.ts").unlink(missing_ok=True)
189 
190     atexit.register(remove_pyproxy_gen_ts)
191 
192     os.environ["PATH"] += f':{str(Path("../src/js/node_modules/.bin").resolve())}'
193     print(os.environ["PATH"])
194     if IN_READTHEDOCS:
195         subprocess.run(["npm", "ci"], cwd="../src/js")
196     elif not shutil.which("typedoc"):
197         raise Exception(
198             "Before building the Pyodide docs you must run 'npm install' in 'src/js'."
199         )
200 
201     # Prevent API docs for webloop methods: they are the same as for base event loop
202     # and it clutters api docs too much
203     delete_attrs(pyodide.webloop.WebLoop)
204     delete_attrs(pyodide.webloop.WebLoopPolicy)
205     delete_attrs(pyodide.console.PyodideConsole)
206 
207     for module in mock_modules:
208         sys.modules[module] = mock.Mock()
209 
210 
211 # https://github.com/sphinx-doc/sphinx/issues/4054
212 def globalReplace(app, docname, source):
213     result = source[0]
214     for key in app.config.global_replacements:
215         result = result.replace(key, app.config.global_replacements[key])
216     source[0] = result
217 
218 
219 global_replacements = {"{{PYODIDE_CDN_URL}}": CDN_URL}
220 
221 
222 def setup(app):
223     app.add_config_value("global_replacements", {}, True)
224     app.connect("source-read", globalReplace)
225
```
--- 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/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -17,7 +17,7 @@
 copyright = "2019-2022, Pyodide contributors and Mozilla"
 pyodide_version = "0.21.0a3"
 
-if ".dev" in pyodide_version:
+if ".dev" in pyodide_version or os.environ.get("READTHEDOCS_VERSION") == "latest":
     CDN_URL = "https://cdn.jsdelivr.net/pyodide/dev/full/"
 else:
     CDN_URL = f"https://cdn.jsdelivr.net/pyodide/v{pyodide_version}/full/"

{"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -17,7 +17,7 @@\n copyright = \"2019-2022, Pyodide contributors and Mozilla\"\n pyodide_version = \"0.21.0a3\"\n \n-if \".dev\" in pyodide_version:\n+if \".dev\" in pyodide_version or os.environ.get(\"READTHEDOCS_VERSION\") == \"latest\":\n     CDN_URL = \"https://cdn.jsdelivr.net/pyodide/dev/full/\"\n else:\n     CDN_URL = f\"https://cdn.jsdelivr.net/pyodide/v{pyodide_version}/full/\"\n", "issue": "https://pyodide.org/en/latest/console.html doesn't show latest `main` version\n## \ud83d\udc1b Bug\r\n\r\nThe https://pyodide.org/en/latest/console.html console is stuck at `v0.21.0a3`. I believe this is because the version wasn't bumped to the next 'dev' version after the `v0.21.0a3` release, so somebody probably needs to run\r\n```\r\n./tools/bump_version.py --new-version 0.21.0.dev0\r\n\r\n```\r\nWithout `dev` in the version, the documentation's console uses the release:\r\nhttps://github.com/pyodide/pyodide/blob/7231cab3ffc83f6221fafb7458f9b223d2a7c759/docs/conf.py#L20-L23\r\n\r\n### To Reproduce\r\n\r\nGo to https://pyodide.org/en/latest/console.html and load a package added since v0.21.0a3, e.g., `import rebound`\r\n\r\n\n", "before_files": [{"content": "# Configuration file for the Sphinx documentation builder.\n\n# -- Path setup --------------------------------------------------------------\n\nimport atexit\nimport os\nimport shutil\nimport subprocess\nimport sys\nfrom pathlib import Path\nfrom typing import Any\nfrom unittest import mock\n\n# -- Project information -----------------------------------------------------\n\nproject = \"Pyodide\"\ncopyright = \"2019-2022, Pyodide contributors and Mozilla\"\npyodide_version = \"0.21.0a3\"\n\nif \".dev\" in pyodide_version:\n    CDN_URL = \"https://cdn.jsdelivr.net/pyodide/dev/full/\"\nelse:\n    CDN_URL = f\"https://cdn.jsdelivr.net/pyodide/v{pyodide_version}/full/\"\n\n# -- General configuration ---------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n#\n# needs_sphinx = '1.0'\n\nextensions = [\n    \"sphinx.ext.autodoc\",\n    \"sphinx.ext.autosummary\",\n    \"sphinxcontrib.napoleon\",\n    \"myst_parser\",\n    \"sphinx_js\",\n    \"autodocsumm\",\n    \"sphinx_panels\",\n    \"sphinx_pyodide\",\n    \"sphinx_argparse_cli\",\n    \"versionwarning.extension\",\n    \"sphinx_issues\",\n]\n\nmyst_enable_extensions = [\"substitution\"]\n\njs_language = \"typescript\"\njsdoc_config_path = \"../src/js/tsconfig.json\"\nroot_for_relative_js_paths = \"../src/\"\nissues_github_path = \"pyodide/pyodide\"\n\nversionwarning_messages = {\n    \"latest\": (\n        \"This is the development version of the documentation. \"\n        'See <a href=\"https://pyodide.org/\">here</a> for latest stable '\n        \"documentation. Please do not use Pyodide with non \"\n        \"versioned (`dev`) URLs from the CDN for deployed applications!\"\n    )\n}\nversionwarning_body_selector = \"#main-content > div\"\n\nautosummary_generate = True\nautodoc_default_flags = [\"members\", \"inherited-members\"]\n\n# Add modules to be mocked.\nmock_modules = [\"ruamel.yaml\", \"tomli\"]\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = [\"_templates\"]\n\n# The suffix(es) of source filenames.\nsource_suffix = [\".rst\", \".md\"]\n\n# The master toctree document.\nmaster_doc = \"index\"\n\n# The language for content autogenerated by Sphinx.\nlanguage = None\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\nexclude_patterns = [\"_build\", \"Thumbs.db\", \".DS_Store\", \"README.md\"]\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = None\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#\nhtml_theme = \"sphinx_book_theme\"\nhtml_logo = \"_static/img/pyodide-logo.png\"\n\n# theme-specific options\nhtml_theme_options: dict[str, Any] = {}\n\n# paths that contain custom static files (such as style sheets)\nhtml_static_path = [\"_static\"]\n\n\nhtml_css_files = [\n    \"css/pyodide.css\",\n]\n\n# Custom sidebar templates, must be a dictionary that maps document names\n# to template names.\n# html_sidebars = {}\n\n# -- Options for HTMLHelp output ---------------------------------------------\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = \"Pyodidedoc\"\n\n# A list of files that should not be packed into the epub file.\nepub_exclude_files = [\"search.html\"]\n\n\ndef delete_attrs(cls):\n    for name in dir(cls):\n        if not name.startswith(\"_\"):\n            try:\n                delattr(cls, name)\n            except Exception:\n                pass\n\n\n# Try not to cause side effects if we are imported incidentally.\n\ntry:\n    import sphinx\n\n    IN_SPHINX = hasattr(sphinx, \"application\")\nexcept ImportError:\n    IN_SPHINX = False\n\nIN_READTHEDOCS = \"READTHEDOCS\" in os.environ\n\nif IN_READTHEDOCS:\n    env = {\"PYODIDE_BASE_URL\": CDN_URL}\n    os.makedirs(\"_build/html\", exist_ok=True)\n    res = subprocess.check_output(\n        [\"make\", \"-C\", \"..\", \"docs/_build/html/console.html\"],\n        env=env,\n        stderr=subprocess.STDOUT,\n        encoding=\"utf-8\",\n    )\n    print(res)\n\nif IN_SPHINX:\n    # Compatibility shims. sphinx-js and sphinxcontrib-napoleon have not been updated for Python 3.10\n    import collections\n    from typing import Callable, Mapping\n\n    collections.Mapping = Mapping  # type: ignore[attr-defined]\n    collections.Callable = Callable  # type: ignore[attr-defined]\n\n    base_dir = Path(__file__).resolve().parent.parent\n    path_dirs = [\n        str(base_dir),\n        str(base_dir / \"pyodide-build\"),\n        str(base_dir / \"docs/sphinx_pyodide\"),\n        str(base_dir / \"src/py\"),\n        str(base_dir / \"packages/micropip/src\"),\n    ]\n    sys.path = path_dirs + sys.path\n\n    import micropip  # noqa: F401\n    import pyodide\n\n    # We hacked it so that autodoc will look for submodules, but only if we import\n    # them here. TODO: look these up in the source directory?\n    import pyodide.code\n    import pyodide.console\n    import pyodide.ffi.wrappers\n    import pyodide.http\n    import pyodide.webloop\n\n    # The full version, including alpha/beta/rc tags.\n    release = version = pyodide.__version__\n    html_title = f\"Version {version}\"\n\n    shutil.copy(\"../src/core/pyproxy.ts\", \"../src/js/pyproxy.gen.ts\")\n    shutil.copy(\"../src/core/error_handling.ts\", \"../src/js/error_handling.gen.ts\")\n    js_source_path = [str(x) for x in Path(\"../src/js\").glob(\"*.ts\")]\n\n    def remove_pyproxy_gen_ts():\n        Path(\"../src/js/pyproxy.gen.ts\").unlink(missing_ok=True)\n\n    atexit.register(remove_pyproxy_gen_ts)\n\n    os.environ[\"PATH\"] += f':{str(Path(\"../src/js/node_modules/.bin\").resolve())}'\n    print(os.environ[\"PATH\"])\n    if IN_READTHEDOCS:\n        subprocess.run([\"npm\", \"ci\"], cwd=\"../src/js\")\n    elif not shutil.which(\"typedoc\"):\n        raise Exception(\n            \"Before building the Pyodide docs you must run 'npm install' in 'src/js'.\"\n        )\n\n    # Prevent API docs for webloop methods: they are the same as for base event loop\n    # and it clutters api docs too much\n    delete_attrs(pyodide.webloop.WebLoop)\n    delete_attrs(pyodide.webloop.WebLoopPolicy)\n    delete_attrs(pyodide.console.PyodideConsole)\n\n    for module in mock_modules:\n        sys.modules[module] = mock.Mock()\n\n\n# https://github.com/sphinx-doc/sphinx/issues/4054\ndef globalReplace(app, docname, source):\n    result = source[0]\n    for key in app.config.global_replacements:\n        result = result.replace(key, app.config.global_replacements[key])\n    source[0] = result\n\n\nglobal_replacements = {\"{{PYODIDE_CDN_URL}}\": CDN_URL}\n\n\ndef setup(app):\n    app.add_config_value(\"global_replacements\", {}, True)\n    app.connect(\"source-read\", globalReplace)\n", "path": "docs/conf.py"}], "after_files": [{"content": "# Configuration file for the Sphinx documentation builder.\n\n# -- Path setup --------------------------------------------------------------\n\nimport atexit\nimport os\nimport shutil\nimport subprocess\nimport sys\nfrom pathlib import Path\nfrom typing import Any\nfrom unittest import mock\n\n# -- Project information -----------------------------------------------------\n\nproject = \"Pyodide\"\ncopyright = \"2019-2022, Pyodide contributors and Mozilla\"\npyodide_version = \"0.21.0a3\"\n\nif \".dev\" in pyodide_version or os.environ.get(\"READTHEDOCS_VERSION\") == \"latest\":\n    CDN_URL = \"https://cdn.jsdelivr.net/pyodide/dev/full/\"\nelse:\n    CDN_URL = f\"https://cdn.jsdelivr.net/pyodide/v{pyodide_version}/full/\"\n\n# -- General configuration ---------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n#\n# needs_sphinx = '1.0'\n\nextensions = [\n    \"sphinx.ext.autodoc\",\n    \"sphinx.ext.autosummary\",\n    \"sphinxcontrib.napoleon\",\n    \"myst_parser\",\n    \"sphinx_js\",\n    \"autodocsumm\",\n    \"sphinx_panels\",\n    \"sphinx_pyodide\",\n    \"sphinx_argparse_cli\",\n    \"versionwarning.extension\",\n    \"sphinx_issues\",\n]\n\nmyst_enable_extensions = [\"substitution\"]\n\njs_language = \"typescript\"\njsdoc_config_path = \"../src/js/tsconfig.json\"\nroot_for_relative_js_paths = \"../src/\"\nissues_github_path = \"pyodide/pyodide\"\n\nversionwarning_messages = {\n    \"latest\": (\n        \"This is the development version of the documentation. \"\n        'See <a href=\"https://pyodide.org/\">here</a> for latest stable '\n        \"documentation. Please do not use Pyodide with non \"\n        \"versioned (`dev`) URLs from the CDN for deployed applications!\"\n    )\n}\nversionwarning_body_selector = \"#main-content > div\"\n\nautosummary_generate = True\nautodoc_default_flags = [\"members\", \"inherited-members\"]\n\n# Add modules to be mocked.\nmock_modules = [\"ruamel.yaml\", \"tomli\"]\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = [\"_templates\"]\n\n# The suffix(es) of source filenames.\nsource_suffix = [\".rst\", \".md\"]\n\n# The master toctree document.\nmaster_doc = \"index\"\n\n# The language for content autogenerated by Sphinx.\nlanguage = None\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\nexclude_patterns = [\"_build\", \"Thumbs.db\", \".DS_Store\", \"README.md\"]\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = None\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#\nhtml_theme = \"sphinx_book_theme\"\nhtml_logo = \"_static/img/pyodide-logo.png\"\n\n# theme-specific options\nhtml_theme_options: dict[str, Any] = {}\n\n# paths that contain custom static files (such as style sheets)\nhtml_static_path = [\"_static\"]\n\n\nhtml_css_files = [\n    \"css/pyodide.css\",\n]\n\n# Custom sidebar templates, must be a dictionary that maps document names\n# to template names.\n# html_sidebars = {}\n\n# -- Options for HTMLHelp output ---------------------------------------------\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = \"Pyodidedoc\"\n\n# A list of files that should not be packed into the epub file.\nepub_exclude_files = [\"search.html\"]\n\n\ndef delete_attrs(cls):\n    for name in dir(cls):\n        if not name.startswith(\"_\"):\n            try:\n                delattr(cls, name)\n            except Exception:\n                pass\n\n\n# Try not to cause side effects if we are imported incidentally.\n\ntry:\n    import sphinx\n\n    IN_SPHINX = hasattr(sphinx, \"application\")\nexcept ImportError:\n    IN_SPHINX = False\n\nIN_READTHEDOCS = \"READTHEDOCS\" in os.environ\n\nif IN_READTHEDOCS:\n    env = {\"PYODIDE_BASE_URL\": CDN_URL}\n    os.makedirs(\"_build/html\", exist_ok=True)\n    res = subprocess.check_output(\n        [\"make\", \"-C\", \"..\", \"docs/_build/html/console.html\"],\n        env=env,\n        stderr=subprocess.STDOUT,\n        encoding=\"utf-8\",\n    )\n    print(res)\n\nif IN_SPHINX:\n    # Compatibility shims. sphinx-js and sphinxcontrib-napoleon have not been updated for Python 3.10\n    import collections\n    from typing import Callable, Mapping\n\n    collections.Mapping = Mapping  # type: ignore[attr-defined]\n    collections.Callable = Callable  # type: ignore[attr-defined]\n\n    base_dir = Path(__file__).resolve().parent.parent\n    path_dirs = [\n        str(base_dir),\n        str(base_dir / \"pyodide-build\"),\n        str(base_dir / \"docs/sphinx_pyodide\"),\n        str(base_dir / \"src/py\"),\n        str(base_dir / \"packages/micropip/src\"),\n    ]\n    sys.path = path_dirs + sys.path\n\n    import micropip  # noqa: F401\n    import pyodide\n\n    # We hacked it so that autodoc will look for submodules, but only if we import\n    # them here. TODO: look these up in the source directory?\n    import pyodide.code\n    import pyodide.console\n    import pyodide.ffi.wrappers\n    import pyodide.http\n    import pyodide.webloop\n\n    # The full version, including alpha/beta/rc tags.\n    release = version = pyodide.__version__\n    html_title = f\"Version {version}\"\n\n    shutil.copy(\"../src/core/pyproxy.ts\", \"../src/js/pyproxy.gen.ts\")\n    shutil.copy(\"../src/core/error_handling.ts\", \"../src/js/error_handling.gen.ts\")\n    js_source_path = [str(x) for x in Path(\"../src/js\").glob(\"*.ts\")]\n\n    def remove_pyproxy_gen_ts():\n        Path(\"../src/js/pyproxy.gen.ts\").unlink(missing_ok=True)\n\n    atexit.register(remove_pyproxy_gen_ts)\n\n    os.environ[\"PATH\"] += f':{str(Path(\"../src/js/node_modules/.bin\").resolve())}'\n    print(os.environ[\"PATH\"])\n    if IN_READTHEDOCS:\n        subprocess.run([\"npm\", \"ci\"], cwd=\"../src/js\")\n    elif not shutil.which(\"typedoc\"):\n        raise Exception(\n            \"Before building the Pyodide docs you must run 'npm install' in 'src/js'.\"\n        )\n\n    # Prevent API docs for webloop methods: they are the same as for base event loop\n    # and it clutters api docs too much\n    delete_attrs(pyodide.webloop.WebLoop)\n    delete_attrs(pyodide.webloop.WebLoopPolicy)\n    delete_attrs(pyodide.console.PyodideConsole)\n\n    for module in mock_modules:\n        sys.modules[module] = mock.Mock()\n\n\n# https://github.com/sphinx-doc/sphinx/issues/4054\ndef globalReplace(app, docname, source):\n    result = source[0]\n    for key in app.config.global_replacements:\n        result = result.replace(key, app.config.global_replacements[key])\n    source[0] = result\n\n\nglobal_replacements = {\"{{PYODIDE_CDN_URL}}\": CDN_URL}\n\n\ndef setup(app):\n    app.add_config_value(\"global_replacements\", {}, True)\n    app.connect(\"source-read\", globalReplace)\n", "path": "docs/conf.py"}]}