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 2012年07月08日 21:13 by chris.jerdonek, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (4) | |||
|---|---|---|---|
| msg165035 - (view) | Author: Chris Jerdonek (chris.jerdonek) * (Python committer) | Date: 2012年07月08日 21:12 | |
I'm not sure if this should be fixed in the code or in the documentation, but the pkgutil.iter_importers() documentation says that pkgutil.iter_importers(name) should yield the "importers for sys.meta_path, sys.path, and Python’s "classic" import machinery, in that order" when name does not include a ".": http://docs.python.org/dev/library/pkgutil.html#pkgutil.iter_importers However, the function appends a "non-classic" pkgutil.ImpImporter at the end of all that: Python 3.3.0b1 (default:5d43154d68a8, Jul 8 2012, 13:54:45) [GCC 4.2.1 Compatible Apple Clang 3.1 (tags/Apple/clang-318.0.58)] on darwin >>> from pkgutil import iter_importers >>> list(iter_importers())[-1] <pkgutil.ImpImporter object at 0x1035fa840> |
|||
| msg165095 - (view) | Author: Ronan Lamy (Ronan.Lamy) * | Date: 2012年07月09日 16:30 | |
AFAICT, the intent of this function was to help provide a fully PEP-302 compliant import process wrapping the builtin C-implemented import mechanism. Nowadays, I believe that iterating over sys.meta_path should probably be enough. |
|||
| msg165099 - (view) | Author: Chris Jerdonek (chris.jerdonek) * (Python committer) | Date: 2012年07月09日 17:44 | |
Marking this a documentation issue because the same behavior is also present in 2.7: Python 2.7.3 (default, Apr 19 2012, 00:55:09) [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 23351500)] on darwin >>> from pkgutil import iter_importers >>> list(iter_importers())[-1] <pkgutil.ImpImporter instance at 0x10517b710> |
|||
| msg165539 - (view) | Author: Chris Jerdonek (chris.jerdonek) * (Python committer) | Date: 2012年07月15日 17:25 | |
Closing as this is no longer an issue after Nick's pkgutil changes documented in issue 15343. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:32 | admin | set | github: 59502 |
| 2012年07月15日 17:25:16 | chris.jerdonek | set | status: open -> closed messages: + msg165539 |
| 2012年07月09日 17:44:01 | chris.jerdonek | set | assignee: docs@python components: + Documentation, - Library (Lib) versions: + Python 2.7 keywords: + easy nosy: + docs@python messages: + msg165099 |
| 2012年07月09日 16:30:42 | Ronan.Lamy | set | nosy:
+ Ronan.Lamy messages: + msg165095 |
| 2012年07月09日 13:16:45 | Arfrever | set | nosy:
+ Arfrever |
| 2012年07月08日 21:13:00 | chris.jerdonek | create | |