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.
Created on 2008年03月18日 21:22 by nnorwitz, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| optional_import.diff | jeff.balogh, 2008年03月19日 03:04 | diff against r61589 | ||
| sunaudiodev-refactor.diff | jeff.balogh, 2008年03月19日 03:28 | diff against r61589 | ||
| winreg-refactor.diff | jeff.balogh, 2008年03月19日 03:59 | diff against r61589 | ||
| Messages (7) | |||
|---|---|---|---|
| msg63992 - (view) | Author: Neal Norwitz (nnorwitz) * (Python committer) | Date: 2008年03月18日 21:22 | |
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.
"""
|
|||
| msg64028 - (view) | Author: Jeff Balogh (jeff.balogh) * | Date: 2008年03月19日 03:04 | |
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. |
|||
| msg64029 - (view) | Author: Jeff Balogh (jeff.balogh) * | Date: 2008年03月19日 03:26 | |
Attaching a patch that removes ``from _winreg import *`` in test_winreg.py, which will allow usage of optional_import. |
|||
| msg64030 - (view) | Author: Jeff Balogh (jeff.balogh) * | Date: 2008年03月19日 03:28 | |
Attaching a patch that refactors the test_sunaudiodev.py imports. |
|||
| msg64032 - (view) | Author: Jeff Balogh (jeff.balogh) * | Date: 2008年03月19日 03:59 | |
The previous winreg refactor patch didn't catch all the changes; attaching a new patch that fixes everything, with help from Trent Nelson. |
|||
| msg64035 - (view) | Author: Jeff Balogh (jeff.balogh) * | Date: 2008年03月19日 04:30 | |
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. |
|||
| msg84958 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2009年04月01日 02:06 | |
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. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:32 | admin | set | github: 46661 |
| 2009年04月01日 02:06:29 | r.david.murray | set | status: open -> closed versions: + Python 3.1, Python 2.7, - Python 2.6 nosy: + r.david.murray messages: + msg84958 resolution: fixed |
| 2009年04月01日 01:57:24 | r.david.murray | set | files: - issue2409.diff |
| 2008年04月29日 21:09:51 | benjamin.peterson | set | type: behavior |
| 2008年03月19日 04:30:39 | jeff.balogh | set | files:
+ issue2409.diff messages: + msg64035 |
| 2008年03月19日 03:59:56 | jeff.balogh | set | files:
+ winreg-refactor.diff messages: + msg64032 |
| 2008年03月19日 03:57:08 | loewis | set | files: - winreg-refactor.diff |
| 2008年03月19日 03:28:45 | jeff.balogh | set | files:
+ sunaudiodev-refactor.diff messages: + msg64030 |
| 2008年03月19日 03:26:51 | jeff.balogh | set | files:
+ winreg-refactor.diff messages: + msg64029 |
| 2008年03月19日 03:04:17 | jeff.balogh | set | files:
+ optional_import.diff keywords: + patch messages: + msg64028 nosy: + jeff.balogh |
| 2008年03月18日 21:22:27 | nnorwitz | create | |