[issue3782] os.write accepts unicode strings

2008-09-15 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Thanks, committed in r66469. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue3782] os.write accepts unicode strings

2008-09-15 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Assuming you've run the test suite, go ahead and apply. -- keywords: -needs review nosy: +benjamin.peterson ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3782] os.write accepts unicode strings

2008-09-15 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Here is a patch. I've covered all direct uses of os.write() in the standard library, but perhaps there are indirect uses. Please review. -- keywords: +needs review, patch Added file: http://bugs.python.org/file11498/oswrite.patch ___

[issue3782] os.write accepts unicode strings

2008-09-08 Thread Guido van Rossum
Guido van Rossum <[EMAIL PROTECTED]> added the comment: Agreed. But we need to tread carefully -- fixing this might break other stuff that has silently relied on it. Better try it ASAP. -- nosy: +gvanrossum ___ Python tracker <[EMAIL PROTECTED]>

[issue3782] os.write accepts unicode strings

2008-09-08 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: posix_write() uses s* s* (string, Unicode, or any buffer compatible object) [Py_buffer *] http://docs.python.org/dev/3.0/c-api/arg.html IMHO os.write should not accept unicode and convert it to default encoding. The low level os functions

[issue3782] os.write accepts unicode strings

2008-09-04 Thread Antoine Pitrou
New submission from Antoine Pitrou <[EMAIL PROTECTED]>: I'm a bit puzzled that both str and bytes are accepted by os.write() in py3k: >>> os.write(1, "foo\n") foo 4 >>> os.write(1, b"foo\n") foo 4 -- components: Interpreter Core messages: 72537 nosy: pitrou priority: high severity: norm