diff --git a/737.patch b/737.patch new file mode 100644 index 0000000..f0a365e --- /dev/null +++ b/737.patch @@ -0,0 +1,26 @@ +From cd97f5ebe937b892f0582fc3440d43a38b625b18 Mon Sep 17 00:00:00 2001 +From: Tom Kooij +Date: Sat, 25 May 2019 19:02:45 +0200 +Subject: [PATCH] Cast cache to list: cache changes during iteration + +Cache items are changed while looping over the cache items, this causes an +`Dictionary keys changed during iteration` error in python>=3.8. + +Cast the cache to a list first and iterate over the list to prevent the error. +--- + tables/file.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tables/file.py b/tables/file.py +index ac9d6accc..d924e3626 100644 +--- a/tables/file.py ++++ b/tables/file.py +@@ -2849,7 +2849,7 @@ def _update_node_locations(self, oldpath, newpath): + + # Update alive and dead descendents. + for cache in [self._node_manager.cache, self._node_manager.registry]: +- for nodepath in cache: ++ for nodepath in list(cache): + if nodepath.startswith(oldprefix) and nodepath != oldprefix: + nodesuffix = nodepath[oldprefix_len:] + newnodepath = join_path(newpath, nodesuffix) diff --git a/python-tables.spec b/python-tables.spec index 1f5dbb1..1e49cc1 100644 --- a/python-tables.spec +++ b/python-tables.spec @@ -17,6 +17,9 @@ Source0: https://github.com/PyTables/PyTables/archive/v%{version}/python- Source1: https://github.com/PyTables/PyTables/releases/download/v%{manual_version}/pytablesmanual-%{manual_version}.pdf Patch0: always-use-blosc.diff +# Python 3.8 support +Patch1: https://github.com/PyTables/PyTables/pull/737.patch + License: BSD URL: http://www.pytables.org