This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients georg.brandl, ncoghlan, r.david.murray, serhiy.storchaka, yselivanov
Date 2014-02-10.22:14:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CADiSq7dQ1HcWMB8RuQ4U6BbStOkYHFg2gpntHr57RqJGyo1kSw@mail.gmail.com>
In-reply-to <1392068328.46.0.153111436989.issue20583@psf.upfronthosting.co.za>
Content
For context, codecs.CodecInfo now takes an undocumented "_is_text_encoding"
keyword-only argument to blacklist codecs from TextIOWrapper, str.encode,
bytes.decode etc. Serhiy expressed some concern that users would see that
via Pydoc, believe it was a public API, and then complain when it was
replaced by an official public API in 3.5. I suggested that hiding keyword
only underscore parameters in Pydoc might be an appropriate resolution of
that concern.

This was right around the time the Zope breakage due to relying on a
private parameter was discovered.

Some thoughts:

- you can never hide positional parameters, they affect the signature too
much
- hiding underscore prefixed keyword-only parameters *might* be reasonable
- Guido clarified the Zope breakage likely stemmed from the Python Labs
days when they occasionally blurred the lines between public API and
implementation detail a bit too much while working on both Zope *and* the
standard library
- users are generally aware that if they're relying on an undocumented
interface that starts with an underscore, it's up to them to adjust if it
changes behaviour in the next feature release
- I'm actually OK with the idea of advanced users deciding to blacklist
their own codecs if they so choose

So since making the suggestion originally, I have changed my view from +1
to -0 regarding making this change for keyword-only arguments. I was always
-1 for positional arguments.
History
Date User Action Args
2014-02-10 22:14:23ncoghlansetrecipients: + ncoghlan, georg.brandl, r.david.murray, serhiy.storchaka, yselivanov
2014-02-10 22:14:23ncoghlanlinkissue20583 messages
2014-02-10 22:14:22ncoghlancreate