[issue8307] test_pep263 failure on OS X

2010-04-04 Thread Mark Dickinson
Mark Dickinson added the comment: Yes, Benjamin's checkin seems to have fixed it for me, too. Thanks, Benjamin! There's still the issue of the Tkinter import changing the locale, but that seems to be out of Python's control. As far as I can tell, it happens when the module initialization ca

[issue8307] test_pep263 failure on OS X

2010-04-03 Thread Ned Deily
Ned Deily added the comment: Verified that r79725 fix to tokenizer.c prevents the original test failure. -- ___ Python tracker ___ ___

[issue8307] test_pep263 failure on OS X

2010-04-03 Thread Ned Deily
Ned Deily added the comment: For the record, the problem here isn't new to trunk and is not limited to OS X 10.6; it's the test that's new. It's not a problem for py3k where, as expected, the locale is always set and it seems the tokenizer is a little smarter: Python 3.2a0 (py3k, Apr 3 201

[issue8307] test_pep263 failure on OS X

2010-04-03 Thread Mark Dickinson
Mark Dickinson added the comment: Ned: yes, that works too. Thanks! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue8307] test_pep263 failure on OS X

2010-04-03 Thread Mark Dickinson
Mark Dickinson added the comment: I realize that the above doesn't really explain why the NameError is occurring: Python's token recognition algorithm, in tok_get in tokenizer.c, uses isalpha, which is locale-aware. In particular, it seems that chr(255) is considered alphabetic in the UTF-8

[issue8307] test_pep263 failure on OS X

2010-04-03 Thread Ned Deily
Ned Deily added the comment: Or this: Python 2.7a4+ (trunk, Apr 3 2010, 15:18:51) [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import locale >>> locale.getlocale() (None, None) >>> import Tkinter >>> locale.ge

[issue8307] test_pep263 failure on OS X

2010-04-03 Thread Mark Dickinson
Mark Dickinson added the comment: > (Is there some way that I can see the locale change more explicitly from > Python?) Found it. :) >>> locale.nl_langinfo(locale.CODESET) 'US-ASCII' [40683 refs] >>> import Tkinter [56953 refs] >>> locale.nl_langinfo(locale.CODESET) 'UTF-8' [56953 refs] ---

[issue8307] test_pep263 failure on OS X

2010-04-03 Thread Mark Dickinson
Mark Dickinson added the comment: After some more digging, it looks as though this is due to the Tkinter import (that ends up happening as a result of test___all__) changing the locale(?), and in particular the meaning of isalpha: Python 2.7a4+ (trunk:79716, Apr 3 2010, 22:06:18) [GCC 4.2.1

[issue8307] test_pep263 failure on OS X

2010-04-03 Thread Ezio Melotti
Ezio Melotti added the comment: See also #8208. -- components: +Tests nosy: +ezio.melotti, haypo, l0nwlf, ned.deily priority: -> normal stage: -> needs patch ___ Python tracker ___

[issue8307] test_pep263 failure on OS X

2010-04-03 Thread Mark Dickinson
Mark Dickinson added the comment: That should be "NameError" in the last line of the previous message, not "TypeError". -- ___ Python tracker ___ ___

[issue8307] test_pep263 failure on OS X

2010-04-03 Thread Mark Dickinson
New submission from Mark Dickinson : I'm seeing a very peculiar test_pep263 failure when doing 'make test' on OS X 10.6.3. It's enough to run test___all__ and test_pep263, in that order: Mark-Dickinsons-MacBook-Pro:trunk dickinsm$ ./python.exe -Wd -3 -E -tt ./Lib/test/regrtest.py test___all__