Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@butsugiri
Copy link

--json option does not work when using python3, as iteritems() is not available in python3.

Thus, I add six module so that both python2 and python3 can use --json option.

Also, I had to directly write version information in setup.py as importing gpustat.py in setup.py causes an installation error. (setup.py tries and fails to import yet-not-installed six)

this is an attempt to avoid `ImportError: No module named six`
which occurs when installing gpustat, which occurs because of
(yet not installed & to-be-installed) six module
gpustat.py Outdated
import json

__version__ = '0.4.0.dev'
import six
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can simply move this import into function jsonify, thus the lazy import should not cause the problem in setup.py.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your advice!
I now use lazy import in afbd117 .

@wookayin
Copy link
Owner

wookayin commented Sep 5, 2017

Thank you for your contribution. I admit that the current release (0.3.1) has the bug on Python 3, but a new changeset is superseding this.

wookayin added a commit that referenced this pull request Sep 17, 2017
@wookayin
Copy link
Owner

Released v0.3.2 (see the corresponding commit). On master branch toward v0.4, it is already fixed.

@wookayin wookayin closed this Sep 17, 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

Successfully merging this pull request may close these issues.

3 participants