You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CI: The release of pytest 9.1.0 breaks tests. #31635
Pytest 9.1.0 was released 6/13/2026 and breaks tests where it is pip installed without the pin
in the requirements files. I opened a pytest issue: pytest-dev/pytest#14592.
We might be able to fix some of those on the NumPy side, I haven't looked hard at our usage.
Which basically just requires conversions of "parametrize" arguments from generator/iterator type objects to "materialized" types like lists or tuples. A sample PR fixing up scipy.spatial I just did is at: scipy/scipy#25376
I suppose you could also just suppress them and kick the can down the road until 10.x, although the conversion is pretty straightforward. I suppose an LLM might even be able to find most uses of generator-type objects in parametrized tests and convert them to lists or tuples.
Yeah, we have a couple of places that use generator functions, just to organize the code a bit and avoid list appending...
I dunno why this deprecation is important, but I wonder if we should just add list() everwhere, build a list in those functions, or create a tiny @listify decorator (which could also apply @functools.cache)
(Heck, you could do @lambda x: list(x) or @lambda x: lambda *args, **kwargs: list(x(*args, **kwargs)) but to me a lambda decorator looks like being too smart)
Activity
[-]The release of pytest 3.1.0 breaks tests.[/-][+]CI: The release of pytest 3.1.0 breaks tests.[/+][-]CI: The release of pytest 3.1.0 breaks tests.[/-][+]CI: The release of pytest 9.1.0 breaks tests.[/+]tylerjereddy commentedon Jun 13, 2026
It looks like these are just warnings about breaking changes in the upcoming
pytest10.xrelease series. SciPy has a few hundred errors related to these warnings too, and they almost all seem to just be the result of this one: https://docs.pytest.org/en/stable/deprecations.html#non-collection-iterables-in-pytest-mark-parametrizeWhich basically just requires conversions of "parametrize" arguments from generator/iterator type objects to "materialized" types like lists or tuples. A sample PR fixing up
scipy.spatialI just did is at: scipy/scipy#25376I suppose you could also just suppress them and kick the can down the road until 10.x, although the conversion is pretty straightforward. I suppose an LLM might even be able to find most uses of generator-type objects in parametrized tests and convert them to lists or tuples.
seberg commentedon Jun 14, 2026
Yeah, we have a couple of places that use generator functions, just to organize the code a bit and avoid list appending...
I dunno why this deprecation is important, but I wonder if we should just add
list()everwhere, build a list in those functions, or create a tiny@listifydecorator (which could also apply@functools.cache)(Heck, you could do
@lambda x: list(x)or@lambda x: lambda *args, **kwargs: list(x(*args, **kwargs))but to me a lambda decorator looks like being too smart)charris commentedon Jun 17, 2026
We are now compatible with pytest 9.1.0.