[issue17321] Better way to pass objects between imp.find_module() and imp.load_module()

2013-02-28 Thread Joe Borg
Joe Borg added the comment: Hi Brett, I missed the fact that it's deprecated as it's not mentioned in the 2.* docs http://docs.python.org/2/library/imp.html. I can see it is in the 3.*. Thanks for the feedback. -- ___ Python tracker

[issue17321] Better way to pass objects between imp.find_module() and imp.load_module()

2013-02-28 Thread Brett Cannon
Brett Cannon added the comment: Both imp.find_module() and load_module() have been documented as deprecated since Python 3.3. I have not added the warning as I have to work through the stdlib first to remove all current uses. But for what you are after, Joe, just use importlib.import_module()

[issue17321] Better way to pass objects between imp.find_module() and imp.load_module()

2013-02-28 Thread Joe Borg
Joe Borg added the comment: Thanks for the swift feedback guys, if this is deprecated (i.e. not being carried to Python 3) then close the bug; I'll look at `importlib` and see if it carries the same problem. -- type: behavior -> ___ Python tracker

[issue17321] Better way to pass objects between imp.find_module() and imp.load_module()

2013-02-28 Thread Ezio Melotti
Ezio Melotti added the comment: imp e imp.find/load_module() are also deprecated (or will be deprecated soon). -- nosy: +brett.cannon, ezio.melotti type: -> behavior ___ Python tracker

[issue17321] Better way to pass objects between imp.find_module() and imp.load_module()

2013-02-28 Thread R. David Murray
R. David Murray added the comment: Does importlib in Python3 provide what you need? (New features such as this cannot be added to Python2.) -- nosy: +r.david.murray ___ Python tracker

[issue17321] Better way to pass objects between imp.find_module() and imp.load_module()

2013-02-28 Thread Joe Borg
New submission from Joe Borg: If I want to use imp to find some load modules, I have to do it in quite an "unpythonic" way: >>> name = "os" >>> file, pathname, description = imp.find_module(name) >>> imp.load_module(name, file, pathname, description) Can there not be a better way to pass the t