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.

classification
Title: document that the 'test' package is for core developers only
Type: Stage: resolved
Components: Documentation Versions: Python 3.2, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: brett.cannon Nosy List: belopolsky, brett.cannon, eric.araujo, r.david.murray, terry.reedy
Priority: normal Keywords: easy

Created on 2010-07-13 21:53 by brett.cannon, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (8)
msg110236 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2010-07-13 21:53
The documentation for the 'test' package should specify that the things that are documented are really meant for people contributing to Python and not for personal use. This will help lead to people no longer using the package outside of Python itself and eventually getting the module back to being an internal detail.
msg110239 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2010-07-13 22:18
It would be nice if at the same time the facilities available in test.support and test.regrtest were reviewed and some promoted to user facing unittest package.  They can even be placed in unittest.support and unittest.regrtest modules for easy discovery.
msg110242 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-07-13 23:28
Alexander: issue8273 addresses this, but I don't think Brett's doc change should be held up pending the resolution of that issue.

Also, the entire set of test.support documentation should move to a set of 'developer' docs (which I think Brett plans to write eventually...)
msg110245 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2010-07-14 00:02
Issue 8273 is in some sense the opposite of this - it calls for blessing of everything in in test.support while this issue calls for wholesale "unblessing".  I don't think either approach is right.  While users should definitely never import test_* modules, I think test.regrtest and test.support are borderline enough that many users already started using it in their test suites.  (I am one of these users: on several projects, I actually renamed project-specific test directories to something else in order to be able to import stuff from test.)

I think the warning should be less than absolute.  Certainly users should not use things in test in their application code.  However, for use in test suites, it should be more of "use it at your own risk".
msg110246 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-07-14 00:32
"Use it at your own risk" is always an option.  Brett is saying that test.support docs need to make it clear that anyone using it is doing so at their own risk: it is for core development only and so we might change anything at any time without considering backward compatibility, and possibly even including incompatible changes in dot releases.[*]  Given this, if you want your test suite to continue to pass without change across releases (barring bugs revealed by bug fixes, of course), then you should *not* use test.support even in your own test code.

Issue 8273 is saying, "Some of this stuff is generally useful and users want it, so we should put it in unittest".  And then the standard library can used the improved unittest versions instead of the test.support ones.

So the two issues are complimentary, not opposites :)

[*] Others may disagree with me on this and perhaps we will not make incompatible changes in test.support in dot releases.  But we *will* make incompatible changes in major releases without going through a deprecation process.
msg111286 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2010-07-23 12:08
3.2: 83072
3.1: 83076
2.7: 83077
msg111298 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-07-23 12:33
Brett, could you add “r” or “rev ” before revision numbers in the future? It’s Roundup implicit markup to make a link to a revision. (Evil but handy.) Thanks in advance :)
msg111390 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2010-07-23 21:36
3.2: r83072
3.1: r83076
2.7: r83077
History
Date User Action Args
2022-04-11 14:57:03adminsetgithub: 53501
2010-07-23 21:36:52terry.reedysetnosy: + terry.reedy
messages: + msg111390
2010-07-23 12:33:29eric.araujosetnosy: + eric.araujo

messages: + msg111298
stage: needs patch -> resolved
2010-07-23 12:08:13brett.cannonsetstatus: open -> closed
resolution: fixed
messages: + msg111286
2010-07-14 00:32:50r.david.murraysetmessages: + msg110246
2010-07-14 00:02:12belopolskysetmessages: + msg110245
2010-07-13 23:28:23r.david.murraysetnosy: + r.david.murray
messages: + msg110242
2010-07-13 22:18:23belopolskysetnosy: + belopolsky
messages: + msg110239
2010-07-13 21:53:46brett.cannoncreate