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.

classification
Title: Last two entries in the programming FAQ are out of date (import related)
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.3, Python 3.4, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: 17177 Superseder:
Assigned To: ezio.melotti Nosy List: brett.cannon, docs@python, eric.snow, ezio.melotti, larstiq, python-dev, r.david.murray
Priority: normal Keywords: patch

Created on 2013-05-22 17:35 by r.david.murray, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
faq-import_module.diff larstiq, 2014-08-03 07:22
Messages (7)
msg189827 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-05-22 17:35
The second to last talks about the __import__ quirk with out calling __import__ out as deprecated.  The last uses the imp module for reload.
msg190819 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2013-06-08 19:45
imp.reload() doesn't seem to be deprecated, and importlib.reload() doesn't exist.  Is there another alternative or it just hasn't been moved somewhere else?
msg190822 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2013-06-08 19:48
FTR here is a link to the FAQs: http://docs.python.org/3/faq/programming.html#import-x-y-z-returns-module-x-how-do-i-get-z
msg190836 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2013-06-08 22:35
Hasn't been moved yet. And the __import__ question should probably be rephrased as "don't do this".
msg224614 - (view) Author: Wouter van Heyst (larstiq) * Date: 2014-08-03 07:22
The attached patch changes the body of the __import__ faq entry to suggest using `importlib.import_module` instead.
msg224745 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-08-04 16:36
New changeset 815f1a69283e by Ezio Melotti in branch '3.4':
#18034: update FAQ to suggest importlib.import_module instead of __import__.  Patch by Wouter van Heyst.
http://hg.python.org/cpython/rev/815f1a69283e

New changeset f78ef3819d67 by Ezio Melotti in branch 'default':
#18034: merge with 3.4.
http://hg.python.org/cpython/rev/f78ef3819d67

New changeset 46c7a724b487 by Ezio Melotti in branch '2.7':
#18034: update FAQ to suggest importlib.import_module instead of __import__.  Patch by Wouter van Heyst.
http://hg.python.org/cpython/rev/46c7a724b487
msg224746 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2014-08-04 16:37
Fixed, thanks for the patch!
The other FAQ got fixed in #17177/3d3b9d456eb8.
History
Date User Action Args
2022-04-11 14:57:45adminsetgithub: 62234
2014-08-04 16:37:33ezio.melottisetstatus: open -> closed
versions: + Python 2.7
messages: + msg224746

assignee: docs@python -> ezio.melotti
resolution: fixed
stage: needs patch -> resolved
2014-08-04 16:36:05python-devsetnosy: + python-dev
messages: + msg224745
2014-08-03 07:22:24larstiqsetfiles: + faq-import_module.diff

nosy: + larstiq
messages: + msg224614

keywords: + patch
2013-06-08 22:35:29brett.cannonsetdependencies: + Deprecate imp
2013-06-08 22:35:23brett.cannonsetmessages: + msg190836
2013-06-08 19:48:40ezio.melottisetmessages: + msg190822
2013-06-08 19:45:59ezio.melottisetmessages: + msg190819
2013-05-26 13:36:13ezio.melottisetnosy: + ezio.melotti
2013-05-22 17:35:15r.david.murraycreate