Issue 8370: change module "builtins" to "builtin" in import documentation (original) (raw)

This issue has been migrated to GitHub: https://github.com/python/cpython/issues/52617

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 2022-04-11 14:56 by admin. 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
2022-04-11 14:56:59 admin set github: 52617
2010-04-14 21:37:39 georg.brandl set status: open -> closedresolution: fixedmessages: +
2010-04-14 14:54:41 ncoghlan set nosy: + ncoghlan
2010-04-13 20:55:38 ajaksu2 set priority: normalstage: patch review
2010-04-11 15:40:55 eric.araujo set messages: +
2010-04-11 15:38:58 eric.araujo set messages: +
2010-04-11 15:32:30 chris.jerdonek set messages: +
2010-04-11 15:14:06 chris.jerdonek set messages: + versions: + Python 2.7
2010-04-11 15:06:53 chris.jerdonek set files: + _issue-8370-1.diffkeywords: + patchmessages: +
2010-04-11 15:04:49 eric.araujo set nosy: + eric.araujomessages: +
2010-04-11 15:00:56 chris.jerdonek set assignee: georg.brandlcomponents: + Documentationnosy: + georg.brandl
2010-04-11 15:00:40 chris.jerdonek create