Closed aisk closed 3 years ago
I think pytest may hide this issue so we don't found it: https://stackoverflow.com/questions/52798967/why-can-i-access-collections-abc-in-tests-but-not-in-production .
Bumping, this is a PITA right now
Also, this was previously discussed in https://github.com/druid-io/pydruid/issues/169 but wasn't correctly resolved.
Since
abc
is a submodule incollections
and not imported to collections, directly usingcollections.abc.MutableSequence
will cause error in newer versions (I tested it on 3.8.5, but I think 3.7 may have the same issue):And the current code will cause this error:
python -c "from pydruid import client"
.I think this issue was not found because if we run
import collections.abc
orfrom collections.abc import x
before, thecollections.abc
will be added tocollections
. And many thrid party have codes like this.But anyway, I think we should fix this.