Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update adapters to use collections.abc? #85

Open
bannanc opened this issue May 4, 2019 · 2 comments
Open

Update adapters to use collections.abc? #85

bannanc opened this issue May 4, 2019 · 2 comments
Labels
long term Caitlin did not have time to address

Comments

@bannanc
Copy link
Member

bannanc commented May 4, 2019

I'm getting this warning on my most recent travis tests

/home/travis/build/MobleyLab/chemper/chemper/chemper_utils.py:106: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working

This is an easy fix and I'll get it into PR #82 when I get back to fixing that.

@bannanc bannanc added the long term Caitlin did not have time to address label Jul 2, 2019
@bannanc
Copy link
Member Author

bannanc commented Jul 2, 2019

Switching to just from collections import ... doesn't work in python 3.6 which we are still supporting. I recommend revisiting this issue after we add python 3.8 support.

@bannanc
Copy link
Member Author

bannanc commented Jul 2, 2019

dask addresses this by adding its own compatibility file which imports in different ways allowing the same package to support multiple versions of python. This might be something to consider if it matters. For ChemPer collections is only used in adapters so the import could be

try:
    from collections.abc import ABC, abstractmethod, abstractclassmethod
except ImportError:
    from collections import ABC, abstractmethod, abstractclassmethod

I'm going to leave this up to whoever adds CI for python 3.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
long term Caitlin did not have time to address
Projects
None yet
Development

No branches or pull requests

1 participant