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
py3: fixes for encoding in subprocess.Popen in sage.interfaces #24834
Comments
comment:2
Why |
comment:3
As usual, I explained in my commit messages:
|
comment:4
The reason I might use latin-1 here, but not in some other interfaces, is that these are just very simple programs that output some ASCII text, and aren't likely to involve non-ASCII text. I could be wrong there but looking over how they work it seems unlikely. This is true for most of the interfaces actually, but not quite all (e.g. some could produce error messages that contain system errors in whatever the system's language is, but not so here). |
comment:5
I think it would be nice if you added the comment about latin-1 in the source code where you use it. Sure, it's in the commit history, but once we drop Python 2 support (and remove the Once this is documented, I am very happy to give this a positive review. |
Reviewer: Julian Rüth |
comment:8
branch does not apply, needs rebase |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:10
Is this "needs_review" ? Looks good to me. Could you please fix the pyflakes plugin complaint ? |
comment:11
There was some comment about leaving a comment as to why I used latin-1 in one case, but I don't think it's necessary... |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:15
ok, let it be |
Changed reviewer from Julian Rüth to Julian Rüth, Frédéric Chapoton |
Changed branch from u/embray/python3/interfaces/popen-encoding to |
The easiest way I've found for dealing with interfaces that use
subprocess.Popen
is, on Python 3, to simply specify an encoding for the subprocess I/O. Unfortunately this argument doesn't exist on Python 2 (a wrapper for this might be nice but the examples are few enough that I haven't been compelled to bother).Component: python3
Author: Erik Bray
Branch/Commit:
bd63b99
Reviewer: Julian Rüth, Frédéric Chapoton
Issue created by migration from https://trac.sagemath.org/ticket/24834
The text was updated successfully, but these errors were encountered: