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

IntEnum import error in Python 2.7 while using custom enum. #635

Closed
lukeweber opened this issue Jun 17, 2015 · 1 comment
Closed

IntEnum import error in Python 2.7 while using custom enum. #635

lukeweber opened this issue Jun 17, 2015 · 1 comment

Comments

@lukeweber
Copy link

Changes made in #582 to change connection types to enum broke my code. I'm running python 2.7 and was using https://pypi.python.org/pypi/enum/. The fix would be to more specifically check for IntEnum in the import.

The failure is basically where enum.IntEnum is used in https://github.com/giampaolo/psutil/blob/master/psutil/_common.py it fails as the code assumes the existence of enum means the existence of python 3.4 and thus IntEnum.

@giampaolo
Copy link
Owner

Mmm I see what's going on (and it sucks).
I suppose you pip install enum, which is not the right backport of python 3.4 enum module (that is: https://pypi.python.org/pypi/enum34/). I will provide a fix for this and make a new release ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants