From: Alex Ozdemir Date: Wed, 5 Jan 2022 17:19:03 +0000 (-0800) Subject: Don't use python's collections.Set (#7875) X-Git-Tag: cvc5-1.0.0~599 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6d48a550b8781ab86d27f6d1af1afdf3d7af9cff;p=cvc5.git 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. --- 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