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: Backport test/__main__
Type: Stage:
Components: Versions: Python 3.1, Python 2.7
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: benjamin.peterson Nosy List: belopolsky, benjamin.peterson, eric.araujo, georg.brandl, loewis, michael.foord, pitrou, rhettinger, sandro.tosi, terry.reedy
Priority: normal Keywords:

Created on 2011-01-06 22:52 by belopolsky, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (15)
msg125600 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2011-01-06 22:52
It is much easier to remember and to type -m test instead of -m test.regrtest, but the usefulness of this feature is limited by the fact that it only works with the latest version. Since this does not require any user-visible changes, I think it should be ported to all actively maintained branches.  Note that we used to have a similar issue with -m test.regrtest and it was quite annoying to remember a separate incantation for 2.5.
msg125602 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2011-01-06 23:18
-0 we don't backport new features
msg125607 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2011-01-07 00:38
> -0 we don't backport new features

New tests are routinely backported when they accompany bug fixes, so new features under Lib/test are probably a fair game.  Given that this feature is implemented entirely in a file that is not used for any other purpose, I see little risk for stability.

I guess the fate of this request will depend on whether stable release maintainers are annoyed enough by having to remember -m test.regrtest.
msg125625 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-01-07 06:13
FWIW, I’ve already been caught by “./python -m test” not working with 3.1 and 2.7 when doing backports and using my shell history functionality.  I share Alexander’s viewpoint that adding test.__main__ is a core dev-specific convenience that should not count as a new feature.  I would not add it to the security-only branches, though.
msg125650 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2011-01-07 16:03
+0.
msg125666 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2011-01-07 17:48
2.6 is right out.

Martin, would you please decide on whether this should be backported to 2.7 and 3.1?   IMO, the rationale is flimsy (its not hard to run the test suite in *any* version) and it goes against our usual policy; however, it is also a trivial and isolated patch, making it somewhat harmless.

Also note that 3.1 is very soon to be closed for anything but security fixes.  Only 2.7 will in long-term maintenance.
msg125667 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2011-01-07 17:51
I thought Benjamin was still RM for 2.7 and 3.1?
msg125676 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2011-01-07 18:40
His +0 isn't a decision.  I would like Martin, the longest term active developer, to make the call about waiving the policy of not backporting features (especially when the only purported benefit saving a couple of core devs from spelling out the path name to the test suite).
msg125677 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2011-01-07 18:43
Oh, sure. I misinterpreted your comment.
msg125678 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2011-01-07 18:44
2011/1/7 Raymond Hettinger <report@bugs.python.org>:
>
> Raymond Hettinger <rhettinger@users.sourceforge.net> added the comment:
>
> His +0 isn't a decision.  I would like Martin, the longest term active developer, to make the call about waiving the policy of not backporting features (especially when the only purported benefit saving a couple of core devs from spelling out the path name to the test suite).

What are the purported downsides?
msg125737 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2011-01-08 00:32
The possible downside, as with any new feature, is that code using the new feature will not run on on previous micro (x.y.z) releases. In this case, one can run the tests using the new feature.

>>> from test import __main__
== CPython 3.2b2 (r32b2:87398, Dec 19 2010, 22:51:00) [MSC v.1500 32 bit (Intel)]
==   Windows-XP-5.1.2600-SP3 little-endian
==   c:\docume~1\terry\locals~1\temp\test_python_3872
[  1/351] test_gramm
...
(or via subprocess

Perhaps no one would do either.

However, the new feature currently does not work on Windows (see #10845 and my pydev post), so it definitely should not be backported until fixed and tested. Which is to say, I currently have to use -m test.regrtest even on 3.2 ;-(.
msg125769 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2011-01-08 09:32
> The possible downside, as with any new feature, is that code using the
> new feature will not run on on previous micro (x.y.z) releases.

That's absolutely no downside: I daresay 99% of test runs by developers are done at the branch head, not some released version.
msg125775 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2011-01-08 11:16
I'm with Raymond here (probably not surprisingly): -1 on backporting new features into 2.7. This really is foremost about having policies and sticking to them; special cases aren't special enough to break the rules. 

Personally, I haven't arrived yet at using -m to run the test suite (I run "python Lib\test\regrtest.py", as that works nicely with shell completion), so I don't care about the feature.
msg125776 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2011-01-08 11:22
Okay, that's reasonable enough.  Closing (or shall we wait for the majority to consent first?)
msg125777 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011-01-08 11:25
A backport would be more attractive if the Windows issue was fixed first...
(and I don't care about the "policy" here: anything which makes testing easier is good IMO, and we have routinely backported tests as mentioned by someone else)
History
Date User Action Args
2022-04-11 14:57:10adminsetgithub: 55058
2011-01-08 11:25:21pitrousetnosy: + pitrou
messages: + msg125777
2011-01-08 11:22:04georg.brandlsetstatus: open -> closed

messages: + msg125776
resolution: rejected
nosy: loewis, georg.brandl, rhettinger, terry.reedy, belopolsky, benjamin.peterson, eric.araujo, michael.foord, sandro.tosi
2011-01-08 11:16:14loewissetnosy: loewis, georg.brandl, rhettinger, terry.reedy, belopolsky, benjamin.peterson, eric.araujo, michael.foord, sandro.tosi
messages: + msg125775
2011-01-08 09:32:04georg.brandlsetnosy: + georg.brandl
messages: + msg125769
2011-01-08 00:32:01terry.reedysetnosy: + terry.reedy
messages: + msg125737
2011-01-07 18:44:22benjamin.petersonsetnosy: loewis, rhettinger, belopolsky, benjamin.peterson, eric.araujo, michael.foord, sandro.tosi
messages: + msg125678
2011-01-07 18:43:50georg.brandlsetnosy: - georg.brandl
2011-01-07 18:43:07georg.brandlsetnosy: loewis, georg.brandl, rhettinger, belopolsky, benjamin.peterson, eric.araujo, michael.foord, sandro.tosi
messages: + msg125677
2011-01-07 18:40:27rhettingersetnosy: loewis, georg.brandl, rhettinger, belopolsky, benjamin.peterson, eric.araujo, michael.foord, sandro.tosi
messages: + msg125676
2011-01-07 17:51:23georg.brandlsetassignee: loewis -> benjamin.peterson

messages: + msg125667
nosy: + georg.brandl
2011-01-07 17:48:52rhettingersetversions: - Python 2.6
nosy: + loewis

messages: + msg125666

assignee: benjamin.peterson -> loewis
2011-01-07 16:03:24benjamin.petersonsetnosy: rhettinger, belopolsky, benjamin.peterson, eric.araujo, michael.foord, sandro.tosi
messages: + msg125650
2011-01-07 07:49:03georg.brandlsetassignee: benjamin.peterson

nosy: + benjamin.peterson
2011-01-07 06:13:17eric.araujosetnosy: + eric.araujo
messages: + msg125625
2011-01-07 00:38:36belopolskysetnosy: rhettinger, belopolsky, michael.foord, sandro.tosi
messages: + msg125607
2011-01-06 23:18:41rhettingersetnosy: + rhettinger
messages: + msg125602
2011-01-06 22:55:51sandro.tosisetnosy: + sandro.tosi
2011-01-06 22:55:26belopolskysetnosy: + michael.foord
2011-01-06 22:52:26belopolskycreate