[issue29512] regrtest refleak: implement bisection feature

2019-05-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12969

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29512] regrtest refleak: implement bisection feature

2019-05-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12968

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29512] regrtest refleak: implement bisection feature

2019-05-01 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
pull_requests: +12959

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29512] regrtest refleak: implement bisection feature

2018-05-30 Thread STINNER Victor


STINNER Victor  added the comment:

One year later, all issues have now been fixed ;-)

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29512] regrtest refleak: implement bisection feature

2018-05-30 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 823c295efa4efea93cadc640ed6122cd9d86cec4 by Victor Stinner in 
branch '2.7':
bpo-29512: Rename Lib/test/bisect.py to bisect_cmd.py (#7229)
https://github.com/python/cpython/commit/823c295efa4efea93cadc640ed6122cd9d86cec4


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29512] regrtest refleak: implement bisection feature

2018-05-29 Thread STINNER Victor


STINNER Victor  added the comment:

I created the PR 7229 to rename Lib/test/bisect.py to Lib/test/bisect_cmd.py.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29512] regrtest refleak: implement bisection feature

2018-05-29 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +6861

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29512] regrtest refleak: implement bisection feature

2017-11-23 Thread STINNER Victor

STINNER Victor  added the comment:

Python 2.7.14 was released with test.bisect.

While there are corner cases, do we really have to do something?

The simplest fix is just to rename Lib/test/bisect.py to Lib/test/bisect_cmd.py 
in Python 2.7. It's a tool written for CPython developer, it's CLI is not 
stable nor documented.

It just mean replacing "./python -m test.bisect ..." with "./python -m 
test.bisect_cmd ...", not a big deal.

What do you think of renaming the script?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29512] regrtest refleak: implement bisection feature

2017-11-23 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 448c6739877a4143a2c3599f041fa6127f354044 by Victor Stinner in 
branch '2.7':
bpo-29512: Fix Lib/test/bisect.py shebang (#4522)
https://github.com/python/cpython/commit/448c6739877a4143a2c3599f041fa6127f354044


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29512] regrtest refleak: implement bisection feature

2017-11-23 Thread STINNER Victor

Change by STINNER Victor :


--
keywords: +patch
pull_requests: +4459
stage: resolved -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29512] regrtest refleak: implement bisection feature

2017-07-25 Thread STINNER Victor

STINNER Victor added the comment:

Workarounds:

* ./python -m test test_httpservers
* ./python -I Lib/test/test_httpservers.py

> Maybe it's me who is doing things wrong, but when I run 
> Lib/test/test_httpservers.py I get this strange error :

...
  File "c:\python36\lib\random.py", line 48, in 
import bisect as _bisect
  File "C:\cpython\Lib\test\bisect.py", line 27, in 
...

Oh. Lib/test/ should not be in sys.path. "import bisect" loaded 
Lib/test/bisect.py instead of Lib/bisect.py. See my commit 
3050987d85d7cf8cdd4b3c053e673d13cd8dfb12 in Python 2.7:

* regrtest now removes '' and Lib/test/ from sys.path
* Use absolute import in test_bisect

(regrtest in master already does something similar.)

But the sys.path is only fixed when regrtest is used...


> There are many ways of running tests, and some of them are broken now.
> $ ./python Lib/test/test_bisect.py

... if you run Lib/test/test_xxx.py directly, Lib/test/ is added to sys.path, 
except if you use -I:

$ ./python -I Lib/test/test_bisect.py 

--
Ran 36 tests in 0.094s

OK


I didn't know that "./python Lib/test/test_bisect.py" was broken :-(

Maybe Lib/test/support/__init__.py can remove Lib/test/ from sys.path?

Another option is to move or rename Lib/test/bisect.py. For example, replace 
"./python -m test.bisect ..." with "./python -m test bisect ..." (or maybe 
"./python -m test --bisect ..."). The problem is that bisect has extra options, 
but we can add a bisect prefix to these options.

I reopen this issue.

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29512] regrtest refleak: implement bisection feature

2017-07-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There are many ways of running tests, and some of them are broken now.

$ ./python Lib/test/test_bisect.py

==
ERROR: test_backcompatibility (__main__.TestBisectC)
--
Traceback (most recent call last):
  File "Lib/test/test_bisect.py", line 34, in setUp
(self.module.bisect_right, [], 1, 0),
AttributeError: module 'bisect' has no attribute 'bisect_right'

...

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29512] regrtest refleak: implement bisection feature

2017-07-25 Thread Pierre Quentel

Pierre Quentel added the comment:

Maybe it's me who is doing things wrong, but when I run 
Lib/test/test_httpservers.py I get this strange error :

Traceback (most recent call last):
  File "C:\cpython\Lib\test\test_httpservers.py", line 7, in 
from http.server import BaseHTTPRequestHandler, HTTPServer, \
  File "c:\python36\lib\http\server.py", line 92, in 
import email.utils
  File "c:\python36\lib\email\utils.py", line 28, in 
import random
  File "c:\python36\lib\random.py", line 48, in 
import bisect as _bisect
  File "C:\cpython\Lib\test\bisect.py", line 27, in 
import tempfile
  File "c:\python36\lib\tempfile.py", line 45, in 
from random import Random as _Random
ImportError: cannot import name 'Random'

I see that the bisect module is loaded from location /test/bisect.py because of 
the script introduced in the resolution of this issue. Is it intentional to 
give it the same name as a module of the standard library ?

--
nosy: +quentel

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29512] regrtest refleak: implement bisection feature

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

Ok! "python -m test.bisect" is now available in 2.7, 3.5, 3.6 and master 
branches ;-)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29512] regrtest refleak: implement bisection feature

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:


New changeset d7955b8196578306e9d86f6c61c9cb3ee72edab0 by Victor Stinner in 
branch '2.7':
[2.7] bpo-29512, bpo-30764: Backport regrtest enhancements from 3.5 to 2.7 
(#2541)
https://github.com/python/cpython/commit/d7955b8196578306e9d86f6c61c9cb3ee72edab0


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29512] regrtest refleak: implement bisection feature

2017-07-03 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2609

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29512] regrtest refleak: implement bisection feature

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 0b1210739d12c26e4a161ffd494bd572d49b2483 by Victor Stinner in 
branch '3.5':
[3.5] bpo-29512, bpo-30764, bpo-30776: Backport regrtest enhancements from 3.6 
to 3.5 (#2540)
https://github.com/python/cpython/commit/0b1210739d12c26e4a161ffd494bd572d49b2483


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29512] regrtest refleak: implement bisection feature

2017-07-03 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2606

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29512] regrtest refleak: implement bisection feature

2017-06-30 Thread STINNER Victor

STINNER Victor added the comment:


New changeset a3ca94d0504157a112a1f89bfe8be1307116fc73 by Victor Stinner in 
branch '3.6':
[3.6] bpo-29512, bpo-30776: Backport regrtest enhancements from master to 3.6 
(#2513)
https://github.com/python/cpython/commit/a3ca94d0504157a112a1f89bfe8be1307116fc73


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29512] regrtest refleak: implement bisection feature

2017-06-30 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2582

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29512] regrtest refleak: implement bisection feature

2017-06-27 Thread STINNER Victor

STINNER Victor added the comment:

Ok, I pushed a first implementation. It's problaby buggy and incomplete, but 
it's better than nothing, and can be enhanced later.

I prefer to play with it longer before starting to backport it to other 
branches, to not have to backport changes multiple times.

Thanks Yury for the review ;-)

--
nosy: +yselivanov
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29512] regrtest refleak: implement bisection feature

2017-06-27 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 84d9d14a1fa395fbd21262ba195490be25a7b3bc by Victor Stinner in 
branch 'master':
bpo-29512: Add test.bisect, bisect failing tests (#2452)
https://github.com/python/cpython/commit/84d9d14a1fa395fbd21262ba195490be25a7b3bc


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29512] regrtest refleak: implement bisection feature

2017-06-27 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2509

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29512] regrtest refleak: implement bisection feature

2017-06-08 Thread STINNER Victor

STINNER Victor added the comment:

Oops, I uploaded the wrong version. It should now work.

--
Added file: http://bugs.python.org/file46934/bisect_test.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29512] regrtest refleak: implement bisection feature

2017-06-08 Thread STINNER Victor

STINNER Victor added the comment:

Updated script: support Windows, fix cmdline help.

--
Added file: http://bugs.python.org/file46933/bisect_test.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29512] regrtest refleak: implement bisection feature

2017-06-01 Thread STINNER Victor

STINNER Victor added the comment:

The next step is to add a command to regrtest implementing all steps. Or maybe 
this script is enough? At least, it's enough for my needs ;-)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29512] regrtest refleak: implement bisection feature

2017-06-01 Thread STINNER Victor

STINNER Victor added the comment:

Serhiy: "I don't understand how issue30523 and issue30540 can help to resolve 
this issue."

- issue30523 produces a list of all test methods
- issue30540 allows to pass a file to filter tests
- attached bisect_test.py takes an input file produced by --list-tests and uses 
--matchfile to run tests

Example of usage:

./python bisect_test.py test_tools tests bisect -n 5 

* bisect -R 3:3 on test_tools
* tests contains the list of test identifiers to test_tools
* write result into the file "bisect"
* stop bisection when there is 5 tests or less

--
Added file: http://bugs.python.org/file46918/bisect_test.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29512] regrtest refleak: implement bisection feature

2017-06-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I don't understand how issue30523 and issue30540 can help to resolve this issue.

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29512] regrtest refleak: implement bisection feature

2017-05-31 Thread STINNER Victor

STINNER Victor added the comment:

First step: I created the issue #30523, "unittest: add --list-tests option to 
only display the list of test names, don't run tests".

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29512] regrtest refleak: implement bisection feature

2017-02-09 Thread STINNER Victor

New submission from STINNER Victor:

It would be great to be able to list which methods cause a reference leak.

Example right now on the 3.6 branch:

$ ./python -m test -R 3:3 test_os 
Run tests sequentially
0:00:00 [1/1] test_os
beginning 6 repetitions
123456
..
test_os leaked [124, 124, 124] references, sum=372
test_os leaked [114, 114, 114] memory blocks, sum=342
test_os failed in 32 sec

1 test failed:
test_os

Total duration: 32 sec
Tests result: FAILURE


Which methods caused the refleak?

Is it possible to list test methods of a test file using unittest?

--
components: Tests
messages: 287405
nosy: haypo
priority: normal
severity: normal
status: open
title: regrtest refleak: implement bisection feature
type: enhancement
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com