You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Last two entries in the programming FAQ are out of date (import related) #62234
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/ezio-melotti'closed_at=<Date2014-08-04.16:37:33.557>created_at=<Date2013-05-22.17:35:15.547>labels= ['type-bug', 'docs']
title='Last two entries in the programming FAQ are out of date (import related)'updated_at=<Date2014-08-04.16:37:33.555>user='https://github.com/bitdancer'
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?
Activity
bitdancer commentedon May 22, 2013
The second to last talks about the __import__ quirk with out calling __import__ out as deprecated. The last uses the imp module for reload.
ezio-melotti commentedon Jun 8, 2013
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?
ezio-melotti commentedon Jun 8, 2013
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
brettcannon commentedon Jun 8, 2013
Hasn't been moved yet. And the __import__ question should probably be rephrased as "don't do this".
larstiq commentedon Aug 3, 2014
The attached patch changes the body of the import faq entry to suggest using
importlib.import_moduleinstead.python-dev commentedon Aug 4, 2014
New changeset 815f1a69283e by Ezio Melotti in branch '3.4':
bpo-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':
bpo-18034: merge with 3.4.
http://hg.python.org/cpython/rev/f78ef3819d67
New changeset 46c7a724b487 by Ezio Melotti in branch '2.7':
bpo-18034: update FAQ to suggest importlib.import_module instead of __import__. Patch by Wouter van Heyst.
http://hg.python.org/cpython/rev/46c7a724b487
ezio-melotti commentedon Aug 4, 2014
Fixed, thanks for the patch!
The other FAQ got fixed in bpo-17177/3d3b9d456eb8.