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

boxsdk 1.x does not import in python 3.6.0 #195

Closed
incidentist opened this issue Feb 24, 2017 · 7 comments
Closed

boxsdk 1.x does not import in python 3.6.0 #195

incidentist opened this issue Feb 24, 2017 · 7 comments

Comments

@incidentist
Copy link

incidentist commented Feb 24, 2017

Running a simple script in Python 3.6.0 fails to import the boxsdk module:

Traceback (most recent call last):
  File "sources/box.py", line 1, in <module>
    from boxsdk import OAuth2, Client
  File "/usr/local/lib/python3.6/site-packages/boxsdk/__init__.py", line 6, in <module>
    from .client import *  # pylint:disable=wildcard-import,redefined-builtin
  File "/usr/local/lib/python3.6/site-packages/boxsdk/client/__init__.py", line 5, in <module>
    from .client import Client
  File "/usr/local/lib/python3.6/site-packages/boxsdk/client/client.py", line 12, in <module>
    from ..object.events import Events
  File "/usr/local/lib/python3.6/site-packages/boxsdk/object/events.py", line 15, in <module>
    class EventsStreamType(with_metaclass(ExtendableEnumMeta, TextEnum)):
  File "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6/enum.py", line 119, in __prepare__
    member_type, first_enum = metacls._get_mixins_(bases)
  File "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6/enum.py", line 439, in _get_mixins_
    raise TypeError("new enumerations must be created as "
TypeError: new enumerations must be created as `ClassName([mixin_type,] enum_type)`

This is on OS X Sierra, with the latest stable version (1.5.3). The script works fine in Python 3.5.2. Tox tests also fail on the 1.5.3 tag, but run cleanly on HEAD.

@jmoldow
Copy link
Contributor

jmoldow commented Feb 24, 2017

This is a bug in six. Though we did remediate it in this repo, in PR #183. But it is currently only available in the alpha version >=2.0.0a3.

We haven't yet backported any code from 2.0.0a back to 1.x, but we could do that if necessary.

@jmoldow jmoldow changed the title boxsdk does not import in python 3.6.0 boxsdk 1.x does not import in python 3.6.0 Feb 24, 2017
@incidentist
Copy link
Author

I think that would be wise, since this is an instant hard crash with the latest stable version. For now, specifying boxsdk==2.0.0a4 in my pip requirements.txt does what I need it to do.

@jmoldow
Copy link
Contributor

jmoldow commented Feb 25, 2017

@Jeff-Meadows
Copy link
Contributor

@jmoldow the repo owner closed your issue - I think he'd like you to file it on GitHub instead.

@jmoldow
Copy link
Contributor

jmoldow commented Feb 28, 2017

Yeah, I re-filed it as a Github PR: benjaminp/six#178

@prahladyeri
Copy link

The boxsdk==2.0.0a4 workaround suggested by @incidentist works great, but this needs to be solved at priority.

@jmoldow
Copy link
Contributor

jmoldow commented Aug 3, 2017

This was fixed version 1.5.4 (pull request #217)

@jmoldow jmoldow closed this as completed Aug 3, 2017
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

4 participants