prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Make entry_points behave the same across Python versions
  The recently introduced `entry_points` function does not behave the same across Python versions and it is not possible to get all entry points in Python 3.8 and 3.9.
  
  </issue>
  <code>
  [start of opentelemetry-api/src/opentelemetry/util/_importlib_metadata.py]
  1 # Copyright The OpenTelemetry Authors
  2 #
  3 # Licensed under the Apache License, Version 2.0 (the "License");
  4 # you may not use this file except in compliance with the License.
  5 # You may obtain a copy of the License at
  6 #
  7 #     http://www.apache.org/licenses/LICENSE-2.0
  8 #
  9 # Unless required by applicable law or agreed to in writing, software
  10 # distributed under the License is distributed on an "AS IS" BASIS,
  11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12 # See the License for the specific language governing permissions and
  13 # limitations under the License.
  14 
  15 from sys import version_info
  16 
  17 # FIXME remove this when support for 3.7 is dropped.
  18 if version_info.minor == 7:
  19     # pylint: disable=import-error
  20     from importlib_metadata import entry_points, version  # type: ignore
  21 
  22 # FIXME remove this file when support for 3.9 is dropped.
  23 elif version_info.minor in (8, 9):
  24     # pylint: disable=import-error
  25     from importlib.metadata import (
  26         entry_points as importlib_metadata_entry_points,
  27     )
  28     from importlib.metadata import version
  29 
  30     def entry_points(group: str, name: str):  # type: ignore
  31         for entry_point in importlib_metadata_entry_points()[group]:
  32             if entry_point.name == name:
  33                 yield entry_point
  34 
  35 else:
  36     from importlib.metadata import entry_points, version
  37 
  38 __all__ = ["entry_points", "version"]
  39
  [end of opentelemetry-api/src/opentelemetry/util/_importlib_metadata.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/opentelemetry-api/src/opentelemetry/util/_importlib_metadata.py b/opentelemetry-api/src/opentelemetry/util/_importlib_metadata.py
  --- a/opentelemetry-api/src/opentelemetry/util/_importlib_metadata.py
  +++ b/opentelemetry-api/src/opentelemetry/util/_importlib_metadata.py
  @@ -12,27 +12,18 @@
   # See the License for the specific language governing permissions and
   # limitations under the License.
   
  -from sys import version_info
  +# FIXME: Use importlib.metadata when support for 3.11 is dropped if the rest of
  +# the supported versions at that time have the same API.
  +from importlib_metadata import (  # type: ignore
  +    EntryPoint,
  +    EntryPoints,
  +    entry_points,
  +    version,
  +)
   
  -# FIXME remove this when support for 3.7 is dropped.
  -if version_info.minor == 7:
  -    # pylint: disable=import-error
  -    from importlib_metadata import entry_points, version  # type: ignore
  +# The importlib-metadata library has introduced breaking changes before to its
  +# API, this module is kept just to act as a layer between the
  +# importlib-metadata library and our project if in any case it is necessary to
  +# do so.
   
  -# FIXME remove this file when support for 3.9 is dropped.
  -elif version_info.minor in (8, 9):
  -    # pylint: disable=import-error
  -    from importlib.metadata import (
  -        entry_points as importlib_metadata_entry_points,
  -    )
  -    from importlib.metadata import version
  -
  -    def entry_points(group: str, name: str):  # type: ignore
  -        for entry_point in importlib_metadata_entry_points()[group]:
  -            if entry_point.name == name:
  -                yield entry_point
  -
  -else:
  -    from importlib.metadata import entry_points, version
  -
  -__all__ = ["entry_points", "version"]
  +__all__ = ["entry_points", "version", "EntryPoint", "EntryPoints"]
  
verification_info: {"golden_diff": "diff --git a/opentelemetry-api/src/opentelemetry/util/_importlib_metadata.py b/opentelemetry-api/src/opentelemetry/util/_importlib_metadata.py\n--- a/opentelemetry-api/src/opentelemetry/util/_importlib_metadata.py\n+++ b/opentelemetry-api/src/opentelemetry/util/_importlib_metadata.py\n@@ -12,27 +12,18 @@\n # See the License for the specific language governing permissions and\n # limitations under the License.\n \n-from sys import version_info\n+# FIXME: Use importlib.metadata when support for 3.11 is dropped if the rest of\n+# the supported versions at that time have the same API.\n+from importlib_metadata import (  # type: ignore\n+    EntryPoint,\n+    EntryPoints,\n+    entry_points,\n+    version,\n+)\n \n-# FIXME remove this when support for 3.7 is dropped.\n-if version_info.minor == 7:\n-    # pylint: disable=import-error\n-    from importlib_metadata import entry_points, version  # type: ignore\n+# The importlib-metadata library has introduced breaking changes before to its\n+# API, this module is kept just to act as a layer between the\n+# importlib-metadata library and our project if in any case it is necessary to\n+# do so.\n \n-# FIXME remove this file when support for 3.9 is dropped.\n-elif version_info.minor in (8, 9):\n-    # pylint: disable=import-error\n-    from importlib.metadata import (\n-        entry_points as importlib_metadata_entry_points,\n-    )\n-    from importlib.metadata import version\n-\n-    def entry_points(group: str, name: str):  # type: ignore\n-        for entry_point in importlib_metadata_entry_points()[group]:\n-            if entry_point.name == name:\n-                yield entry_point\n-\n-else:\n-    from importlib.metadata import entry_points, version\n-\n-__all__ = [\"entry_points\", \"version\"]\n+__all__ = [\"entry_points\", \"version\", \"EntryPoint\", \"EntryPoints\"]\n", "issue": "Make entry_points behave the same across Python versions\nThe recently introduced `entry_points` function does not behave the same across Python versions and it is not possible to get all entry points in Python 3.8 and 3.9.\n", "before_files": [{"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom sys import version_info\n\n# FIXME remove this when support for 3.7 is dropped.\nif version_info.minor == 7:\n    # pylint: disable=import-error\n    from importlib_metadata import entry_points, version  # type: ignore\n\n# FIXME remove this file when support for 3.9 is dropped.\nelif version_info.minor in (8, 9):\n    # pylint: disable=import-error\n    from importlib.metadata import (\n        entry_points as importlib_metadata_entry_points,\n    )\n    from importlib.metadata import version\n\n    def entry_points(group: str, name: str):  # type: ignore\n        for entry_point in importlib_metadata_entry_points()[group]:\n            if entry_point.name == name:\n                yield entry_point\n\nelse:\n    from importlib.metadata import entry_points, version\n\n__all__ = [\"entry_points\", \"version\"]\n", "path": "opentelemetry-api/src/opentelemetry/util/_importlib_metadata.py"}]}