prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  scanpy 1.10.0rc1 breaks anndata pre-release tests
  ### Please make sure these conditions are met
  
  - [X] I have checked that this issue has not already been reported.
  - [X] I have confirmed this bug exists on the latest version of scanpy.
  - [X] (optional) I have confirmed this bug exists on the master branch of scanpy.
  
  ### What happened?
  
  `@doctest_needs` decorator causes test failures on scanpy import in anndata test suite
  
  https://dev.azure.com/scverse/anndata/_build/results?buildId=5802&view=logs&jobId=0497d03e-5796-547f-cc56-989f8152a63c&j=0497d03e-5796-547f-cc56-989f8152a63c&t=ea3acdad-0250-5b8b-a1da-6cd02463cf17
  
  
  
  ### Minimal code sample
  
  ```python
  NA
  ```
  
  
  ### Error output
  
  ```pytb
  else:
              enum_member = enum_class._new_member_(enum_class, *args)
          if not hasattr(enum_member, '_value_'):
              if enum_class._member_type_ is object:
                  enum_member._value_ = value
              else:
                  try:
                      enum_member._value_ = enum_class._member_type_(*args)
                  except Exception as exc:
                      new_exc = TypeError(
                              '_value_ not set in __new__, unable to create it'
                              )
                      new_exc.__cause__ = exc
  >                   raise new_exc
  E                   TypeError: _value_ not set in __new__, unable to create it
  ```
  
  
  ### Versions
  
  <details>
  
  ```
  See anndata test failure
  ```
  
  </details>
  
  
  </issue>
  <code>
  [start of scanpy/__init__.py]
  1 """Single-Cell Analysis in Python."""
  2 from __future__ import annotations
  3 
  4 try:  # See https://github.com/maresb/hatch-vcs-footgun-example
  5     from setuptools_scm import get_version
  6 
  7     __version__ = get_version(root="..", relative_to=__file__)
  8     del get_version
  9 except (ImportError, LookupError):
  10     try:
  11         from ._version import __version__
  12     except ModuleNotFoundError:
  13         raise RuntimeError(
  14             "scanpy is not correctly installed. Please install it, e.g. with pip."
  15         )
  16 
  17 from ._utils import check_versions
  18 
  19 check_versions()
  20 del check_versions
  21 
  22 # the actual API
  23 # (start with settings as several tools are using it)
  24 from anndata import (
  25     AnnData,
  26     concat,
  27     read_csv,
  28     read_excel,
  29     read_h5ad,
  30     read_hdf,
  31     read_loom,
  32     read_mtx,
  33     read_text,
  34     read_umi_tools,
  35 )
  36 
  37 from . import datasets, experimental, external, get, logging, metrics, queries
  38 from . import plotting as pl
  39 from . import preprocessing as pp
  40 from . import tools as tl
  41 from ._settings import Verbosity, settings
  42 from .neighbors import Neighbors
  43 from .readwrite import read, read_10x_h5, read_10x_mtx, read_visium, write
  44 
  45 set_figure_params = settings.set_figure_params
  46 
  47 # has to be done at the end, after everything has been imported
  48 import sys
  49 
  50 sys.modules.update({f"{__name__}.{m}": globals()[m] for m in ["tl", "pp", "pl"]})
  51 from ._utils import annotate_doc_types
  52 
  53 annotate_doc_types(sys.modules[__name__], "scanpy")
  54 del sys, annotate_doc_types
  55 
  56 __all__ = [
  57     "__version__",
  58     "AnnData",
  59     "concat",
  60     "read_csv",
  61     "read_excel",
  62     "read_h5ad",
  63     "read_hdf",
  64     "read_loom",
  65     "read_mtx",
  66     "read_text",
  67     "read_umi_tools",
  68     "read",
  69     "read_10x_h5",
  70     "read_10x_mtx",
  71     "read_visium",
  72     "write",
  73     "datasets",
  74     "experimental",
  75     "external",
  76     "get",
  77     "logging",
  78     "metrics",
  79     "queries",
  80     "pl",
  81     "pp",
  82     "tl",
  83     "Verbosity",
  84     "settings",
  85     "Neighbors",
  86     "set_figure_params",
  87 ]
  88
  [end of scanpy/__init__.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/scanpy/__init__.py b/scanpy/__init__.py
  --- a/scanpy/__init__.py
  +++ b/scanpy/__init__.py
  @@ -1,6 +1,8 @@
   """Single-Cell Analysis in Python."""
   from __future__ import annotations
   
  +import sys
  +
   try:  # See https://github.com/maresb/hatch-vcs-footgun-example
       from setuptools_scm import get_version
   
  @@ -21,6 +23,11 @@
   
   # the actual API
   # (start with settings as several tools are using it)
  +
  +from ._settings import Verbosity, settings
  +
  +set_figure_params = settings.set_figure_params
  +
   from anndata import (
       AnnData,
       concat,
  @@ -38,15 +45,10 @@
   from . import plotting as pl
   from . import preprocessing as pp
   from . import tools as tl
  -from ._settings import Verbosity, settings
   from .neighbors import Neighbors
   from .readwrite import read, read_10x_h5, read_10x_mtx, read_visium, write
   
  -set_figure_params = settings.set_figure_params
  -
   # has to be done at the end, after everything has been imported
  -import sys
  -
   sys.modules.update({f"{__name__}.{m}": globals()[m] for m in ["tl", "pp", "pl"]})
   from ._utils import annotate_doc_types
  
verification_info: {"golden_diff": "diff --git a/scanpy/__init__.py b/scanpy/__init__.py\n--- a/scanpy/__init__.py\n+++ b/scanpy/__init__.py\n@@ -1,6 +1,8 @@\n \"\"\"Single-Cell Analysis in Python.\"\"\"\n from __future__ import annotations\n \n+import sys\n+\n try:  # See https://github.com/maresb/hatch-vcs-footgun-example\n     from setuptools_scm import get_version\n \n@@ -21,6 +23,11 @@\n \n # the actual API\n # (start with settings as several tools are using it)\n+\n+from ._settings import Verbosity, settings\n+\n+set_figure_params = settings.set_figure_params\n+\n from anndata import (\n     AnnData,\n     concat,\n@@ -38,15 +45,10 @@\n from . import plotting as pl\n from . import preprocessing as pp\n from . import tools as tl\n-from ._settings import Verbosity, settings\n from .neighbors import Neighbors\n from .readwrite import read, read_10x_h5, read_10x_mtx, read_visium, write\n \n-set_figure_params = settings.set_figure_params\n-\n # has to be done at the end, after everything has been imported\n-import sys\n-\n sys.modules.update({f\"{__name__}.{m}\": globals()[m] for m in [\"tl\", \"pp\", \"pl\"]})\n from ._utils import annotate_doc_types\n", "issue": "scanpy 1.10.0rc1 breaks anndata pre-release tests\n### Please make sure these conditions are met\n\n- [X] I have checked that this issue has not already been reported.\n- [X] I have confirmed this bug exists on the latest version of scanpy.\n- [X] (optional) I have confirmed this bug exists on the master branch of scanpy.\n\n### What happened?\n\n`@doctest_needs` decorator causes test failures on scanpy import in anndata test suite\r\n\r\nhttps://dev.azure.com/scverse/anndata/_build/results?buildId=5802&view=logs&jobId=0497d03e-5796-547f-cc56-989f8152a63c&j=0497d03e-5796-547f-cc56-989f8152a63c&t=ea3acdad-0250-5b8b-a1da-6cd02463cf17\r\n\r\n\n\n### Minimal code sample\n\n```python\nNA\n```\n\n\n### Error output\n\n```pytb\nelse:\r\n            enum_member = enum_class._new_member_(enum_class, *args)\r\n        if not hasattr(enum_member, '_value_'):\r\n            if enum_class._member_type_ is object:\r\n                enum_member._value_ = value\r\n            else:\r\n                try:\r\n                    enum_member._value_ = enum_class._member_type_(*args)\r\n                except Exception as exc:\r\n                    new_exc = TypeError(\r\n                            '_value_ not set in __new__, unable to create it'\r\n                            )\r\n                    new_exc.__cause__ = exc\r\n>                   raise new_exc\r\nE                   TypeError: _value_ not set in __new__, unable to create it\n```\n\n\n### Versions\n\n<details>\r\n\r\n```\r\nSee anndata test failure\r\n```\r\n\r\n</details>\r\n\n", "before_files": [{"content": "\"\"\"Single-Cell Analysis in Python.\"\"\"\nfrom __future__ import annotations\n\ntry:  # See https://github.com/maresb/hatch-vcs-footgun-example\n    from setuptools_scm import get_version\n\n    __version__ = get_version(root=\"..\", relative_to=__file__)\n    del get_version\nexcept (ImportError, LookupError):\n    try:\n        from ._version import __version__\n    except ModuleNotFoundError:\n        raise RuntimeError(\n            \"scanpy is not correctly installed. Please install it, e.g. with pip.\"\n        )\n\nfrom ._utils import check_versions\n\ncheck_versions()\ndel check_versions\n\n# the actual API\n# (start with settings as several tools are using it)\nfrom anndata import (\n    AnnData,\n    concat,\n    read_csv,\n    read_excel,\n    read_h5ad,\n    read_hdf,\n    read_loom,\n    read_mtx,\n    read_text,\n    read_umi_tools,\n)\n\nfrom . import datasets, experimental, external, get, logging, metrics, queries\nfrom . import plotting as pl\nfrom . import preprocessing as pp\nfrom . import tools as tl\nfrom ._settings import Verbosity, settings\nfrom .neighbors import Neighbors\nfrom .readwrite import read, read_10x_h5, read_10x_mtx, read_visium, write\n\nset_figure_params = settings.set_figure_params\n\n# has to be done at the end, after everything has been imported\nimport sys\n\nsys.modules.update({f\"{__name__}.{m}\": globals()[m] for m in [\"tl\", \"pp\", \"pl\"]})\nfrom ._utils import annotate_doc_types\n\nannotate_doc_types(sys.modules[__name__], \"scanpy\")\ndel sys, annotate_doc_types\n\n__all__ = [\n    \"__version__\",\n    \"AnnData\",\n    \"concat\",\n    \"read_csv\",\n    \"read_excel\",\n    \"read_h5ad\",\n    \"read_hdf\",\n    \"read_loom\",\n    \"read_mtx\",\n    \"read_text\",\n    \"read_umi_tools\",\n    \"read\",\n    \"read_10x_h5\",\n    \"read_10x_mtx\",\n    \"read_visium\",\n    \"write\",\n    \"datasets\",\n    \"experimental\",\n    \"external\",\n    \"get\",\n    \"logging\",\n    \"metrics\",\n    \"queries\",\n    \"pl\",\n    \"pp\",\n    \"tl\",\n    \"Verbosity\",\n    \"settings\",\n    \"Neighbors\",\n    \"set_figure_params\",\n]\n", "path": "scanpy/__init__.py"}]}