Changeset: 3468258b9dc5 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/3468258b9dc5
Modified Files:
        sql/test/Tests/hot_snapshot.py
Branch: Dec2023
Log Message:

Work around deprecation warning in Python 3.12.
In 3.12 we need a "filter" argument, but before that argument didn't
exist.  Wonderful design, NOT.


diffs (18 lines):

diff --git a/sql/test/Tests/hot_snapshot.py b/sql/test/Tests/hot_snapshot.py
--- a/sql/test/Tests/hot_snapshot.py
+++ b/sql/test/Tests/hot_snapshot.py
@@ -110,7 +110,13 @@ def test_snapshot(z_extension, expected_
 
         # and extract the tar file
         with tarfile.open(fileobj=f) as tar:
-            tar.extractall(dbfarm)
+            try:
+                tar.extraction_filter
+            except AttributeError:
+                # pre 3.12 Python
+                tar.extractall(dbfarm)
+            else:
+                tar.extractall(dbfarm, filter='data')
 
         f.close()
         # and restart the server
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to