[issue2409] regrtest should not just skip imports that fail

2008-03-18 Thread Neal Norwitz

New submission from Neal Norwitz <[EMAIL PROTECTED]>:

Guido mentioned this in python-3000-checkins.  I agree the problem
should be fixed.

"""
I think the automatic skip on ImportError is harmful.

We should add a helper function to test_support so that you can write

foobar = test_support.import_optional('foobar')

and it will skip the test if foobar cannot be imported; all other
failing imports should cause the test to *fail*.

This should be an easy two-part task.
"""

--
components: Tests
messages: 63992
nosy: nnorwitz
priority: high
severity: normal
status: open
title: regrtest should not just skip imports that fail
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

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



[issue2409] regrtest should not just skip imports that fail

2008-03-18 Thread Jeff Balogh

Jeff Balogh <[EMAIL PROTECTED]> added the comment:

Attaching a patch that implements optional_import().

The only arg included from __import__ is fromfile, as it's the only one 
I needed to fix up the stdlib.

--
keywords: +patch
nosy: +jeff.balogh
Added file: http://bugs.python.org/file9756/optional_import.diff

__
Tracker <[EMAIL PROTECTED]>

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



[issue2409] regrtest should not just skip imports that fail

2008-03-18 Thread Jeff Balogh

Jeff Balogh <[EMAIL PROTECTED]> added the comment:

Attaching a patch that removes ``from _winreg import *`` in 
test_winreg.py, which will allow usage of optional_import.

Added file: http://bugs.python.org/file9757/winreg-refactor.diff

__
Tracker <[EMAIL PROTECTED]>

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



[issue2409] regrtest should not just skip imports that fail

2008-03-18 Thread Jeff Balogh

Jeff Balogh <[EMAIL PROTECTED]> added the comment:

Attaching a patch that refactors the test_sunaudiodev.py imports.

Added file: http://bugs.python.org/file9758/sunaudiodev-refactor.diff

__
Tracker <[EMAIL PROTECTED]>

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



[issue2409] regrtest should not just skip imports that fail

2008-03-18 Thread Martin v. Löwis

Changes by Martin v. Löwis <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file9757/winreg-refactor.diff

__
Tracker <[EMAIL PROTECTED]>

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



[issue2409] regrtest should not just skip imports that fail

2008-03-18 Thread Jeff Balogh

Jeff Balogh <[EMAIL PROTECTED]> added the comment:

The previous winreg refactor patch didn't catch all the changes; 
attaching a new patch that fixes everything, with help from Trent 
Nelson.

Added file: http://bugs.python.org/file9759/winreg-refactor.diff

__
Tracker <[EMAIL PROTECTED]>

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



[issue2409] regrtest should not just skip imports that fail

2008-03-18 Thread Jeff Balogh

Jeff Balogh <[EMAIL PROTECTED]> added the comment:

Attaching a patch, based on the previous patches, that fixes the stdlib 
to use optional_import where ImportError was raised.

These need testing on various platforms to make sure all the 
ImportErrors are caught.  I'm on x86 Linux.

Added file: http://bugs.python.org/file9760/issue2409.diff

__
Tracker <[EMAIL PROTECTED]>

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



[issue2409] regrtest should not just skip imports that fail

2008-04-29 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
type:  -> behavior

__
Tracker <[EMAIL PROTECTED]>

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



[issue2409] regrtest should not just skip imports that fail

2009-03-31 Thread R. David Murray

Changes by R. David Murray :


Removed file: http://bugs.python.org/file9760/issue2409.diff

___
Python tracker 

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



[issue2409] regrtest should not just skip imports that fail

2009-03-31 Thread R. David Murray

R. David Murray  added the comment:

Fixed as of r70930 on trunk and shortly thereafter on the py3k branch.

I did this at the pycon sprint, and unfortunately I only discovered this
issue and your patches after I was done.  So thank you for your work and
I'm sorry it didn't actually get used (it would have allowed me to get
done faster if I'd known about it).  The solution implemented is very
similar to yours, though different in a few details.

--
nosy: +bitdancer
resolution:  -> fixed
status: open -> closed
versions: +Python 2.7, Python 3.1 -Python 2.6

___
Python tracker 

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