summaryrefslogtreecommitdiff
path: root/dev-python/tables/files
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2024-08-15 19:51:18 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2024-08-15 19:51:18 +0000
commitd2a60d563de96d9052cd5e2cbf89e30f5eb23aee (patch)
treee3130d7d65e2dd752d8e98dfc58985c369dc829b /dev-python/tables/files
parent88d4b749542d9337d56a99f28121bb06fb39a424 (diff)
downloadbaldeagleos-repo-d2a60d563de96d9052cd5e2cbf89e30f5eb23aee.tar.gz
baldeagleos-repo-d2a60d563de96d9052cd5e2cbf89e30f5eb23aee.tar.xz
baldeagleos-repo-d2a60d563de96d9052cd5e2cbf89e30f5eb23aee.zip
Adding metadata
Diffstat (limited to 'dev-python/tables/files')
-rw-r--r--dev-python/tables/files/tables-3.10.0-pypy.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/dev-python/tables/files/tables-3.10.0-pypy.patch b/dev-python/tables/files/tables-3.10.0-pypy.patch
new file mode 100644
index 000000000000..f27c99eadfb8
--- /dev/null
+++ b/dev-python/tables/files/tables-3.10.0-pypy.patch
@@ -0,0 +1,42 @@
+From c04a456a3e3f7c55722b8c77144991c657fc3af6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Wed, 14 Aug 2024 13:34:22 +0200
+Subject: [PATCH] FIX: Pass `refcheck=False` to `np.ndarray.resize()` for PyPy
+ compat
+
+Pass `refcheck=False` when resizing an `np.ndarray` in place, in order
+to fix a test failure on PyPy3:
+
+```
+Traceback (most recent call last):
+ File "/tmp/PyTables/tables/tests/test_direct_chunk.py", line 266, in test_write_chunk_missing1
+ return self._test_write_chunk_missing(shrink_after=False)
+ File "/tmp/PyTables/tables/tests/test_direct_chunk.py", line 255, in _test_write_chunk_missing
+ new_obj.resize(self.array.shape)
+ValueError: cannot resize an array with refcheck=True on PyPy.
+Use the np.resize function or refcheck=False
+```
+
+Since the object is created immediately above the `.resize()` call,
+adding `refcheck=False` should be entirely safe. Furthermore,
+unlike `np.resize()` this preserves the current behavior when new shape
+is larger than the original.
+
+Fixes #1202
+---
+ tables/tests/test_direct_chunk.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tables/tests/test_direct_chunk.py b/tables/tests/test_direct_chunk.py
+index ccc82516d..ed290d7e6 100644
+--- a/tables/tests/test_direct_chunk.py
++++ b/tables/tests/test_direct_chunk.py
+@@ -252,7 +252,7 @@ def _test_write_chunk_missing(self, shrink_after):
+ self.array.truncate(self.shape[0] - 1)
+
+ new_obj = self.obj.copy()
+- new_obj.resize(self.array.shape)
++ new_obj.resize(self.array.shape, refcheck=False)
+ obj_slice = tuple(slice(s, s + cs) for (s, cs)
+ in zip(chunk_start, self.chunkshape))
+ if not shrink_after: