bowman-lab / enspara

Modeling molecular ensembles with scalable data structures and parallel computing
https://enspara.readthedocs.io
GNU General Public License v3.0
33 stars 16 forks source link

Fixed obsolteted import of 'Iterable' from collections. #218

Closed lgsmith closed 1 year ago

lgsmith commented 1 year ago

Added four characters RaggedArray uses to check if the input sequence used by the RaggedArray constructor is in fact iterable. Abstract Base Classes were moved into the abc submodule of collections in python 3.3, but these (in our case the relevant one is Iterable) were visible at the top-level collections module for a few subsequent versions for backwards compatibility. I don't know when they changed the warning to an error, but in 3.10 it certainly is.

This changes the import so it'll be consistent and correct for all modern python3s, going back to 3.2 (which is deeply unsupported and enspara wouldn't work with anyway for other reasons). Seems like an open and shut case.

justinrporter commented 1 year ago

Looks great!