classification
Title: change module "builtins" to "__builtin__" in __import__ documentation
Type: behavior Stage: patch review
Components: Documentation Versions: Python 2.7, Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: chris.jerdonek, eric.araujo, georg.brandl, ncoghlan
Priority: normal Keywords: patch

Created on 2010-04-11 15:00 by chris.jerdonek, last changed 2010-04-14 21:37 by georg.brandl. This issue is now closed.

Files
File name Uploaded Description Edit
_issue-8370-1.diff chris.jerdonek, 2010-04-11 15:06 Proposed patch
Messages (8)
msg102841 - (view) Author: Chris Jerdonek (chris.jerdonek) * (Python committer) Date: 2010-04-11 15:00
The "builtins" module referenced in the Python 2.6 __import__ documentation does not seem to exist in Python 2.6:

http://docs.python.org/library/functions.html#__import__

These should probably be changed to __builtin__:

http://docs.python.org/library/__builtin__.html
msg102842 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-04-11 15:04
You’re right. This module name has been fixed in the 3.x branch (it used a magic name without reason); when importlib was backported from 3.1 to 2.6, this change must have been overlooked.

Are you willing to produce a patch?

Regards
msg102843 - (view) Author: Chris Jerdonek (chris.jerdonek) * (Python committer) Date: 2010-04-11 15:06
Replaced "builtins" with "__builtin__".  Also inserted a missing "the".
msg102844 - (view) Author: Chris Jerdonek (chris.jerdonek) * (Python committer) Date: 2010-04-11 15:14
Thanks for the info and quick response.  Then this should probably also be applied to trunk (Python 2.7).
msg102847 - (view) Author: Chris Jerdonek (chris.jerdonek) * (Python committer) Date: 2010-04-11 15:32
Would it make sense to put a "New in version 3.1" at the top of this page:

http://docs.python.org/py3k/library/builtins.html

(perhaps also with a note explaining that the module replaces __builtin__).  I actually wasn't able to confirm when "builtins" was introduced by searching Google and What's New, etc.  That's why I appreciated Eric's note.
msg102848 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-04-11 15:38
> (perhaps also with a note explaining that the module replaces __builtin__)
People used to 2.x will know about the name change; people new to Python with 3.x (the happy ones!) will not this this information, except perhaps to understand outdated docs or snippets. Hm. A short note would be helpful, I agree.


> I actually wasn't able to confirm when "builtins" was introduced by
> searching Google and What's New,
http://docs.python.org/py3k/whatsnew/3.0.html#library-changes

Regards
msg102849 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-04-11 15:40
Your first patch seems good to me; wait for a core developer’s answer before taking time to add notes about renamed modules everywhere.

Cheers
msg103151 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-04-14 21:37
Thanks, fixed in r80082.  The builtins rename happened in 3.0; there are no "version added" or "version changed" marks for 3.0 in the docs, since we regard it as a "clean start".
History
Date User Action Args
2010-04-14 21:37:39georg.brandlsetstatus: open -> closed
resolution: fixed
messages: + msg103151
2010-04-14 14:54:41ncoghlansetnosy: + ncoghlan
2010-04-13 20:55:38ajaksu2setpriority: normal
stage: patch review
2010-04-11 15:40:55eric.araujosetmessages: + msg102849
2010-04-11 15:38:58eric.araujosetmessages: + msg102848
2010-04-11 15:32:30chris.jerdoneksetmessages: + msg102847
2010-04-11 15:14:06chris.jerdoneksetmessages: + msg102844
versions: + Python 2.7
2010-04-11 15:06:53chris.jerdoneksetfiles: + _issue-8370-1.diff
keywords: + patch
messages: + msg102843
2010-04-11 15:04:49eric.araujosetnosy: + eric.araujo
messages: + msg102842
2010-04-11 15:00:56chris.jerdoneksetassignee: georg.brandl

components: + Documentation
nosy: + georg.brandl
2010-04-11 15:00:40chris.jerdonekcreate