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

Dynamic author list works on python 3 #794

Merged
merged 2 commits into from
Mar 21, 2016

Conversation

jbarnoud
Copy link
Contributor

Fixes the issue reported by @orbeckst in a comment bellow #787.

The dynamic author list introduced in #787 did not work on python 3
because of the way encoding was handled. This commit fixes the handling
of file encodings by using the codecs library.

The dynamic author list introduced in MDAnalysis#787 did not work on python 3
because of the way encoding was handled. This commit fixes the handling
of file encodings by using the codecs library.
@@ -364,7 +365,7 @@ def dynamic_author_list():
"Chronological list of authors" title.
"""
authors = []
with open('AUTHORS') as infile:
with codecs.open('AUTHORS', encoding='utf-8') as infile:
Copy link
Member

Choose a reason for hiding this comment

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

This might fail in that case that we can't write to our dir. Better check now. I vote for wrapping the dynamic_author_list call below in a try/except.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mnmelo Done

If the user cannot write in the MDAnalysis source directory, writing the
list of authors will fail. This commit wrap the generation so the
install proceed with a warning instead of crashing.
@mnmelo mnmelo self-assigned this Mar 21, 2016
mnmelo added a commit that referenced this pull request Mar 21, 2016
@mnmelo mnmelo merged commit bddbd81 into MDAnalysis:develop Mar 21, 2016
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.

2 participants