We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Removal of dask.compatibility.entry_points has broken dask-kubernetes
It looks like `dask.compatibility.entry_points` was removed in #10070 without warning. This was being used in `dask-kubernetes` so CI is now failing.

https://github.com/dask/dask-kubernetes/actions/runs/4499027159/jobs/7916366189?pr=683

cc @graingert @jrbourbeau 

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `dask/compatibility.py`
Content:
```
1 import sys
2 
3 from packaging.version import parse as parse_version
4 
5 _PY_VERSION = parse_version(".".join(map(str, sys.version_info[:3])))
6 
7 _EMSCRIPTEN = sys.platform == "emscripten"
8
```
--- 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/dask/compatibility.py b/dask/compatibility.py
--- a/dask/compatibility.py
+++ b/dask/compatibility.py
@@ -1,7 +1,19 @@
 import sys
+import warnings
 
+from importlib_metadata import entry_points as _entry_points
 from packaging.version import parse as parse_version
 
 _PY_VERSION = parse_version(".".join(map(str, sys.version_info[:3])))
 
 _EMSCRIPTEN = sys.platform == "emscripten"
+
+
+def entry_points(group=None):
+    warnings.warn(
+        "`dask.compatibility.entry_points` has been replaced by `importlib_metadata.entry_points` and will be removed "
+        "in a future version. Please use `importlib_metadata.entry_points` instead.",
+        DeprecationWarning,
+        stacklevel=2,
+    )
+    return _entry_points(group=group)

{"golden_diff": "diff --git a/dask/compatibility.py b/dask/compatibility.py\n--- a/dask/compatibility.py\n+++ b/dask/compatibility.py\n@@ -1,7 +1,19 @@\n import sys\n+import warnings\n \n+from importlib_metadata import entry_points as _entry_points\n from packaging.version import parse as parse_version\n \n _PY_VERSION = parse_version(\".\".join(map(str, sys.version_info[:3])))\n \n _EMSCRIPTEN = sys.platform == \"emscripten\"\n+\n+\n+def entry_points(group=None):\n+    warnings.warn(\n+        \"`dask.compatibility.entry_points` has been replaced by `importlib_metadata.entry_points` and will be removed \"\n+        \"in a future version. Please use `importlib_metadata.entry_points` instead.\",\n+        DeprecationWarning,\n+        stacklevel=2,\n+    )\n+    return _entry_points(group=group)\n", "issue": "Removal of dask.compatibility.entry_points has broken dask-kubernetes\nIt looks like `dask.compatibility.entry_points` was removed in #10070 without warning. This was being used in `dask-kubernetes` so CI is now failing.\r\n\r\nhttps://github.com/dask/dask-kubernetes/actions/runs/4499027159/jobs/7916366189?pr=683\r\n\r\ncc @graingert @jrbourbeau \n", "before_files": [{"content": "import sys\n\nfrom packaging.version import parse as parse_version\n\n_PY_VERSION = parse_version(\".\".join(map(str, sys.version_info[:3])))\n\n_EMSCRIPTEN = sys.platform == \"emscripten\"\n", "path": "dask/compatibility.py"}], "after_files": [{"content": "import sys\nimport warnings\n\nfrom importlib_metadata import entry_points as _entry_points\nfrom packaging.version import parse as parse_version\n\n_PY_VERSION = parse_version(\".\".join(map(str, sys.version_info[:3])))\n\n_EMSCRIPTEN = sys.platform == \"emscripten\"\n\n\ndef entry_points(group=None):\n    warnings.warn(\n        \"`dask.compatibility.entry_points` has been replaced by `importlib_metadata.entry_points` and will be removed \"\n        \"in a future version. Please use `importlib_metadata.entry_points` instead.\",\n        DeprecationWarning,\n        stacklevel=2,\n    )\n    return _entry_points(group=group)\n", "path": "dask/compatibility.py"}]}