This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients mark.dickinson
Date 2010-04-03.21:00:18
SpamBayes Score 3.0099812e-12
Marked as misclassified No
Message-id <1270328421.06.0.903952382784.issue8307@psf.upfronthosting.co.za>
In-reply-to
Content
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__ test_pep263
test___all__
/Users/dickinsm/python/svn/trunk/Lib/test/test___all__.py:3: DeprecationWarning: in 3.x, the bsddb module has been removed; please use the pybsddb project instead
  import bsddb
/Users/dickinsm/python/svn/trunk/Lib/bsddb/__init__.py:67: PendingDeprecationWarning: The CObject type is marked Pending Deprecation in Python 2.7.  Please use capsule objects instead.
  import _bsddb
test_pep263
test test_pep263 failed -- Traceback (most recent call last):
  File "/Users/dickinsm/python/svn/trunk/Lib/test/test_pep263.py", line 39, in test_issue7820
    self.assertRaises(SyntaxError, eval, '\xff\x20')
  File "/Users/dickinsm/python/svn/trunk/Lib/unittest/case.py", line 444, in assertRaises
    callableObj(*args, **kwargs)
  File "<string>", line 1, in <module>
NameError: name '?' is not defined

1 test OK.
1 test failed:
    test_pep263
[218378 refs]


The failing test is expecting a SyntaxError, but gets a NameError instead.  I've narrowed down the cause of the failure to a Tkinter import:

Python 2.7a4+ (trunk:79716, Apr  3 2010, 20:30:09) 
[GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> eval('\xff\x20')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<string>", line 1
    ? 
    ^
SyntaxError: invalid syntax
[35036 refs]
>>> import Tkinter
[51314 refs]
>>> eval('\xff\x20')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<string>", line 1, in <module>
NameError: name '?' is not defined
[51324 refs]

But I'm now mystified:  why does the eval raise a SyntaxError before the import and a TypeError afterwards?
History
Date User Action Args
2010-04-03 21:00:21mark.dickinsonsetrecipients: + mark.dickinson
2010-04-03 21:00:21mark.dickinsonsetmessageid: <1270328421.06.0.903952382784.issue8307@psf.upfronthosting.co.za>
2010-04-03 21:00:19mark.dickinsonlinkissue8307 messages
2010-04-03 21:00:19mark.dickinsoncreate