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

Fix for #406 (ascii issue) #536

Merged
merged 10 commits into from Nov 25, 2016
Merged

Fix for #406 (ascii issue) #536

merged 10 commits into from Nov 25, 2016

Conversation

@hakonsbm
Copy link
Contributor

hakonsbm commented Nov 1, 2016

PyNEST will now raise a NESTError when trying to use non-ascii characters under Python 2.7.

We did not manage to find a way to make PyNEST work with non-ascii characters under Python 2.7. Note that this works under Python 3.

@mention-bot
Copy link

mention-bot commented Nov 1, 2016

@hakonsbm, thanks for your PR! By analyzing the history of the files in this pull request, we identified @otizonaizit, @apeyser and @jougs to be potential reviewers.

@jougs
Copy link
Contributor

jougs commented Nov 2, 2016

@hakonsbm: can you please remove the trailing whitespace in pynest/pynestkernel.pyx? Thanks!

hakonsbm
@jougs
jougs approved these changes Nov 2, 2016
Copy link
Contributor

jougs left a comment

LGTM.

@heplesser
Copy link
Contributor

heplesser commented Nov 17, 2016

@apeyser Could you have a look at this one and see if it is ready for a second thumb up?

@apeyser
Copy link
Contributor

apeyser commented Nov 17, 2016

I'd suggest wrapping up

if python3_test:
    def encode(s): return s.encode('utf-8')
    def decode(s): return s.decode('utf-8')
else:
    ... for python2.7

just to remove the repeated ifs scattered through the code.

hakonsbm added 4 commits Nov 22, 2016
@hakonsbm
Copy link
Contributor Author

hakonsbm commented Nov 25, 2016

@apeyser Something like this?

Copy link
Contributor

apeyser left a comment

Just fix up the spacing and approved.


def decode(s): return s.decode('utf-8')
def decode(s):
return s.decode('utf-8')

This comment has been minimized.

Copy link
@apeyser

apeyser Nov 25, 2016

Contributor

Add a newline after this

@@ -82,19 +82,21 @@ def catching_sli_run(cmd):
"""

if sys.version_info >= (3,):
engine.run('{%s} runprotected' % cmd) # Python 3
def encode(s): return s

This comment has been minimized.

Copy link
@apeyser

apeyser Nov 25, 2016

Contributor

Precisely like this. The rest of the code is simplified and clear.

@hakonsbm
Copy link
Contributor Author

hakonsbm commented Nov 25, 2016

@apeyser Fixed.

@apeyser apeyser merged commit 870d23b into nest:master Nov 25, 2016
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@hakonsbm hakonsbm deleted the hakonsbm:non_ascii_handling branch Nov 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.