From 4be40c82c5656070c26bfe37a4ba0177cbcd4547 Mon Sep 17 00:00:00 2001 From: teixeirazeus Date: Sat, 13 Jul 2024 18:18:40 -0300 Subject: [PATCH] Update collections import for compatibility with newer Python versions --- Projects/2_Classical Planning/layers.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Projects/2_Classical Planning/layers.py b/Projects/2_Classical Planning/layers.py index da399266..56117692 100644 --- a/Projects/2_Classical Planning/layers.py +++ b/Projects/2_Classical Planning/layers.py @@ -2,8 +2,12 @@ from copy import deepcopy from functools import lru_cache from itertools import combinations -from collections import defaultdict, MutableSet - +try: + from collections import defaultdict, MutableSet +except ImportError: + from collections.abc import MutableSet + from collections import defaultdict + from aimacode.planning import Action from aimacode.utils import expr, Expr