We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Calling yaml.load() without Loader=... is deprecated
For each built packages there is now the following deprecation warning ,
```
pyodide_build/common.py:27: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  return yaml.load(fd)
```
it would be nice to fix this.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `pyodide_build/common.py`
Content:
```
1 from pathlib import Path
2 from typing import Optional, Set
3 
4 
5 ROOTDIR = Path(__file__).parents[1].resolve() / "tools"
6 HOSTPYTHON = ROOTDIR / ".." / "cpython" / "build" / "3.8.2" / "host"
7 TARGETPYTHON = ROOTDIR / ".." / "cpython" / "installs" / "python-3.8.2"
8 DEFAULTCFLAGS = ""
9 DEFAULTLDFLAGS = " ".join(
10     [
11         "-O3",
12         "-s",
13         "BINARYEN_METHOD='native-wasm'",
14         "-Werror",
15         "-s",
16         "EMULATED_FUNCTION_POINTERS=1",
17         "-s",
18         "EMULATE_FUNCTION_POINTER_CASTS=1",
19         "-s",
20         "SIDE_MODULE=1",
21         "-s",
22         "WASM=1",
23         "--memory-init-file",
24         "0",
25     ]
26 )
27 
28 
29 def parse_package(package):
30     # Import yaml here because pywasmcross needs to run in the built native
31     # Python, which won't have PyYAML
32     import yaml
33 
34     # TODO: Validate against a schema
35     with open(package) as fd:
36         return yaml.load(fd)
37 
38 
39 def _parse_package_subset(query: Optional[str]) -> Optional[Set[str]]:
40     """Parse the list of packages specified with PYODIDE_PACKAGES env var.
41 
42     Also add the list of mandatory packages: ['micropip', 'distlib']
43 
44     Returns:
45       a set of package names to build or None.
46     """
47     if query is None:
48         return None
49     packages = query.split(",")
50     packages = [el.strip() for el in packages]
51     packages = ["micropip", "distlib"] + packages
52     return set(packages)
53
```
--- 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/pyodide_build/common.py b/pyodide_build/common.py
--- a/pyodide_build/common.py
+++ b/pyodide_build/common.py
@@ -33,7 +33,7 @@
 
     # TODO: Validate against a schema
     with open(package) as fd:
-        return yaml.load(fd)
+        return yaml.safe_load(fd)
 
 
 def _parse_package_subset(query: Optional[str]) -> Optional[Set[str]]:

{"golden_diff": "diff --git a/pyodide_build/common.py b/pyodide_build/common.py\n--- a/pyodide_build/common.py\n+++ b/pyodide_build/common.py\n@@ -33,7 +33,7 @@\n \n     # TODO: Validate against a schema\n     with open(package) as fd:\n-        return yaml.load(fd)\n+        return yaml.safe_load(fd)\n \n \n def _parse_package_subset(query: Optional[str]) -> Optional[Set[str]]:\n", "issue": "Calling yaml.load() without Loader=... is deprecated\nFor each built packages there is now the following deprecation warning ,\r\n```\r\npyodide_build/common.py:27: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.\r\n  return yaml.load(fd)\r\n```\r\nit would be nice to fix this.\n", "before_files": [{"content": "from pathlib import Path\nfrom typing import Optional, Set\n\n\nROOTDIR = Path(__file__).parents[1].resolve() / \"tools\"\nHOSTPYTHON = ROOTDIR / \"..\" / \"cpython\" / \"build\" / \"3.8.2\" / \"host\"\nTARGETPYTHON = ROOTDIR / \"..\" / \"cpython\" / \"installs\" / \"python-3.8.2\"\nDEFAULTCFLAGS = \"\"\nDEFAULTLDFLAGS = \" \".join(\n    [\n        \"-O3\",\n        \"-s\",\n        \"BINARYEN_METHOD='native-wasm'\",\n        \"-Werror\",\n        \"-s\",\n        \"EMULATED_FUNCTION_POINTERS=1\",\n        \"-s\",\n        \"EMULATE_FUNCTION_POINTER_CASTS=1\",\n        \"-s\",\n        \"SIDE_MODULE=1\",\n        \"-s\",\n        \"WASM=1\",\n        \"--memory-init-file\",\n        \"0\",\n    ]\n)\n\n\ndef parse_package(package):\n    # Import yaml here because pywasmcross needs to run in the built native\n    # Python, which won't have PyYAML\n    import yaml\n\n    # TODO: Validate against a schema\n    with open(package) as fd:\n        return yaml.load(fd)\n\n\ndef _parse_package_subset(query: Optional[str]) -> Optional[Set[str]]:\n    \"\"\"Parse the list of packages specified with PYODIDE_PACKAGES env var.\n\n    Also add the list of mandatory packages: ['micropip', 'distlib']\n\n    Returns:\n      a set of package names to build or None.\n    \"\"\"\n    if query is None:\n        return None\n    packages = query.split(\",\")\n    packages = [el.strip() for el in packages]\n    packages = [\"micropip\", \"distlib\"] + packages\n    return set(packages)\n", "path": "pyodide_build/common.py"}], "after_files": [{"content": "from pathlib import Path\nfrom typing import Optional, Set\n\n\nROOTDIR = Path(__file__).parents[1].resolve() / \"tools\"\nHOSTPYTHON = ROOTDIR / \"..\" / \"cpython\" / \"build\" / \"3.8.2\" / \"host\"\nTARGETPYTHON = ROOTDIR / \"..\" / \"cpython\" / \"installs\" / \"python-3.8.2\"\nDEFAULTCFLAGS = \"\"\nDEFAULTLDFLAGS = \" \".join(\n    [\n        \"-O3\",\n        \"-s\",\n        \"BINARYEN_METHOD='native-wasm'\",\n        \"-Werror\",\n        \"-s\",\n        \"EMULATED_FUNCTION_POINTERS=1\",\n        \"-s\",\n        \"EMULATE_FUNCTION_POINTER_CASTS=1\",\n        \"-s\",\n        \"SIDE_MODULE=1\",\n        \"-s\",\n        \"WASM=1\",\n        \"--memory-init-file\",\n        \"0\",\n    ]\n)\n\n\ndef parse_package(package):\n    # Import yaml here because pywasmcross needs to run in the built native\n    # Python, which won't have PyYAML\n    import yaml\n\n    # TODO: Validate against a schema\n    with open(package) as fd:\n        return yaml.safe_load(fd)\n\n\ndef _parse_package_subset(query: Optional[str]) -> Optional[Set[str]]:\n    \"\"\"Parse the list of packages specified with PYODIDE_PACKAGES env var.\n\n    Also add the list of mandatory packages: ['micropip', 'distlib']\n\n    Returns:\n      a set of package names to build or None.\n    \"\"\"\n    if query is None:\n        return None\n    packages = query.split(\",\")\n    packages = [el.strip() for el in packages]\n    packages = [\"micropip\", \"distlib\"] + packages\n    return set(packages)\n", "path": "pyodide_build/common.py"}]}