[issue8727] test_import failure

2010-05-18 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

r81290

--
assignee: brett.cannon -> barry
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8727] test_import failure

2010-05-18 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Thanks, Antoine filled me in on IRC just before my 'net connection went down 
for many hours.  The good news is that I have a fix for this and will commit it 
in a little while.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8727] test_import failure

2010-05-17 Thread Brett Cannon

Brett Cannon  added the comment:

Sorry about that. I guess I should have been more explicit when I said that "I 
have flagged the test as an expected failure" that meant I made it pass in the 
test suite until I get a chance to fix this.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8727] test_import failure

2010-05-17 Thread Nick Coghlan

Nick Coghlan  added the comment:

Brett marked it as an expected failure in r81219.

Probably should have mentioned that here at the time though...

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8727] test_import failure

2010-05-17 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

I cannot reproduce this on Ubuntu 10.04 with current py3k (r81268), even using 
the boiled down example given by Antoine.  What platform are you on?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8727] test_import failure

2010-05-15 Thread Brett Cannon

Changes by Brett Cannon :


--
priority: normal -> critical

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8727] test_import failure

2010-05-15 Thread Brett Cannon

Brett Cannon  added the comment:

I found the cause of the failure.

When Barry implemented PEP 3147, he made PyPycLoader.bytecode_path() operate as 
if the only possible bytecode file one would want is the __cached__ one. That 
obviously is not accurate in the face of source-less modules. So the 
test_import is failing because it is not even attempting a bytecode-only import.

What this means is that importlib needs to change its implementation of 
bytecode_path() to return the proper path based on whether the source exists. I 
will get to that hopefully this week. In the mean time I have flagged the test 
as an expected failure.

This also shows me even more that I need to redo the ABCs in importlib to 
essentially make bytecode an optimization that the ABC handles and that is not 
exposed to the importer implementer.

--
assignee:  -> brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8727] test_import failure

2010-05-15 Thread Brett Cannon

Brett Cannon  added the comment:

THe sys.path  modification warning is a red herring; the test simply was not 
cleaning up after itself properly. That little bit is fixed in r81214.

Don't know about the cause of the actual failure yet.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8727] test_import failure

2010-05-15 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

This can be narrowed down to the following test sequence:

$ ./python -E -m test.regrtest test_heapq test_import
test_heapq
test_import
Warning -- sys.path was modified by test_import
test test_import failed -- Traceback (most recent call last):
  File "/home/antoine/py3k/__svn__/Lib/test/test_import.py", line 167, in 
test_module_with_large_stack
exec('import ' + module)
  File "", line 1, in 
  File "/home/antoine/py3k/__svn__/Lib/importlib/_bootstrap.py", line 151, in 
decorated
return fxn(self, module)
  File "/home/antoine/py3k/__svn__/Lib/importlib/_bootstrap.py", line 320, in 
load_module
code_object = self.get_code(module.__name__)
  File "/home/antoine/py3k/__svn__/Lib/importlib/_bootstrap.py", line 429, in 
get_code
"object for {0!r}".format(fullname))
ImportError: no source or bytecode available to create code object for 
'longlist'


test_heapq involves test.support.import_fresh_module().

--
nosy: +barry, brett.cannon, ncoghlan
stage:  -> needs patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8727] test_import failure

2010-05-15 Thread Antoine Pitrou

New submission from Antoine Pitrou :

[...]
test_import
Warning -- sys.path was modified by test_import
test test_import failed -- Traceback (most recent call last):
  File "/home/antoine/py3k/__svn__/Lib/test/test_import.py", line 167, in 
test_module_with_large_stack
exec('import ' + module)
  File "", line 1, in 
  File "/home/antoine/py3k/__svn__/Lib/importlib/_bootstrap.py", line 151, in 
decorated
return fxn(self, module)
  File "/home/antoine/py3k/__svn__/Lib/importlib/_bootstrap.py", line 320, in 
load_module
code_object = self.get_code(module.__name__)
  File "/home/antoine/py3k/__svn__/Lib/importlib/_bootstrap.py", line 429, in 
get_code
"object for {0!r}".format(fullname))
ImportError: no source or bytecode available to create code object for 
'longlist'

--
components: Library (Lib), Tests
messages: 105825
nosy: pitrou
priority: normal
severity: normal
status: open
title: test_import failure
type: behavior
versions: Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com