From 6d48a550b8781ab86d27f6d1af1afdf3d7af9cff Mon Sep 17 00:00:00 2001 From: Alex Ozdemir Date: Wed, 5 Jan 2022 09:19:03 -0800 Subject: [PATCH] Don't use python's collections.Set (#7875) We used to use collections.Set. Apparently this was an alias for collections.abc.Set. I can't find it documented anywhere though, going as far back as Python 3.5. Perhaps it was an undocumented left-over from when the collections.abc module was split out from collections in Python 3.3? At any rate, the alias appears broken in Python version 3.10.1. Now we just use the builtin set type, which is what we wanted anyway, I think. --- src/api/python/cvc5.pxi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/python/cvc5.pxi b/src/api/python/cvc5.pxi index ce9e98e6f..0ef8dce55 100644 --- a/src/api/python/cvc5.pxi +++ b/src/api/python/cvc5.pxi @@ -1,4 +1,4 @@ -from collections import defaultdict, Set +from collections import defaultdict from fractions import Fraction from functools import wraps import sys @@ -832,7 +832,7 @@ cdef class Solver: if unresolvedSorts == None: unresolvedSorts = set([]) else: - assert isinstance(unresolvedSorts, Set) + assert isinstance(unresolvedSorts, set) sorts = [] cdef vector[c_DatatypeDecl] decls -- 2.30.2