This is an automated email from the ASF dual-hosted git repository.
raulcd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 3f4a04ee9fb GH-50277: [CI][Python] Avoid using generators for test
parametrization on newer Pytest (#50278)
3f4a04ee9fb is described below
commit 3f4a04ee9fb40a5db78cb5257b88950599c1c11a
Author: Raúl Cumplido <[email protected]>
AuthorDate: Tue Jun 30 09:21:58 2026 +0200
GH-50277: [CI][Python] Avoid using generators for test parametrization on
newer Pytest (#50278)
### Rationale for this change
On the hypothesis tests we treat Warnings as errors and the job has been
failing with the latest Pytest version (9.1.0). This is related to:
- https://github.com/pytest-dev/pytest/issues/13409
With the latest pytest using generators for parametrization has been
deprecated.
### What changes are included in this PR?
Change the generator that was causing the failures and return a list of
supported_factories instead.
### Are these changes tested?
Yes both locally and the archery test that was failing.
### Are there any user-facing changes?
No
* GitHub Issue: #50277
Authored-by: Raúl Cumplido <[email protected]>
Signed-off-by: Raúl Cumplido <[email protected]>
---
python/pyarrow/tests/test_memory.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/python/pyarrow/tests/test_memory.py
b/python/pyarrow/tests/test_memory.py
index 56196bd9c5b..d5fbb0de457 100644
--- a/python/pyarrow/tests/test_memory.py
+++ b/python/pyarrow/tests/test_memory.py
@@ -38,9 +38,8 @@ def backend_factory(backend_name):
def supported_factories():
- yield pa.default_memory_pool
- for backend_name in pa.supported_memory_backends():
- yield backend_factory(backend_name)
+ factories = [pa.default_memory_pool]
+ return factories + [backend_factory(bn) for bn in
pa.supported_memory_backends()]
@contextlib.contextmanager