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

Add support for Python3 #2

Merged
merged 2 commits into from Feb 7, 2013
Merged

Add support for Python3 #2

merged 2 commits into from Feb 7, 2013

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Feb 7, 2013

Actually this also needs to update Sphinx to the current stable branch (support of Python3 for InheritanceGraph was added just after 1.1.3 was released) but assuming you have that installed then this works (and is still compatible with 2.6+).

@@ -117,12 +117,12 @@ def run_dot(code, options=[], format='png'):
try:
# Graphviz may close standard input when an error occurs,
# resulting in a broken pipe on communicate()
stdout, stderr = p.communicate(code)
except (OSError, IOError), err:
stdout, stderr = p.communicate(code.encode("utf-8"))
Copy link
Owner

Choose a reason for hiding this comment

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

Don't you need to decode stderr? Probably when raising RuntimeError?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It works without but the error message gets surrounded by a b'...' which I didn't notice before. So I added it now.

tkf added a commit that referenced this pull request Feb 7, 2013
Add support for Python3
@tkf tkf merged commit 87eb2d4 into tkf:master Feb 7, 2013
@tkf
Copy link
Owner

tkf commented Feb 7, 2013

Thank you!

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.

None yet

2 participants