We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Build: expose `ubuntu-24.04` as an option for `build.os`
We are close to Ubuntu 24.04 release. We should expose it to our users.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `readthedocs/builds/constants_docker.py`
Content:
```
1 """
2 Define constants here to allow import them without any external dependency.
3 
4 There are situations where we want to have access to these values without Django installed
5 (e.g. common/dockerfiles/tasks.py)
6 
7 Note these constants where previously defined as Django settings in ``readthedocs/settings/base.py``.
8 """
9 
10 DOCKER_DEFAULT_IMAGE = "readthedocs/build"
11 
12 # When adding a new tool/version to this setting, you should:
13 #
14 # - Add a mapping between the expected version in the config file, to the full
15 #   version installed via asdf (found via ``asdf list all <tool>``).
16 # - Run the script ``./scripts/compile_version_upload.sh`` in
17 #   development to compile and cache the new tool/version.
18 # - Update the CircleCI job on the ``readthedocs-docker-images`` repository with the new versions at
19 #   https://github.com/rtfd/readthedocs-docker-images/blob/d2760526abdfe27001946614b749abf8011b7f90/.circleci/config.yml#L38-L44.
20 # - Update the latest aliases for OS and tools (below this setting).
21 # - Update readthedocs/rtd_tests/fixtures/spec/v2/schema.json.
22 # - Update the documentation in ``docs/user/config-file/v2.rst``.
23 RTD_DOCKER_BUILD_SETTINGS = {
24     # Mapping of build.os options to docker image.
25     "os": {
26         "ubuntu-20.04": f"{DOCKER_DEFAULT_IMAGE}:ubuntu-20.04",
27         "ubuntu-22.04": f"{DOCKER_DEFAULT_IMAGE}:ubuntu-22.04",
28     },
29     # Mapping of build.tools options to specific versions.
30     "tools": {
31         "python": {
32             "2.7": "2.7.18",
33             "3.6": "3.6.15",
34             "3.7": "3.7.17",
35             "3.8": "3.8.19",
36             "3.9": "3.9.19",
37             "3.10": "3.10.14",
38             "3.11": "3.11.9",
39             "3.12": "3.12.3",
40             "miniconda3-4.7": "miniconda3-4.7.12",
41             "miniconda3-3.12-24.1": "miniconda3-3.12-24.1.2-0",
42             "mambaforge-4.10": "mambaforge-4.10.3-10",
43             "mambaforge-22.9": "mambaforge-22.9.0-3",
44             "mambaforge-23.11": "mambaforge-23.11.0-0",
45         },
46         "nodejs": {
47             "14": "14.20.1",
48             "16": "16.18.1",
49             "18": "18.16.1",
50             "19": "19.0.1",
51             "20": "20.14.0",  # LTS
52         },
53         "ruby": {
54             "3.3": "3.3.2",
55         },
56         "rust": {
57             "1.55": "1.55.0",
58             "1.61": "1.61.0",
59             "1.64": "1.64.0",
60             "1.70": "1.70.0",
61             "1.75": "1.75.0",
62             "1.78": "1.78.0",
63         },
64         "golang": {
65             "1.17": "1.17.13",
66             "1.18": "1.18.10",
67             "1.19": "1.19.13",
68             "1.20": "1.20.14",
69             "1.21": "1.21.11",
70             "1.22": "1.22.4",
71         },
72     },
73 }
74 
75 # Set latest aliases for OS and tools.
76 _OS = RTD_DOCKER_BUILD_SETTINGS["os"]
77 _TOOLS = RTD_DOCKER_BUILD_SETTINGS["tools"]
78 _OS["ubuntu-lts-latest"] = _OS["ubuntu-22.04"]
79 _TOOLS["python"]["3"] = _TOOLS["python"]["3.12"]
80 _TOOLS["python"]["latest"] = _TOOLS["python"]["3"]
81 _TOOLS["python"]["miniconda-latest"] = _TOOLS["python"]["miniconda3-3.12-24.1"]
82 _TOOLS["python"]["mambaforge-latest"] = _TOOLS["python"]["mambaforge-23.11"]
83 _TOOLS["nodejs"]["latest"] = _TOOLS["nodejs"]["20"]
84 _TOOLS["ruby"]["latest"] = _TOOLS["ruby"]["3.3"]
85 _TOOLS["rust"]["latest"] = _TOOLS["rust"]["1.78"]
86 _TOOLS["golang"]["latest"] = _TOOLS["golang"]["1.22"]
87
```
--- 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/readthedocs/builds/constants_docker.py b/readthedocs/builds/constants_docker.py
--- a/readthedocs/builds/constants_docker.py
+++ b/readthedocs/builds/constants_docker.py
@@ -25,6 +25,7 @@
     "os": {
         "ubuntu-20.04": f"{DOCKER_DEFAULT_IMAGE}:ubuntu-20.04",
         "ubuntu-22.04": f"{DOCKER_DEFAULT_IMAGE}:ubuntu-22.04",
+        "ubuntu-24.04": f"{DOCKER_DEFAULT_IMAGE}:ubuntu-24.04",
     },
     # Mapping of build.tools options to specific versions.
     "tools": {
@@ -75,7 +76,11 @@
 # Set latest aliases for OS and tools.
 _OS = RTD_DOCKER_BUILD_SETTINGS["os"]
 _TOOLS = RTD_DOCKER_BUILD_SETTINGS["tools"]
+
+# TODO: point ``ubuntu-lts-latest`` to Ubuntu 24.04 LTS once we have tested it
+# in production after some weeks
 _OS["ubuntu-lts-latest"] = _OS["ubuntu-22.04"]
+
 _TOOLS["python"]["3"] = _TOOLS["python"]["3.12"]
 _TOOLS["python"]["latest"] = _TOOLS["python"]["3"]
 _TOOLS["python"]["miniconda-latest"] = _TOOLS["python"]["miniconda3-3.12-24.1"]

{"golden_diff": "diff --git a/readthedocs/builds/constants_docker.py b/readthedocs/builds/constants_docker.py\n--- a/readthedocs/builds/constants_docker.py\n+++ b/readthedocs/builds/constants_docker.py\n@@ -25,6 +25,7 @@\n     \"os\": {\n         \"ubuntu-20.04\": f\"{DOCKER_DEFAULT_IMAGE}:ubuntu-20.04\",\n         \"ubuntu-22.04\": f\"{DOCKER_DEFAULT_IMAGE}:ubuntu-22.04\",\n+        \"ubuntu-24.04\": f\"{DOCKER_DEFAULT_IMAGE}:ubuntu-24.04\",\n     },\n     # Mapping of build.tools options to specific versions.\n     \"tools\": {\n@@ -75,7 +76,11 @@\n # Set latest aliases for OS and tools.\n _OS = RTD_DOCKER_BUILD_SETTINGS[\"os\"]\n _TOOLS = RTD_DOCKER_BUILD_SETTINGS[\"tools\"]\n+\n+# TODO: point ``ubuntu-lts-latest`` to Ubuntu 24.04 LTS once we have tested it\n+# in production after some weeks\n _OS[\"ubuntu-lts-latest\"] = _OS[\"ubuntu-22.04\"]\n+\n _TOOLS[\"python\"][\"3\"] = _TOOLS[\"python\"][\"3.12\"]\n _TOOLS[\"python\"][\"latest\"] = _TOOLS[\"python\"][\"3\"]\n _TOOLS[\"python\"][\"miniconda-latest\"] = _TOOLS[\"python\"][\"miniconda3-3.12-24.1\"]\n", "issue": "Build: expose `ubuntu-24.04` as an option for `build.os`\nWe are close to Ubuntu 24.04 release. We should expose it to our users.\n", "before_files": [{"content": "\"\"\"\nDefine constants here to allow import them without any external dependency.\n\nThere are situations where we want to have access to these values without Django installed\n(e.g. common/dockerfiles/tasks.py)\n\nNote these constants where previously defined as Django settings in ``readthedocs/settings/base.py``.\n\"\"\"\n\nDOCKER_DEFAULT_IMAGE = \"readthedocs/build\"\n\n# When adding a new tool/version to this setting, you should:\n#\n# - Add a mapping between the expected version in the config file, to the full\n#   version installed via asdf (found via ``asdf list all <tool>``).\n# - Run the script ``./scripts/compile_version_upload.sh`` in\n#   development to compile and cache the new tool/version.\n# - Update the CircleCI job on the ``readthedocs-docker-images`` repository with the new versions at\n#   https://github.com/rtfd/readthedocs-docker-images/blob/d2760526abdfe27001946614b749abf8011b7f90/.circleci/config.yml#L38-L44.\n# - Update the latest aliases for OS and tools (below this setting).\n# - Update readthedocs/rtd_tests/fixtures/spec/v2/schema.json.\n# - Update the documentation in ``docs/user/config-file/v2.rst``.\nRTD_DOCKER_BUILD_SETTINGS = {\n    # Mapping of build.os options to docker image.\n    \"os\": {\n        \"ubuntu-20.04\": f\"{DOCKER_DEFAULT_IMAGE}:ubuntu-20.04\",\n        \"ubuntu-22.04\": f\"{DOCKER_DEFAULT_IMAGE}:ubuntu-22.04\",\n    },\n    # Mapping of build.tools options to specific versions.\n    \"tools\": {\n        \"python\": {\n            \"2.7\": \"2.7.18\",\n            \"3.6\": \"3.6.15\",\n            \"3.7\": \"3.7.17\",\n            \"3.8\": \"3.8.19\",\n            \"3.9\": \"3.9.19\",\n            \"3.10\": \"3.10.14\",\n            \"3.11\": \"3.11.9\",\n            \"3.12\": \"3.12.3\",\n            \"miniconda3-4.7\": \"miniconda3-4.7.12\",\n            \"miniconda3-3.12-24.1\": \"miniconda3-3.12-24.1.2-0\",\n            \"mambaforge-4.10\": \"mambaforge-4.10.3-10\",\n            \"mambaforge-22.9\": \"mambaforge-22.9.0-3\",\n            \"mambaforge-23.11\": \"mambaforge-23.11.0-0\",\n        },\n        \"nodejs\": {\n            \"14\": \"14.20.1\",\n            \"16\": \"16.18.1\",\n            \"18\": \"18.16.1\",\n            \"19\": \"19.0.1\",\n            \"20\": \"20.14.0\",  # LTS\n        },\n        \"ruby\": {\n            \"3.3\": \"3.3.2\",\n        },\n        \"rust\": {\n            \"1.55\": \"1.55.0\",\n            \"1.61\": \"1.61.0\",\n            \"1.64\": \"1.64.0\",\n            \"1.70\": \"1.70.0\",\n            \"1.75\": \"1.75.0\",\n            \"1.78\": \"1.78.0\",\n        },\n        \"golang\": {\n            \"1.17\": \"1.17.13\",\n            \"1.18\": \"1.18.10\",\n            \"1.19\": \"1.19.13\",\n            \"1.20\": \"1.20.14\",\n            \"1.21\": \"1.21.11\",\n            \"1.22\": \"1.22.4\",\n        },\n    },\n}\n\n# Set latest aliases for OS and tools.\n_OS = RTD_DOCKER_BUILD_SETTINGS[\"os\"]\n_TOOLS = RTD_DOCKER_BUILD_SETTINGS[\"tools\"]\n_OS[\"ubuntu-lts-latest\"] = _OS[\"ubuntu-22.04\"]\n_TOOLS[\"python\"][\"3\"] = _TOOLS[\"python\"][\"3.12\"]\n_TOOLS[\"python\"][\"latest\"] = _TOOLS[\"python\"][\"3\"]\n_TOOLS[\"python\"][\"miniconda-latest\"] = _TOOLS[\"python\"][\"miniconda3-3.12-24.1\"]\n_TOOLS[\"python\"][\"mambaforge-latest\"] = _TOOLS[\"python\"][\"mambaforge-23.11\"]\n_TOOLS[\"nodejs\"][\"latest\"] = _TOOLS[\"nodejs\"][\"20\"]\n_TOOLS[\"ruby\"][\"latest\"] = _TOOLS[\"ruby\"][\"3.3\"]\n_TOOLS[\"rust\"][\"latest\"] = _TOOLS[\"rust\"][\"1.78\"]\n_TOOLS[\"golang\"][\"latest\"] = _TOOLS[\"golang\"][\"1.22\"]\n", "path": "readthedocs/builds/constants_docker.py"}], "after_files": [{"content": "\"\"\"\nDefine constants here to allow import them without any external dependency.\n\nThere are situations where we want to have access to these values without Django installed\n(e.g. common/dockerfiles/tasks.py)\n\nNote these constants where previously defined as Django settings in ``readthedocs/settings/base.py``.\n\"\"\"\n\nDOCKER_DEFAULT_IMAGE = \"readthedocs/build\"\n\n# When adding a new tool/version to this setting, you should:\n#\n# - Add a mapping between the expected version in the config file, to the full\n#   version installed via asdf (found via ``asdf list all <tool>``).\n# - Run the script ``./scripts/compile_version_upload.sh`` in\n#   development to compile and cache the new tool/version.\n# - Update the CircleCI job on the ``readthedocs-docker-images`` repository with the new versions at\n#   https://github.com/rtfd/readthedocs-docker-images/blob/d2760526abdfe27001946614b749abf8011b7f90/.circleci/config.yml#L38-L44.\n# - Update the latest aliases for OS and tools (below this setting).\n# - Update readthedocs/rtd_tests/fixtures/spec/v2/schema.json.\n# - Update the documentation in ``docs/user/config-file/v2.rst``.\nRTD_DOCKER_BUILD_SETTINGS = {\n    # Mapping of build.os options to docker image.\n    \"os\": {\n        \"ubuntu-20.04\": f\"{DOCKER_DEFAULT_IMAGE}:ubuntu-20.04\",\n        \"ubuntu-22.04\": f\"{DOCKER_DEFAULT_IMAGE}:ubuntu-22.04\",\n        \"ubuntu-24.04\": f\"{DOCKER_DEFAULT_IMAGE}:ubuntu-24.04\",\n    },\n    # Mapping of build.tools options to specific versions.\n    \"tools\": {\n        \"python\": {\n            \"2.7\": \"2.7.18\",\n            \"3.6\": \"3.6.15\",\n            \"3.7\": \"3.7.17\",\n            \"3.8\": \"3.8.19\",\n            \"3.9\": \"3.9.19\",\n            \"3.10\": \"3.10.14\",\n            \"3.11\": \"3.11.9\",\n            \"3.12\": \"3.12.3\",\n            \"miniconda3-4.7\": \"miniconda3-4.7.12\",\n            \"miniconda3-3.12-24.1\": \"miniconda3-3.12-24.1.2-0\",\n            \"mambaforge-4.10\": \"mambaforge-4.10.3-10\",\n            \"mambaforge-22.9\": \"mambaforge-22.9.0-3\",\n            \"mambaforge-23.11\": \"mambaforge-23.11.0-0\",\n        },\n        \"nodejs\": {\n            \"14\": \"14.20.1\",\n            \"16\": \"16.18.1\",\n            \"18\": \"18.16.1\",\n            \"19\": \"19.0.1\",\n            \"20\": \"20.14.0\",  # LTS\n        },\n        \"ruby\": {\n            \"3.3\": \"3.3.2\",\n        },\n        \"rust\": {\n            \"1.55\": \"1.55.0\",\n            \"1.61\": \"1.61.0\",\n            \"1.64\": \"1.64.0\",\n            \"1.70\": \"1.70.0\",\n            \"1.75\": \"1.75.0\",\n            \"1.78\": \"1.78.0\",\n        },\n        \"golang\": {\n            \"1.17\": \"1.17.13\",\n            \"1.18\": \"1.18.10\",\n            \"1.19\": \"1.19.13\",\n            \"1.20\": \"1.20.14\",\n            \"1.21\": \"1.21.11\",\n            \"1.22\": \"1.22.4\",\n        },\n    },\n}\n\n# Set latest aliases for OS and tools.\n_OS = RTD_DOCKER_BUILD_SETTINGS[\"os\"]\n_TOOLS = RTD_DOCKER_BUILD_SETTINGS[\"tools\"]\n\n# TODO: point ``ubuntu-lts-latest`` to Ubuntu 24.04 LTS once we have tested it\n# in production after some weeks\n_OS[\"ubuntu-lts-latest\"] = _OS[\"ubuntu-22.04\"]\n\n_TOOLS[\"python\"][\"3\"] = _TOOLS[\"python\"][\"3.12\"]\n_TOOLS[\"python\"][\"latest\"] = _TOOLS[\"python\"][\"3\"]\n_TOOLS[\"python\"][\"miniconda-latest\"] = _TOOLS[\"python\"][\"miniconda3-3.12-24.1\"]\n_TOOLS[\"python\"][\"mambaforge-latest\"] = _TOOLS[\"python\"][\"mambaforge-23.11\"]\n_TOOLS[\"nodejs\"][\"latest\"] = _TOOLS[\"nodejs\"][\"20\"]\n_TOOLS[\"ruby\"][\"latest\"] = _TOOLS[\"ruby\"][\"3.3\"]\n_TOOLS[\"rust\"][\"latest\"] = _TOOLS[\"rust\"][\"1.78\"]\n_TOOLS[\"golang\"][\"latest\"] = _TOOLS[\"golang\"][\"1.22\"]\n", "path": "readthedocs/builds/constants_docker.py"}]}