chg: force protocol 5 for pickles

pull/636/head
Raphaël Vinot 2023-03-08 16:55:18 +02:00
parent 76e179e9be
commit 4a33e10cc9
1 changed files with 1 additions and 1 deletions

View File

@ -272,7 +272,7 @@ class CapturesIndex(Mapping):
default_recursion_limit = sys.getrecursionlimit()
sys.setrecursionlimit(int(default_recursion_limit * 1.1))
try:
pickle.dump(tree, _p)
pickle.dump(tree, _p, protocol=5)
except RecursionError as e:
raise NoValidHarFile(f'Tree too deep, probably a recursive refresh: {e}.\n Append /export to the URL to get the files.')
sys.setrecursionlimit(default_recursion_limit)