[issue27112] tokenize.__all__ list is incomplete

2016-09-08 Thread Martin Panter
Martin Panter added the comment: Thanks Jacek. I would prefer to go with v2.patch. -- stage: -> patch review ___ Python tracker ___ _

[issue27112] tokenize.__all__ list is incomplete

2016-09-05 Thread Jacek Kołodziej
Jacek Kołodziej added the comment: > I would lean toward ensuring the test fails if someone adds a new > implementation detail without an underscore prefix. It is also good to be > explicit that the ISTERMINAL() etc functions are special cases. Original patch meets these requirements. I've upd

[issue27112] tokenize.__all__ list is incomplete

2016-09-05 Thread Jacek Kołodziej
Changes by Jacek Kołodziej : Added file: http://bugs.python.org/file44373/tokenize_all.v2.patch ___ Python tracker ___ ___ Python-bugs-list ma

[issue27112] tokenize.__all__ list is incomplete

2016-05-28 Thread Martin Panter
Martin Panter added the comment: Changing the names to tokenize. does solve the problem of the tokenize module versus the tokenize() fuction, so I can accept this way since you prefer it. So I think that just leaves what to do with the actual test case. I don’t think it matters too much, but

[issue27112] tokenize.__all__ list is incomplete

2016-05-25 Thread Jacek Kołodziej
Jacek Kołodziej added the comment: > * All names in black list are implementation details. Names in white list are > stable and already repeated in docs. Assumption here is that implementation details shouldn't "look" public - they should have names starting with "_"; I think blacklisting name

[issue27112] tokenize.__all__ list is incomplete

2016-05-25 Thread Martin Panter
Martin Panter added the comment: I think it might be better to add a separate “import tokenize as tokenize_module”. Or just “import tokenize” inside the test function. IMO changing all the names adds too much churn with minimal benefit. Maybe also should restore the “from unittest import . . .

[issue27112] tokenize.__all__ list is incomplete

2016-05-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: * White list consists mostly from token.__all__. * All names in black list are implementation details. Names in white list are stable and already repeated in docs. * test.support.check__all__ shouldn't be used in this case. See other tests for public API that

[issue27112] tokenize.__all__ list is incomplete

2016-05-24 Thread Jacek Kołodziej
Jacek Kołodziej added the comment: I disagree: * blacklist has 48 entries now, whitelist would have 72 ones * whitelisting requires adding new public names to two places instead of one * test.support.check__all__ currently don't support whitelisting, it would need to be added -- __

[issue27112] tokenize.__all__ list is incomplete

2016-05-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The blacklist is too long. I think it would be better to use white list. -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue27112] tokenize.__all__ list is incomplete

2016-05-24 Thread Jacek Kołodziej
New submission from Jacek Kołodziej: That's a child issue of #23883, created to propose a patch fixing tokenize module's __all__ list. Changes in tests go farther: I've changed import from from tokenize import ... to import tokenize and adjusted all its usages accordingly. The modu