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 enum #19

Closed
morenoh149 opened this issue Apr 29, 2020 · 2 comments
Closed

Update enum #19

morenoh149 opened this issue Apr 29, 2020 · 2 comments

Comments

@morenoh149
Copy link

morenoh149 commented Apr 29, 2020

When installing another package (pip install dbt) I get an error

  AttributeError: module 'enum' has no attribute 'IntFlag'

tracking dbt-labs/dbt-core#2372

If I run

$ pip show enum34
Name: enum34
Version: 1.1.9
Summary: Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4
Home-page: https://bitbucket.org/stoneleaf/enum34
Author: Ethan Furman
Author-email: ethan@stoneleaf.us
License: BSD License
Location: /Users/harrymoreno/.asdf/installs/python/3.7.3/lib/python3.7/site-packages
Requires: 
Required-by: intuit-oauth

we see that this intuit-oauth module needs to be updated for python 3.6+

Related
iterative/dvc#1995

@fjolin-intuit
Copy link
Collaborator

Hi @morenoh149 - We actually use enum-compat to handle this https://github.com/jstasiak/enum-compat. It should only be installed for anything older than Python 3.4. If you are using anything above Python 3.4 - you can simply uninstall enum34. This solution from this stack overflow is exactly how we handle it https://stackoverflow.com/questions/43124775/why-python-3-6-1-throws-attributeerror-module-enum-has-no-attribute-intflag/45716067#45716067

If you need the code to run on python versions both <=3.4 and >3.4, you can try having enum-compat as a requirement. It only installs enum34 for older versions of python without the standard library enum.

@morenoh149
Copy link
Author

fwiw imo the default should support the latest python for new users of this lib. If someone is on an older version of python they should require to add a compatibility layer.

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