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
Make autogen/pari Python 3 compatible #21874
Comments
Branch: u/chapoton/21874 |
New commits:
|
Author: Frédéric Chapoton |
Commit: |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:3
should be good now. Works for python3, not checked for python2. |
comment:4
Doctest failure, see patchbot. |
comment:5
The "native" format for filenames is |
comment:6
elsewhere in the code, one takes the sum (+) of datadir and a string, so one needs the decode() |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:9
Replying to @fchapoton:
That string should then also be |
comment:10
Are you sure about this? In Python 3.5
|
comment:11
|
comment:12
See https://docs.python.org/3/howto/unicode.html#unicode-filenames Note the sentence "When opening a file for reading or writing, you can usually just provide the Unicode string as the filename, and it will be automatically converted to the right encoding for you". This means that Python does a conversion of encoding, so it makes sense to use |
comment:13
Replying to @jdemeyer:
But handling the locale/filesystem encoding seems best left to Python. What if I do not even dare imagine what would happen with a WIN-1252-encoded fat filesystem mounted inside a ISO-8859 locale (these things can happen with usb keys...). |
comment:14
Replying to @defeo:
If |
comment:15
Replying to @jdemeyer:
Same goes for |
comment:16
Replying to @defeo:
Not if |
comment:17
Replying to @jdemeyer:
Right. I thought it was the other way around. So where are these |
comment:18
I think this is the only place. Could you please handle all this without me ? |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:20
ok, here is another try, following Jeroen's suggestion |
comment:21
patchbot now gives a green light |
Reviewer: Jeroen Demeyer |
comment:22
Good for me then. |
Changed branch from u/chapoton/21874 to |
CC: @defeo @fchapoton
Component: python3
Author: Frédéric Chapoton
Branch/Commit:
07d262a
Reviewer: Jeroen Demeyer
Issue created by migration from https://trac.sagemath.org/ticket/21874
The text was updated successfully, but these errors were encountered: