[issue30372] Status of __builtins__ is not totally clear

2017-05-22 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

PR merged, and I backport it to 3.6

Thanks everyone :)

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30372] Status of __builtins__ is not totally clear

2017-05-22 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 3d3b189f8ef321ccfb144a46d50892939d6004aa by Mariatta in branch 
'3.6':
[3.6] bpo-30372: Clarify that '__builtins__' is a CPython Implementation detail 
(GH-1725) (GH-1727)
https://github.com/python/cpython/commit/3d3b189f8ef321ccfb144a46d50892939d6004aa


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30372] Status of __builtins__ is not totally clear

2017-05-22 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
pull_requests: +1817

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30372] Status of __builtins__ is not totally clear

2017-05-22 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 43c8a9e39bb2d4f25ed7ae17a55f34e375d1868b by Mariatta (Naomi 
Ceder) in branch 'master':
bpo-30372: Clarify that '__builtins__' is a CPython Implementation detail 
(GH-1725)
https://github.com/python/cpython/commit/43c8a9e39bb2d4f25ed7ae17a55f34e375d1868b


--
nosy: +Mariatta

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30372] Status of __builtins__ is not totally clear

2017-05-22 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
stage: needs patch -> patch review
versions: +Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30372] Status of __builtins__ is not totally clear

2017-05-22 Thread Naomi Ceder

Naomi Ceder added the comment:

Created a PR on this... it seems that making the Implementation Detail warning 
come first and deleting the limited execution sentence achieves what's needed 
here.

--
nosy: +NaomiCeder

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30372] Status of __builtins__ is not totally clear

2017-05-22 Thread Naomi Ceder

Changes by Naomi Ceder :


--
pull_requests: +1813

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30372] Status of __builtins__ is not totally clear

2017-05-19 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Moving "CPython implementation detail: " up a paragraph should be trivial.  
Resolving the conflict between " __builtins__ can be set to a user-created 
dictionary to create a weak form of restricted execution." and "Users should 
not touch __builtins__;" seems less so.  I suspect the the latter was added 
well after the former, and that the former should have been deleted at that 
time.

--
nosy: +terry.reedy
stage:  -> needs patch
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30372] Status of __builtins__ is not totally clear

2017-05-16 Thread Brett Cannon

Brett Cannon added the comment:

You're correct that both are CPython implementation details and could be more 
clearly marked as such.

(In case anyone is curious, the code to look up __import__() can be found at 
https://github.com/python/cpython/blob/c7ac7280c321b3c1679fe5f657a6be0f86adf173/Python/ceval.c#L4991
 .)

--
nosy: +brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30372] Status of __builtins__ is not totally clear

2017-05-15 Thread Malcolm Smith

New submission from Malcolm Smith:

https://docs.python.org/3.6/reference/executionmodel.html#builtins-and-restricted-execution
 describes the various things you can do with __builtins__, but then says 
"Users should not touch __builtins__; it is strictly an implementation detail." 
If this is so, the entire section should be marked "CPython implementation 
detail", not just that last paragraph.

Elsewhere, 
https://docs.python.org/3.6/reference/import.html#replacing-the-standard-import-system
 suggests that the __import__ function could be replaced "at the module level 
to only alter the behaviour of import statements within that module". Is there 
any way of doing this other than manipulating the module's __builtins__? If 
not, this is encouraging the programmer to rely on a CPython implementation 
detail without marking it as such.

--
assignee: docs@python
components: Documentation
messages: 293722
nosy: Malcolm Smith, docs@python
priority: normal
severity: normal
status: open
title: Status of __builtins__ is not totally clear
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com