[issue8586] test_imp.py test failures on Py3K Mac OS X

2010-05-01 Thread Michael Foord

New submission from Michael Foord :

I get the following failure running test_imp on py3k, Mac OS X 10.6.3.


==
ERROR: test_package___file__ (__main__.PEP3147Tests)
--
Traceback (most recent call last):
  File "Lib/test/test_imp.py", line 303, in test_package___file__
support.forget('pep3147')
  File "/compile/python-trunk3/Lib/test/support.py", line 227, in forget
unlink(source + 'c')
  File "/compile/python-trunk3/Lib/test/support.py", line 186, in unlink
os.unlink(filename)
OSError: [Errno 20] Not a directory: '/dev/null/lib/python32.zip/pep3147.pyc'

--
messages: 104702
nosy: brett.cannon, michael.foord
priority: normal
severity: normal
stage: unit test needed
status: open
title: test_imp.py test failures on Py3K Mac OS X
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



[issue8586] test_imp.py test failures on Py3K Mac OS X

2010-05-01 Thread Michael Foord

Michael Foord  added the comment:

I see similar failures (failing to unlink weird paths from support.py) in: 
test_imp.py, test_import.py, test_pydoc.py, test_runpy.py,

--

___
Python tracker 

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



[issue8586] test_imp.py test failures on Py3K Mac OS X

2010-05-01 Thread Michael Foord

Michael Foord  added the comment:

So I'm assuming issue 8587 (same failure in test_import.py) is a duplicate of 
this. I'll close 8587.

--

___
Python tracker 

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



[issue8586] test_imp.py test failures on Py3K Mac OS X

2010-05-01 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
assignee:  -> barry
components: +Tests
nosy: +barry
stage: unit test needed -> needs patch

___
Python tracker 

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



[issue8586] test_imp.py test failures on Py3K Mac OS X

2010-05-01 Thread R. David Murray

Changes by R. David Murray :


--
assignee: barry -> 
nosy: +ezio.melotti, flox

___
Python tracker 

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



[issue8586] test_imp.py test failures on Py3K Mac OS X

2010-05-01 Thread R. David Murray

Changes by R. David Murray :


--
assignee:  -> barry

___
Python tracker 

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



[issue8586] test_imp.py test failures on Py3K Mac OS X

2010-05-03 Thread Michael Foord

Michael Foord  added the comment:

I'm seeing a "similar" (but not identical) failure on py3k / Windows 7 in 
test_marshal. Failure in the same code path in support.py:

==
ERROR: test_floats (__main__.FloatTestCase)
--
Traceback (most recent call last):
  File "../Lib/test/test_marshal.py", line 14, in helper
f = open(support.TESTFN, "wb")
IOError: [Errno 13] Permission denied: '@test_5324_tmp'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "../Lib/test/test_marshal.py", line 88, in test_floats
self.helper(f)
  File "../Lib/test/test_marshal.py", line 26, in helper
support.unlink(support.TESTFN)
  File "C:\compile\py3k\lib\test\support.py", line 186, in unlink
os.unlink(filename)
WindowsError: [Error 5] Access is denied: '@test_5324_tmp'

--

--

___
Python tracker 

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



[issue8586] test_imp.py test failures on Py3K Mac OS X

2010-05-03 Thread Tim Golden

Tim Golden  added the comment:

This is basically issue 7743 which is a combination of:

* Using the same filename for all tests in one process
* Something (TSvn / Virus Checker) having a delete-share handle
* Not renaming the file before removing it in test.support.unlink

MvL suggested a change to the underlying unlink. I'm unconvinced
that this would solve the issue, but I haven't put together the
test cases needed to show this. For this current issue, I believe
that patching test.support.unlink to rename (to a guid-based
name in the same directory, say) before deleting would solve
all this.

It's fairly reproducible; there's a mini-test harness on
that other call which will throw up these errors often
enough to be useful.

--
nosy: +tim.golden
title: test.support errors (py3k) -> test_imp.py test failures on Py3K Mac OS X

___
Python tracker 

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



[issue8586] test_imp.py test failures on Py3K Mac OS X

2010-05-03 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Surely not bug 7743 "Additional potential string -> float conversion issues."

--

___
Python tracker 

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



[issue8586] test_imp.py test failures on Py3K Mac OS X

2010-05-03 Thread Tim Golden

Tim Golden  added the comment:

Sorry, typing too fast:

   http://bugs.python.org/issue7443 - test.support.unlink issue on Windows 
platform

at least insofar as the issue applies to Windows. I imagine that the
OS X thingis completely different.

--

___
Python tracker 

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



[issue8586] test_imp.py test failures on Py3K Mac OS X

2010-05-03 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

I cannot reproduce this on my 10.6.3 machine either running the full test 
suite, or running:

./python.exe Lib/test/test_imp.py
./python.exe -m unittest test.test_imp

--
resolution:  -> works for me

___
Python tracker 

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



[issue8586] test_imp.py test failures on Py3K Mac OS X

2010-05-03 Thread Michael Foord

Michael Foord  added the comment:

Hmm... happens reliably for me.

--

___
Python tracker 

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



[issue8586] test_imp.py test failures on Py3K Mac OS X

2010-05-03 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

How odd.  I'm on r80727 in py3k.

--

___
Python tracker 

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



[issue8586] test_imp.py test failures on Py3K Mac OS X

2010-05-03 Thread Michael Foord

Michael Foord  added the comment:

Yep, same here.

--

___
Python tracker 

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



[issue8586] test_imp.py test failures on Py3K Mac OS X

2010-05-04 Thread Michael Foord

Michael Foord  added the comment:

Any idea where this path comes from? I can go spelunking through the code 
myself to investigate.

--

___
Python tracker 

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



[issue8586] test_imp.py test failures on Py3K Mac OS X

2010-05-04 Thread Michael Foord

Michael Foord  added the comment:

Ok, so the cause of the bug is 'simple' - not sure what the best fix is.

When I run python from a freshly built py3k I have the following as sys.path:

['', '/dev/null/lib/python32.zip', '/compile/python-trunk3/Lib', 
'/compile/python-trunk3/Lib/plat-darwin', 
'/compile/python-trunk3/build/lib.macosx-10.4-x86_64-3.2-pydebug', 
'/Volumes/Second Drive/michael/.local/lib/python/3.2/site-packages']

Note that weird second entry!

support.forget(...) trys to unlink the supplied name (+.py + c|o) from every 
path in sys.path.

The unlink function catches OSError, but *only* if the errno is errno.ENOENT. 
On my system the specific error raises is:

OSError: [Errno 20] Not a directory

--

___
Python tracker 

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



[issue8586] test_imp.py test failures on Py3K Mac OS X

2010-05-04 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Maybe you just want to relax the test in the except clause of 
test.support.unlink()?  Or change the test to

if error.errno not in (errno.ENOENT, errno.ENOTDIR)

?

--

___
Python tracker 

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



[issue8586] test_imp.py test failures on Py3K Mac OS X

2010-05-04 Thread Michael Foord

Michael Foord  added the comment:

On trunk the definition of unlink is:


def unlink(filename):
try:
os.unlink(filename)
except OSError:
pass

:-)

Changing it as you suggest fixes the problem though. Ok to commit?

--

___
Python tracker 

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



[issue8586] test_imp.py test failures on Py3K Mac OS X

2010-05-04 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

+1

--
assignee: barry -> michael.foord
resolution: works for me -> accepted

___
Python tracker 

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



[issue8586] test_imp.py test failures on Py3K Mac OS X

2010-05-04 Thread Michael Foord

Michael Foord  added the comment:

Committed revision 80771.

--
assignee: michael.foord -> barry
resolution: accepted -> works for me
stage: needs patch -> committed/rejected
status: open -> closed

___
Python tracker 

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