[issue9580] os.confstr() doesn't decode result according to PEP 383

2010-09-10 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: duplicate -> fixed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue9580] os.confstr() doesn't decode result according to PEP 383

2010-09-10 Thread STINNER Victor
STINNER Victor added the comment: Fixed in r84696+r84697: confstr-minimal.diff from #9579 + PyUnicode_DecodeFSDefaultAndSize(). Thanks for the patch, sorry for the delay. -- resolution: -> duplicate status: open -> closed ___ Python tracker

[issue9580] os.confstr() doesn't decode result according to PEP 383

2010-08-19 Thread David Watson
David Watson added the comment: I wrote this patch to make confstr() return bytes (with code similar to 2.x), and document the change in "Porting to Python 3.2" and elsewhere, but it then occurred to me that you might have been talking about making a separate bytes API like os.environb. Which d

[issue9580] os.confstr() doesn't decode result according to PEP 383

2010-08-14 Thread David Watson
David Watson added the comment: > CS_PATH is hardcoded to "/bin:/usr/bin" in the GNU libc for UNIX. Do you know > another key for which the value can be controled by the user (or the system > administrator)? No, not a specific example, but CS_PATH could conceivably refer to some POSIX compati

[issue9580] os.confstr() doesn't decode result according to PEP 383

2010-08-13 Thread STINNER Victor
STINNER Victor added the comment: Le vendredi 13 août 2010 20:36:22, vous avez écrit : > The CS_PATH variable is a colon-separated list of directories ("the value > for the PATH environment variable that finds all standard utilities"), so > the file system encoding is certainly correct there. C

[issue9580] os.confstr() doesn't decode result according to PEP 383

2010-08-13 Thread David Watson
David Watson added the comment: The CS_PATH variable is a colon-separated list of directories ("the value for the PATH environment variable that finds all standard utilities"), so the file system encoding is certainly correct there. I don't see any reference to an encoding in the POSIX spec f

[issue9580] os.confstr() doesn't decode result according to PEP 383

2010-08-12 Thread STINNER Victor
STINNER Victor added the comment: Can you give me examples of configuration keys with undecodable values? PyUnicode_DecodeFSDefault(AndSize) encoding depends on the locale whereas PyUnicode_FromString uses utf-8. I don't know the encoding of confstr() values. You can decode an utf-8 value usi

[issue9580] os.confstr() doesn't decode result according to PEP 383

2010-08-12 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue9580] os.confstr() doesn't decode result according to PEP 383

2010-08-12 Thread David Watson
New submission from David Watson : The attached patch applies on top of the patch from issue #9579 to make it use PyUnicode_DecodeFSDefaultAndSize(). (You could use it in the existing code, but until that issue is fixed, there is sometimes nothing to decode!) -- components: Extension Mo