classification
Title: Is GeneratorContextManager public?
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.2
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, ncoghlan, pitrou
Priority: normal Keywords: easy

Created on 2011-01-07 19:05 by pitrou, last changed 2011-01-08 09:55 by pitrou. This issue is now closed.

Messages (8)
msg125683 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011-01-07 19:05
contextlib.GeneratorContextManager doesn't have an underscore but it's not documented either. Something has to be done (I would say make it private).
msg125684 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2011-01-07 19:06
It isn't in __all__ and it is undocumented - so I'd say its private already.
msg125685 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2011-01-07 19:10
Not clear; see #10838.
msg125686 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2011-01-07 19:13
There was a discussion on python-dev about naming conventions in the  standard library. There was no clear consensus that everything non-public should start with an underscore. Several developers thought that merely being undocumented or not present in __all__ was sufficient (evidently including Guido at the point he implemented this).
msg125688 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011-01-07 19:15
> There was a discussion on python-dev about naming conventions in the
> standard library. There was no clear consensus that everything
> non-public should start with an underscore. Several developers thought
> that merely being undocumented or not present in __all__ was
> sufficient (evidently including Guido at the point he implemented
> this).

Underscoring makes it much clearer, though, that people shouldn't rely
on it.
At this point, GCM is only used in copies of the contextlib source code
and our own test_with, so we can still rename it.
(http://www.google.com/codesearch?hl=fr&sa=N&q=GeneratorContextManager )
msg125689 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2011-01-07 19:18
I have no objection to a rename that adds a leading underscore.
msg125755 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2011-01-08 06:57
I'd like to leave the door open to some tweaks in the GCM implementation for 3.3, so making it officially private (by adding the leading underscore) sounds good to me.
msg125773 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011-01-08 09:55
Ok, done in r87860.
History
Date User Action Args
2011-01-08 09:55:58pitrousetstatus: open -> closed

messages: + msg125773
resolution: fixed
stage: resolved
2011-01-08 06:57:18ncoghlansetkeywords: + easy

messages: + msg125755
2011-01-07 19:24:24michael.foordsetnosy: - michael.foord
2011-01-07 19:18:36michael.foordsetmessages: + msg125689
2011-01-07 19:15:36pitrousetmessages: + msg125688
2011-01-07 19:13:02michael.foordsetmessages: + msg125686
2011-01-07 19:10:22georg.brandlsetnosy: + georg.brandl
messages: + msg125685
2011-01-07 19:06:52michael.foordsetmessages: + msg125684
2011-01-07 19:05:08pitroucreate