[issue1276] LookupError: unknown encoding: X-MAC-JAPANESE

2007-10-13 Thread jos
New submission from jos : When I compile Python-3.0a1 on Mac OS X with Japanese locale, I've got LookupError like below. == running build_scripts creating build/scripts-3.0 Traceback

[issue1251] ssl module doesn't support non-blocking handshakes

2007-10-13 Thread Bill Janssen
Bill Janssen added the comment: It's my mistake; I was looking at too many patches at the same time. Thanks for the example. Bill __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1251 __

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-13 Thread Guido van Rossum
Changes by Guido van Rossum: -- assignee: - gvanrossum nosy: +gvanrossum __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1272 __ ___ Python-bugs-list mailing list

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-13 Thread Guido van Rossum
Guido van Rossum added the comment: Couple of nits: - You added a removal of hotshot from setup.py to the patch; but that's been checked in in the mean time. - Why add an 'errors' argument to the function when it's a fatal error to use it? - Using 0 to autodetect the length is scary.

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-13 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I found a few problems in your patch. In PyCode_New() the type check for the filename argument is incorrect: --- Objects/codeobject.c(revision 58412) +++ Objects/codeobject.c(working copy) @@ -59,7 +59,7 @@ freevars == NULL ||

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-13 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1272 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-13 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Guido wrote: Why copy the default encoding before mangling it? With a little extra care you will only have to copy it once. Also, consider not mangling at all, but assuming the encoding comes in a canonical form -- several other functions assume

[issue1276] LookupError: unknown encoding: X-MAC-JAPANESE

2007-10-13 Thread Martin v. Löwis
Changes by Martin v. Löwis: -- keywords: +patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1276 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-13 Thread Christian Heimes
Christian Heimes added the comment: Guido van Rossum wrote: - You added a removal of hotshot from setup.py to the patch; but that's been checked in in the mean time. Oh, the change shouldn't make it into the patch. I guess I forgot a svn revert on setup.py - Why add an 'errors' argument to

[issue1260] PEP 3137: Remove the buffer API from PyUnicode

2007-10-13 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: There was a problem with one of the call of PyArg_ParseTuple in the OS/2 version of listdir() in the posix module. I also clarified the error message of the 't' format unit. __ Tracker [EMAIL PROTECTED]

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-13 Thread Guido van Rossum
Guido van Rossum added the comment: On 10/13/07, Christian Heimes [EMAIL PROTECTED] wrote: Guido van Rossum wrote: - Why add an 'errors' argument to the function when it's a fatal error to use it? I wanted the signature of the method be equal to the other methods PyUnicode_Decode*. I

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-13 Thread Guido van Rossum
Guido van Rossum added the comment: Oh. Hm. I still wish that PyCode_New() could just insist that the filename argument is a PyUnicode instance. Why can't it? Perhaps the caller should be fixed instead? I'll try. I figured out the problem -- it came from marshalled old code objects. If

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-13 Thread Christian Heimes
Christian Heimes added the comment: Guido van Rossum wrote: - Why copy the default encoding before mangling it? With a little extra care you will only have to copy it once. Now I remember why I added the strncpy() call plus encoding[31] = '\0'. I wanted to make sure that the code doesn't

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-13 Thread Guido van Rossum
Guido van Rossum added the comment: Well, you could ensure that by checking that you haven't reached the end of the mangling buffer. That will have the added advantage that when the input is something silly like 32 spaces followed by utf-8 it will be still be mangled correctly. The slight extra

[issue1264] __file__ and co_filename as unicode

2007-10-13 Thread Guido van Rossum
Changes by Guido van Rossum: -- resolution: - out of date status: open - closed superseder: - Decode __file__ and co_filename to unicode using fs default __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1264 __

[issue1267] Py3K cannot run as ``python -S``

2007-10-13 Thread Guido van Rossum
Changes by Guido van Rossum: -- nosy: +gvanrossum __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1267 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1268] array unittest problems with UCS4 build

2007-10-13 Thread Guido van Rossum
Guido van Rossum added the comment: Can this be closed now that Travis reverted his patch? -- nosy: +gvanrossum __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1268 __

[issue1260] PEP 3137: Remove the buffer API from PyUnicode

2007-10-13 Thread Guido van Rossum
Guido van Rossum added the comment: You can check this in. You do have checkin privs right? -- resolution: - accepted __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1260 __

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-13 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Guido wrote: I figured out the problem -- it came from marshalled old code objects. If you throw away all .pyc files the problem goes away. You can also get rid of the similar checks for the 'name' argument -- this should just be a PyUnicode too. A

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-13 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Remove the PyString type check on 'filename' and 'name' in PyCode_New. Oops. I removed one of the ! the checks by mistake. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1272

[issue1260] PEP 3137: Remove the buffer API from PyUnicode

2007-10-13 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Committed in r58455. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1260 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1260] PEP 3137: Remove the buffer API from PyUnicode

2007-10-13 Thread Guido van Rossum
Changes by Guido van Rossum: -- status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1260 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-13 Thread Guido van Rossum
Guido van Rossum added the comment: Crys, is this OK with you? On 10/13/07, Alexandre Vassalotti [EMAIL PROTECTED] wrote: Alexandre Vassalotti added the comment: Guido wrote: I figured out the problem -- it came from marshalled old code objects. If you throw away all .pyc files the

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-13 Thread Christian Heimes
Christian Heimes added the comment: Guido van Rossum wrote: Guido van Rossum added the comment: Crys, is this OK with you? Alexandre's mangle loop doesn't do the same job as mine. Chars like _ and - aren't removed from the encoding name and the if clauses don't catch for example UTF-8 or