yank icon indicating copy to clipboard operation
yank copied to clipboard

support for python 3.10?

Open zhang-ivy opened this issue 1 year ago • 2 comments

Will yank support python 3.10?

I'm running into errors when running the yank analysis notebook with the CLI using python 3.10.

The first error I get:

Traceback (most recent call last):
  File "/home/zhangi/miniconda3/envs/perses-paper7/bin/yank", line 6, in <module>
    from yank.cli import main
  File "/home/zhangi/miniconda3/envs/perses-paper7/lib/python3.10/site-packages/yank/__init__.py", line 12, in <module>
    from . import utils
  File "/home/zhangi/miniconda3/envs/perses-paper7/lib/python3.10/site-packages/yank/utils.py", line 279, in <module>
    class CombinatorialTree(collections.MutableMapping):
AttributeError: module 'collections' has no attribute 'MutableMapping'

When I run the yank analysis notebook with python 3.9, I see the following warning:

<stdin>:1: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working

So it seems like I just need to change collections.MutableMapping to collections.abc.MutableMapping.

When I fix this error in my local version of yank, I get the following error:

TypeError: load() missing 1 required positional argument: 'Loader'

I think this is happening because the yaml file is not being loaded properly here: https://github.com/choderalab/yank/blob/c06059045bcf86d610f2e39c6db3944994b9f392/Yank/analyze.py#L299

These errors are simple enough to fix, but I'm just wondering whether we plan on updating yank to be compatible with python 3.10?

zhang-ivy avatar Apr 19 '23 14:04 zhang-ivy