Skip to content

Backport PR #4532 on branch 1.13.x (fix: keep legacy graph metrics usable without anndata.acc) - #4551

Merged
flying-sheep merged 1 commit into
scverse:1.13.xfrom
meeseeksmachine:auto-backport-of-pr-4532-on-1.13.x
Nov 26, 2026
Merged

flying-sheep merged 1 commit into
scverse:1.13.xfrom
meeseeksmachine:auto-backport-of-pr-4532-on-1.13.x

Conversation

@meeseeksmachine

Copy link
Copy Markdown
Contributor

Backport PR #4532: fix: keep legacy graph metrics usable without anndata.acc

@lumberbot-app lumberbot-app Bot added this to the 1.13.1 milestone Nov 26, 2026
@codecov

codecov Bot commented Nov 26, 2026

Copy link
Copy Markdown

❌ 5 Tests Failed:

Tests completed Failed Passed Skipped
2654 5 2649 1400
View the top 3 failed test(s) by shortest run time
src/scanpy/neighbors/__init__.py::scanpy.neighbors.neighbors
Stack Traces | 0.103s run time
216     points. Weights should be interpreted as connectivities.
217 `adata.obsp['distances']` : :class:`scipy.sparse.csr_matrix` (dtype `float`)
218     Distance matrix of the nearest neighbors search. Each row (cell) has `n_neighbors`-1 non-zero entries. These are the distances to their `n_neighbors`-1 nearest neighbors (excluding the cell itself).
219 `adata.uns['neighbors']` : :class:`dict`
220     neighbors parameters, and the `.obsp` keys the matrices were written to.
221 
222 Examples
223 --------
224 >>> import scanpy as sc
225 >>> adata = sc.datasets.pbmc68k_reduced()
Expected nothing
Got:
    ResourceWarning: unclosed <ssl.SSLSocket [closed] fd=19, family=2, type=1, proto=6>
        obj, end = self.scan_once(s, idx)
    ResourceWarning: Implicitly cleaning up <HTTPError 403: 'Forbidden'>
        _warnings.warn(self.warn_message, ResourceWarning)

#x1B[1m#x1B[.../scanpy/neighbors/__init__.py#x1B[0m:225: DocTestFailure
tests/test_datasets.py::test_pbmc68k_reduced
Stack Traces | 0.109s run time
+ Exception Group Traceback (most recent call last):
  |   File "........................................../home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14....../site-packages/_pytest/runner.py", line 361, in from_call
  |     result: TResult | None = func()
  |                              ~~~~^^
  |   File "........................................../home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14....../site-packages/_pytest/runner.py", line 250, in <lambda>
  |     lambda: runtest_hook(item=item, **kwds),
  |             ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
  |   File "........................................../home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../site-packages/pluggy/_caller.py", line 197, in __call__
  |     return self._hookexec(
  |            ~~~~~~~~~~~~~~^
  |         self.name, self._hookimpls.copy(), call_kwargs, firstresult
  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |     )
  |     ^
  |   File "........................................../home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../site-packages/pluggy/_manager.py", line 183, in _hookexec
  |     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  |            ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "........................................../home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../site-packages/_pytest/logging.py", line 878, in pytest_runtest_call
  |     yield
  |   File "........................................../home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../site-packages/_pytest/capture.py", line 906, in pytest_runtest_call
  |     return (yield)
  |             ^^^^^
  |   File "........................................../home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../site-packages/_pytest/skipping.py", line 268, in pytest_runtest_call
  |     return (yield)
  |             ^^^^^
  |   File "........................................../home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14...................../site-packages/_pytest/unraisableexception.py", line 179, in pytest_runtest_call
  |     collect_unraisable(item.config)
  |     ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
  |   File "........................................../home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14...................../site-packages/_pytest/unraisableexception.py", line 77, in collect_unraisable
  |     raise ExceptionGroup("multiple unraisable exception warnings", errors)
  | ExceptionGroup: multiple unraisable exception warnings (5 sub-exceptions)
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File ".../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/tempfile.py", line 538, in __del__
    |     _warnings.warn(self.warn_message, ResourceWarning)
    |     ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | ResourceWarning: Implicitly cleaning up <HTTPError 403: 'Forbidden'>
    | 
    | The above exception was the direct cause of the following exception:
    | 
    | Traceback (most recent call last):
    |   File "........................................../home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14...................../site-packages/_pytest/unraisableexception.py", line 63, in collect_unraisable
    |     warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
    |     ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | pytest.PytestUnraisableExceptionWarning: Exception ignored while calling deallocator <function _TemporaryFileCloser.__del__ at 0x7454c1e3e350>: None
    | 
    +---------------- 2 ----------------
    | Traceback (most recent call last):
    |   File ".../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/tempfile.py", line 538, in __del__
    |     _warnings.warn(self.warn_message, ResourceWarning)
    |     ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | ResourceWarning: Implicitly cleaning up <HTTPError 403: 'Forbidden'>
    | 
    | The above exception was the direct cause of the following exception:
    | 
    | Traceback (most recent call last):
    |   File "........................................../home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14...................../site-packages/_pytest/unraisableexception.py", line 63, in collect_unraisable
    |     warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
    |     ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | pytest.PytestUnraisableExceptionWarning: Exception ignored while calling deallocator <function _TemporaryFileCloser.__del__ at 0x7454c1e3e350>: None
    | 
    +---------------- 3 ----------------
    | Traceback (most recent call last):
    |   File ".../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/tempfile.py", line 538, in __del__
    |     _warnings.warn(self.warn_message, ResourceWarning)
    |     ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | ResourceWarning: Implicitly cleaning up <HTTPError 403: 'Forbidden'>
    | 
    | The above exception was the direct cause of the following exception:
    | 
    | Traceback (most recent call last):
    |   File "........................................../home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14...................../site-packages/_pytest/unraisableexception.py", line 63, in collect_unraisable
    |     warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
    |     ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | pytest.PytestUnraisableExceptionWarning: Exception ignored while calling deallocator <function _TemporaryFileCloser.__del__ at 0x7454c1e3e350>: None
    | 
    +---------------- 4 ----------------
    | Traceback (most recent call last):
    |   File ".../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/tempfile.py", line 538, in __del__
    |     _warnings.warn(self.warn_message, ResourceWarning)
    |     ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | ResourceWarning: Implicitly cleaning up <HTTPError 403: 'Forbidden'>
    | 
    | The above exception was the direct cause of the following exception:
    | 
    | Traceback (most recent call last):
    |   File "........................................../home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14...................../site-packages/_pytest/unraisableexception.py", line 63, in collect_unraisable
    |     warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
    |     ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | pytest.PytestUnraisableExceptionWarning: Exception ignored while calling deallocator <function _TemporaryFileCloser.__del__ at 0x7454c1e3e350>: None
    | 
    +---------------- 5 ----------------
    | Traceback (most recent call last):
    |   File ".../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/tempfile.py", line 538, in __del__
    |     _warnings.warn(self.warn_message, ResourceWarning)
    |     ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | ResourceWarning: Implicitly cleaning up <HTTPError 403: 'Forbidden'>
    | 
    | The above exception was the direct cause of the following exception:
    | 
    | Traceback (most recent call last):
    |   File "........................................../home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14...................../site-packages/_pytest/unraisableexception.py", line 63, in collect_unraisable
    |     warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
    |     ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | pytest.PytestUnraisableExceptionWarning: Exception ignored while calling deallocator <function _TemporaryFileCloser.__del__ at 0x7454c1e3e350>: None
    | 
    +------------------------------------
src/scanpy/datasets/_ebi_expression_atlas.py::scanpy.datasets._ebi_expression_atlas.ebi_expression_atlas
Stack Traces | 1.2s run time
133     labels with a single or :attr:`~anndata.AnnData.n_obs` distinct values.
134 
135 Returns
136 -------
137 Annotated data matrix.
138 
139 Example
140 -------
141 >>> import scanpy as sc
142 >>> sc.datasets.ebi_expression_atlas("E-ENAD-19")  # doctest: +ELLIPSIS
UNEXPECTED EXCEPTION: <HTTPError 403: 'Forbidden'>
Traceback (most recent call last):
  File "<doctest scanpy.datasets._ebi_expression_atlas.ebi_expression_atlas[1]>", line 1, in <module>
  File ".../scanpy/datasets/_ebi_expression_atlas.py", line 159, in ebi_expression_atlas
    download_experiment(accession)
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File ".../scanpy/datasets/_utils.py", line 22, in wrapper
    return f(*args, **kwargs)
  File ".../scanpy/datasets/_ebi_expression_atlas.py", line 48, in download_experiment
    sniff_url(accession)
    ~~~~~~~~~^^^^^^^^^^^
  File ".../scanpy/datasets/_ebi_expression_atlas.py", line 39, in sniff_url
    with urlopen(base_url):  # Check if server up/ dataset exists
         ~~~~~~~^^^^^^^^^^
  File ".../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py", line 187, in urlopen
    return opener.open(url, data, timeout)
           ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
  File ".../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py", line 493, in open
    response = meth(req, response)
  File ".../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py", line 602, in http_response
    response = self.parent.error(
        'http', request, response, code, msg, hdrs)
  File ".../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py", line 531, in error
    return self._call_chain(*args)
           ~~~~~~~~~~~~~~~~^^^^^^^
  File ".../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py", line 464, in _call_chain
    result = func(*args)
  File ".../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py", line 611, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden
https://www.ebi.ac..../sc/experiments/E-ENAD-19/
#x1B[1m#x1B[31m.../scanpy/datasets/_ebi_expression_atlas.py#x1B[0m:142: UnexpectedException
tests/test_datasets.py::test_ebi_expression_atlas
Stack Traces | 3.63s run time
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x745439106cf0>

    #x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.internet#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_ebi_expression_atlas#x1B[39;49;00m(monkeypatch: pytest.MonkeyPatch):#x1B[90m#x1B[39;49;00m
        #x1B[94mfrom#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[04m#x1B[96mscanpy#x1B[39;49;00m#x1B[04m#x1B[96m.#x1B[39;49;00m#x1B[04m#x1B[96mdatasets#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[94mimport#x1B[39;49;00m _ebi_expression_atlas #x1B[94mas#x1B[39;49;00m ea_mod#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        #x1B[90m# make sure we use chunks when testing.#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[90m# This dataset has ~31k entries, so 20k entries/chunk = 2 chunks#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[94massert#x1B[39;49;00m #x1B[96mhasattr#x1B[39;49;00m(ea_mod, #x1B[33m"#x1B[39;49;00m#x1B[33mCHUNK_SIZE#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
        monkeypatch.setattr(ea_mod, #x1B[33m"#x1B[39;49;00m#x1B[33mCHUNK_SIZE#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[94m20_000#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        #x1B[90m# a tiny dataset (~160kB), since EBI’s downloads can be very slow#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
>       adata = sc.datasets.ebi_expression_atlas(#x1B[33m"#x1B[39;49;00m#x1B[33mE-ENAD-19#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31mtests/test_datasets.py#x1B[0m:110: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[.../scanpy/datasets/_ebi_expression_atlas.py#x1B[0m:159: in ebi_expression_atlas
    #x1B[0mdownload_experiment(accession)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[.../scanpy/datasets/_utils.py#x1B[0m:22: in wrapper
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m f(*args, **kwargs)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[.../scanpy/datasets/_ebi_expression_atlas.py#x1B[0m:48: in download_experiment
    #x1B[0msniff_url(accession)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[.../scanpy/datasets/_ebi_expression_atlas.py#x1B[0m:39: in sniff_url
    #x1B[0m#x1B[94mwith#x1B[39;49;00m urlopen(base_url):  #x1B[90m# Check if server up/ dataset exists#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
         ^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../..................../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py#x1B[0m:187: in urlopen
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m opener.open(url, data, timeout)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../..................../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py#x1B[0m:493: in open
    #x1B[0mresponse = meth(req, response)#x1B[90m#x1B[39;49;00m
               ^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../..................../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py#x1B[0m:602: in http_response
    #x1B[0mresponse = #x1B[96mself#x1B[39;49;00m.parent.error(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../..................../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py#x1B[0m:531: in error
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._call_chain(*args)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../..................../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py#x1B[0m:464: in _call_chain
    #x1B[0mresult = func(*args)#x1B[90m#x1B[39;49;00m
             ^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <urllib.request.HTTPDefaultErrorHandler object at 0x745470f63b60>
req = <urllib.request.Request object at 0x745433f15ae0>
fp = <http.client.HTTPResponse object at 0x74542c3ea8c0>, code = 403
msg = 'Forbidden', hdrs = <http.client.HTTPMessage object at 0x74545c2be3f0>

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mhttp_error_default#x1B[39;49;00m(#x1B[96mself#x1B[39;49;00m, req, fp, code, msg, hdrs):#x1B[90m#x1B[39;49;00m
>       #x1B[94mraise#x1B[39;49;00m HTTPError(req.full_url, code, msg, hdrs, fp)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE       urllib.error.HTTPError: HTTP Error 403: Forbidden#x1B[0m
#x1B[1m#x1B[31mE       https://www.ebi.ac..../sc/experiments/E-ENAD-19/#x1B[0m

#x1B[1m#x1B[31m../..................../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py#x1B[0m:611: HTTPError
tests/test_qc_metrics.py::test_top_segments_sparse_small_int[uint16]
Stack Traces | 8.65s run time
self = <tempfile._TemporaryFileCloser object at 0x745433109250>

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92m__del__#x1B[39;49;00m(#x1B[96mself#x1B[39;49;00m):#x1B[90m#x1B[39;49;00m
        close_called = #x1B[96mself#x1B[39;49;00m.close_called#x1B[90m#x1B[39;49;00m
        #x1B[96mself#x1B[39;49;00m.cleanup()#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m #x1B[95mnot#x1B[39;49;00m close_called:#x1B[90m#x1B[39;49;00m
>           _warnings.warn(#x1B[96mself#x1B[39;49;00m.warn_message, #x1B[96mResourceWarning#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE           ResourceWarning: Implicitly cleaning up <HTTPError 403: 'Forbidden'>#x1B[0m

#x1B[1m#x1B[31m../...../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/tempfile.py#x1B[0m:538: ResourceWarning

#x1B[33mThe above exception was the direct cause of the following exception:#x1B[0m

cls = <class '_pytest.runner.CallInfo'>
func = <function call_and_report.<locals>.<lambda> at 0x74541e94acf0>
when = 'call'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)

    #x1B[0m#x1B[37m@classmethod#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mfrom_call#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        #x1B[96mcls#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
        func: Callable[[], TResult],#x1B[90m#x1B[39;49;00m
        when: Literal[#x1B[33m"#x1B[39;49;00m#x1B[33mcollect#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33msetup#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mcall#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mteardown#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
        reraise: #x1B[96mtype#x1B[39;49;00m[#x1B[96mBaseException#x1B[39;49;00m] | #x1B[96mtuple#x1B[39;49;00m[#x1B[96mtype#x1B[39;49;00m[#x1B[96mBaseException#x1B[39;49;00m], ...] | #x1B[94mNone#x1B[39;49;00m = #x1B[94mNone#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
    ) -> CallInfo[TResult]:#x1B[90m#x1B[39;49;00m
    #x1B[90m    #x1B[39;49;00m#x1B[33m"""Call func, wrapping the result in a CallInfo.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    :param func:#x1B[39;49;00m
    #x1B[33m        The function to call. Called without arguments.#x1B[39;49;00m
    #x1B[33m    :type func: Callable[[], _pytest.runner.TResult]#x1B[39;49;00m
    #x1B[33m    :param when:#x1B[39;49;00m
    #x1B[33m        The phase in which the function is called.#x1B[39;49;00m
    #x1B[33m    :param reraise:#x1B[39;49;00m
    #x1B[33m        Exception or exceptions that shall propagate if raised by the#x1B[39;49;00m
    #x1B[33m        function, instead of being wrapped in the CallInfo.#x1B[39;49;00m
    #x1B[33m    """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        excinfo = #x1B[94mNone#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        instant = timing.Instant()#x1B[90m#x1B[39;49;00m
        #x1B[94mtry#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
>           result: TResult | #x1B[94mNone#x1B[39;49;00m = func()#x1B[90m#x1B[39;49;00m
                                     ^^^^^^#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14....../site-packages/_pytest/runner.py#x1B[0m:361: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14....../site-packages/_pytest/runner.py#x1B[0m:250: in <lambda>
    #x1B[0m#x1B[94mlambda#x1B[39;49;00m: runtest_hook(item=item, **kwds),#x1B[90m#x1B[39;49;00m
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../site-packages/pluggy/_caller.py#x1B[0m:197: in __call__
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._hookexec(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../site-packages/pluggy/_manager.py#x1B[0m:183: in _hookexec
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._inner_hookexec(hook_name, methods, kwargs, firstresult)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../site-packages/_pytest/logging.py#x1B[0m:878: in pytest_runtest_call
    #x1B[0m#x1B[94myield#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../site-packages/_pytest/capture.py#x1B[0m:906: in pytest_runtest_call
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m (#x1B[94myield#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
            ^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../site-packages/_pytest/skipping.py#x1B[0m:268: in pytest_runtest_call
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m (#x1B[94myield#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
            ^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14........./site-packages/_pytest/unraisableexception.py#x1B[0m:179: in pytest_runtest_call
    #x1B[0mcollect_unraisable(item.config)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14........./site-packages/_pytest/unraisableexception.py#x1B[0m:75: in collect_unraisable
    #x1B[0m#x1B[94mraise#x1B[39;49;00m errors[#x1B[94m0#x1B[39;49;00m]#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

config = <_pytest.config.Config object at 0x7454c19fc2f0>

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mcollect_unraisable#x1B[39;49;00m(config: Config) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
        pop_unraisable = config.stash[unraisable_exceptions].pop#x1B[90m#x1B[39;49;00m
        errors: #x1B[96mlist#x1B[39;49;00m[pytest.PytestUnraisableExceptionWarning | #x1B[96mRuntimeError#x1B[39;49;00m] = []#x1B[90m#x1B[39;49;00m
        meta = #x1B[94mNone#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        hook_error = #x1B[94mNone#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[94mtry#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
            #x1B[94mwhile#x1B[39;49;00m #x1B[94mTrue#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
                #x1B[94mtry#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
                    meta = pop_unraisable()#x1B[90m#x1B[39;49;00m
                #x1B[94mexcept#x1B[39;49;00m #x1B[96mIndexError#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
                    #x1B[94mbreak#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
                #x1B[94mif#x1B[39;49;00m #x1B[96misinstance#x1B[39;49;00m(meta, #x1B[96mBaseException#x1B[39;49;00m):#x1B[90m#x1B[39;49;00m
                    hook_error = #x1B[96mRuntimeError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mFailed to process unraisable exception#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
                    hook_error.__cause__ = meta#x1B[90m#x1B[39;49;00m
                    errors.append(hook_error)#x1B[90m#x1B[39;49;00m
                    #x1B[94mcontinue#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
                msg = meta.msg#x1B[90m#x1B[39;49;00m
                #x1B[94mtry#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
>                   warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE                   pytest.PytestUnraisableExceptionWarning: Exception ignored while calling deallocator <function _TemporaryFileCloser.__del__ at 0x7454c1e3e350>: None#x1B[0m

#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14........./site-packages/_pytest/unraisableexception.py#x1B[0m:63: PytestUnraisableExceptionWarning

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@flying-sheep
flying-sheep merged commit ce374de into scverse:1.13.x Nov 26, 2026
4 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants