[issue38063] Modify test_socket.py to use unittest test discovery

2021-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I has merged similar PR in issue45187. Although it required to fix some existing bugs first. -- nosy: +serhiy.storchaka ___ Python tracker

[issue10611] sys.exit() in a test causes a test run to die

2021-09-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: -26829 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10611] sys.exit() in a test causes a test run to die

2021-09-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka nosy_count: 4.0 -> 5.0 pull_requests: +26829 pull_request: https://github.com/python/cpython/pull/28180 ___ Python tracker

[issue45196] macOS. ./configure --with-address-sanitizer; make test; cause test case crash.

2021-09-14 Thread Gregory P. Smith
Change by Gregory P. Smith : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue45196] macOS. ./configure --with-address-sanitizer; make test; cause test case crash.

2021-09-14 Thread miss-islington
miss-islington added the comment: New changeset be200c3c6e2f82db553c0e5424e4ba70caf189c3 by Miss Islington (bot) in branch '3.10': bpo-45196: prevent unittest crash on address sanitizer builds (GH-28331) https://github.com/python/cpython/commit/be200c3c6e2f82db553c0e5424e4ba70caf189c3

[issue45196] macOS. ./configure --with-address-sanitizer; make test; cause test case crash.

2021-09-14 Thread miss-islington
miss-islington added the comment: New changeset 9ccdc90488302b212bd3405d10dc5c22052e9b4c by Miss Islington (bot) in branch '3.9': bpo-45196: prevent unittest crash on address sanitizer builds (GH-28331) https://github.com/python/cpython/commit/9ccdc90488302b212bd3405d10dc5c22052e9b4c

[issue45196] macOS. ./configure --with-address-sanitizer; make test; cause test case crash.

2021-09-14 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: -> gregory.p.smith versions: +Python 3.10, Python 3.9 ___ Python tracker ___ ___

[issue45196] macOS. ./configure --with-address-sanitizer; make test; cause test case crash.

2021-09-14 Thread miss-islington
Change by miss-islington : -- pull_requests: +26751 pull_request: https://github.com/python/cpython/pull/28338 ___ Python tracker ___

[issue45196] macOS. ./configure --with-address-sanitizer; make test; cause test case crash.

2021-09-14 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +26750 pull_request: https://github.com/python/cpython/pull/28337 ___ Python tracker

[issue45196] macOS. ./configure --with-address-sanitizer; make test; cause test case crash.

2021-09-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset b668cdfa09e9bdfcfddaadd23dbd455d5f667383 by junyixie in branch 'main': bpo-45196: prevent unittest crash on address sanitizer builds (GH-28331) https://github.com/python/cpython/commit/b668cdfa09e9bdfcfddaadd23dbd455d5f667383 --

[issue45196] macOS. ./configure --with-address-sanitizer; make test; cause test case crash.

2021-09-14 Thread junyixie
junyixie added the comment: ignore test_decimal.py crash backtrace. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue45196] macOS. ./configure --with-address-sanitizer; make test; cause test case crash.

2021-09-14 Thread junyixie
Change by junyixie : -- keywords: +patch pull_requests: +26742 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28331 ___ Python tracker ___

[issue45196] macOS. ./configure --with-address-sanitizer; make test; cause test case crash.

2021-09-14 Thread junyixie
Change by junyixie : -- type: -> crash ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45196] macOS. ./configure --with-address-sanitizer; make test; cause test case crash.

2021-09-14 Thread junyixie
hub-cpython/Lib/unittest/case.py", line 730 in assertRaises File "/Users/xiejunyi/github-cpython/Lib/test/test_io.py", line 1558 in test_constructor File "/Users/xiejunyi/github-cpython/Lib/unittest/case.py", line 549 in _callTestMethod File "/Users/xiejunyi/github-c

[issue45177] Use shared test loader when possible when running test suite

2021-09-13 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > Also, TestLoader has mutable attribute "errors". I am not sure that it is > good idea to share it between unrelated tests. Noted. I'm closing this. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed

[issue45177] Use shared test loader when possible when running test suite

2021-09-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See issue45181. Most of this code is gone. Also, TestLoader has mutable attribute "errors". I am not sure that it is good idea to share it between unrelated tests. -- ___ Python tracker

[issue45177] Use shared test loader when possible when running test suite

2021-09-12 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- keywords: +patch pull_requests: +26715 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28301 ___ Python tracker

[issue45177] Use shared test loader when possible when running test suite

2021-09-12 Thread Erlend E. Aasland
: open title: Use shared test loader when possible when running test suite versions: Python 3.11 ___ Python tracker <https://bugs.python.org/issue45177> ___ ___ Python-bugs-list m

[issue23774] Test failures when unable to write to install location

2021-09-10 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> allow the testsuite to run in the installed location ___ Python tracker

[issue19113] duplicate test names in Lib/ctypes/test/test_functions.py

2021-09-08 Thread Łukasz Langa
Łukasz Langa added the comment: Change made in Python 3.11: duplicate test removed. Closing. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.11 -Python 2.7, Python 3.7, Python 3.8 _

[issue19113] duplicate test names in Lib/ctypes/test/test_functions.py

2021-09-08 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset a5610057615779ca6fc75d9e006d2fae644a94d3 by andrei kulakov in branch 'main': bpo-19113: Remove unused test_errors from ctypes tests (GH-28008) https://github.com/python/cpython/commit/a5610057615779ca6fc75d9e006d2fae644a94d3 -- nosy:

[issue27277] Test runner should try to increase stack size if it is too low

2021-09-07 Thread STINNER Victor
STINNER Victor added the comment: I just pushed a change to reduce the stack memory usage when deleting a chain of exceptions in bpo-44348. I consider that this issue is a duplicate. If it's not the case, please reopen the issue. commit fb305092a5d7894b41f122c1a1117b3abf4c567e

[issue34262] Asyncio test fails under Win 7

2021-09-07 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> [Windows] test_asyncio: Proactor test_sendfile_close_peer_in_the_middle_of_receiving failure ___ Python tracker

[issue34262] Asyncio test fails under Win 7

2021-09-07 Thread STINNER Victor
STINNER Victor added the comment: test_sendfile_close_peer_in_the_middle_of_receiving() failure is tracked by bpo-41682. -- ___ Python tracker ___

[issue34262] Asyncio test fails under Win 7

2021-09-07 Thread Irit Katriel
Irit Katriel added the comment: Changing type since the crash was fixed under issue23919. There remains (possibly) the failure of test_sendfile_close_peer_in_the_middle_of_receiving. -- nosy: +iritkatriel type: crash -> behavior ___ Python

[issue27277] Test runner should try to increase stack size if it is too low

2021-09-07 Thread Irit Katriel
Change by Irit Katriel : -- components: -Interpreter Core nosy: +iritkatriel, serhiy.storchaka title: Fatal Python error: Segmentation fault in test_exceptions -> Test runner should try to increase stack size if it is too low type: crash -> enhancement versions: +Python 3.11 -

[issue36674] "unittest.TestCase.debug" should honour "skip" (and other test controls)

2021-09-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are too many issues with TestResult.debug(). It does not call tearDown() and doCleanups() if the test is skipped, failed or raises other exception (including errors in cleanup). It does not support skipping decorators. It does not support

[issue35190] doc: collections.abc.Sequence cannot be used to test whether a class provides a particular interface

2021-09-02 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +easy title: collections.abc.Sequence cannot be used to test whether a class provides a particular interface (doc issue) -> doc: collections.abc.Sequence cannot be used to test whether a class provides a particular interface versions: +Pyt

[issue44895] refleak test failure in test_exceptions

2021-09-01 Thread STINNER Victor
Change by STINNER Victor : Added file: https://bugs.python.org/file50251/strict_refleak_check.patch ___ Python tracker ___ ___

[issue44895] refleak test failure in test_exceptions

2021-09-01 Thread Irit Katriel
Irit Katriel added the comment: I changed it to +for i in range(2): +dash_R_cleanup(fs, ps, pic, zdc, abcs) +support.gc_collect() (loop twice instead of 3 times) and that seems fine too. -- ___ Python tracker

[issue44895] refleak test failure in test_exceptions

2021-09-01 Thread STINNER Victor
STINNER Victor added the comment: > (once I remove the @skip on test_no_hang_on_context_chain_cycle2). Oh. I forgot that the test is still skipped! > With your patch I don't see a leak for refleak.py, but I still see one for > ./python.exe -m test -R 3:3 test_exce

[issue44895] refleak test failure in test_exceptions

2021-09-01 Thread Irit Katriel
Irit Katriel added the comment: With your patch I don't see a leak for refleak.py, but I still see one for ./python.exe -m test -R 3:3 test_exceptions -m test_no_hang_on_context_chain_cycle2 -m test_recursion_normalizing_infinite_exception -m test_recursion_in_except_handler -m

[issue44895] refleak test failure in test_exceptions

2021-09-01 Thread STINNER Victor
STINNER Victor added the comment: New changeset 679cb4781ea370c3b3ce40d3334dc404d7e9d92b by Victor Stinner in branch 'main': bpo-44895: libregrtest: refleak check clears types later (GH-28113) https://github.com/python/cpython/commit/679cb4781ea370c3b3ce40d3334dc404d7e9d92b --

[issue44895] refleak test failure in test_exceptions

2021-09-01 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +26554 pull_request: https://github.com/python/cpython/pull/28113 ___ Python tracker ___

[issue44895] refleak test failure in test_exceptions

2021-09-01 Thread STINNER Victor
STINNER Victor added the comment: > I changed dash_R_cleanup to put the sys._clear_type_cache() after > clear_caches() and the leak is gone Aha! The order of function calls in dash_R_cleanup() matters. Calling sys._clear_type_cache() at the end of dash_R_cleanup() perfectly makes sense.

[issue44895] refleak test failure in test_exceptions

2021-08-31 Thread Irit Katriel
happen when we define the exception classes (A and B) inside the test function. So maybe the type objects of these exceptions are not cleared from the type cache because they have refcount > 0 but by the time clear_caches() and gc.collect() finish they are cleared? Note this doesn't m

[issue44895] refleak test failure in test_exceptions

2021-08-31 Thread STINNER Victor
STINNER Victor added the comment: > It could be a problem with the way _Py_RefTotal is incremented/decremented. It can be a cache which is kept alive and then clear the following iteration. See my previous comment: test leaked [-4, 4, -4, 4, -4, 4, -4, 4, -4, 4, -4, 4, -4, 4, -4, 4, -4

[issue24981] Add a test which uses the ast module to compile the stdlib

2021-08-31 Thread Irit Katriel
Irit Katriel added the comment: I think there is something like this here: https://github.com/python/cpython/blob/22fe0eb13c3441b71b60aaea0e7fe289a29783da/Lib/test/test_ast.py#L1498 -- nosy: +iritkatriel ___ Python tracker <ht

[issue44895] refleak test failure in test_exceptions

2021-08-31 Thread Irit Katriel
Irit Katriel added the comment: Victor - I am also getting a feeling that this may not be a real leak but rather a bug in the refleaks test bookkeeping. It could be a problem with the way _Py_RefTotal is incremented/decremented. -- ___ Python

[issue44895] refleak test failure in test_exceptions

2021-08-31 Thread STINNER Victor
STINNER Victor added the comment: A variant of this problem: bpo-36560 with a leak 1 memory block per iteration. -- ___ Python tracker ___

[issue44895] refleak test failure in test_exceptions

2021-08-30 Thread Irit Katriel
Irit Katriel added the comment: I think the leak happens when we invoke GC while the recursion limit is exceeded. It goes way if make this change: def recurse_in_body_and_except(): try: recurse_in_body_and_except() except RecursionError as e:

[issue41620] Python Unittest does not return results object when the test is skipped

2021-08-30 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks for the report and initial patch, Iman! ✨  ✨ And thanks Serhiy for pushing this across the finish line. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue41620] Python Unittest does not return results object when the test is skipped

2021-08-30 Thread miss-islington
miss-islington added the comment: New changeset 243b8de0b15061704581974c0a27db1232a43b93 by Miss Islington (bot) in branch '3.10': bpo-41620: TestCase.run() now always return a TestResult instance (GH-28030) https://github.com/python/cpython/commit/243b8de0b15061704581974c0a27db1232a43b93

[issue41620] Python Unittest does not return results object when the test is skipped

2021-08-30 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 0c5e0aa73f6f70d16d21ad9e1eb2d0fe3a334f0a by Miss Islington (bot) in branch '3.9': bpo-41620: TestCase.run() now always return a TestResult instance (GH-28030) (GH-28065)

[issue41620] Python Unittest does not return results object when the test is skipped

2021-08-30 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 8.0 -> 9.0 pull_requests: +26508 pull_request: https://github.com/python/cpython/pull/28064 ___ Python tracker

[issue41620] Python Unittest does not return results object when the test is skipped

2021-08-30 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 7e246a3a7b43762480ee4fe0cfb859e8e997a8c8 by Serhiy Storchaka in branch 'main': bpo-41620: TestCase.run() now always return a TestResult instance (GH-28030) https://github.com/python/cpython/commit/7e246a3a7b43762480ee4fe0cfb859e8e997a8c8

[issue41620] Python Unittest does not return results object when the test is skipped

2021-08-30 Thread miss-islington
Change by miss-islington : -- pull_requests: +26509 pull_request: https://github.com/python/cpython/pull/28065 ___ Python tracker ___

[issue36674] "unittest.TestCase.debug" should honour "skip" (and other test controls)

2021-08-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See issue41620 for run() returning None. -- dependencies: +Python Unittest does not return results object when the test is skipped nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue36

[issue36674] "unittest.TestCase.debug" should honour "skip" (and other test controls)

2021-08-29 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: -14706 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41620] Python Unittest does not return results object when the test is skipped

2021-08-29 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +26475 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/28030 ___ Python tracker <https://bugs.python.org/issu

[issue44998] macOS build test failure

2021-08-27 Thread Terry J. Reedy
Change by Terry J. Reedy : -- components: +macOS nosy: +ned.deily, ronaldoussoren title: tests failed -> macOS build test failure ___ Python tracker <https://bugs.python.org/issu

[issue19113] duplicate test names in Lib/ctypes/test/test_functions.py

2021-08-27 Thread Andrei Kulakov
Change by Andrei Kulakov : -- keywords: +patch nosy: +andrei.avk nosy_count: 8.0 -> 9.0 pull_requests: +26450 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/28008 ___ Python tracker

[issue41322] unittest: deprecate test methods returning non-None values

2021-08-22 Thread Łukasz Langa
Łukasz Langa added the comment: This can be re-closed. Deprecation warnings raised by the test suite are being fixed in BPO-44980 which already has an open pull request. -- resolution: -> fixed stage: patch review -> resolved status: open -&g

[issue41322] unittest: deprecate test methods returning non-None values

2021-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b1db308c6114bb18c06656c94c0ffa73ba954977 by andrei kulakov in branch 'main': bpo-41322: Add unit tests for deprecation of test return values (GH-27846) https://github.com/python/cpython/commit/b1db308c6114bb18c06656c94c0ffa73ba954977

[issue41620] Python Unittest does not return results object when the test is skipped

2021-08-22 Thread Serhiy Storchaka
ests and a NEWS entry. You can use tests added in issue44955 as an example. -- components: +Library (Lib) nosy: +serhiy.storchaka stage: -> test needed type: -> behavior versions: +Python 3.10, Python 3.9 ___ Python tracker

[issue41322] unittest: deprecate test methods returning non-None values

2021-08-21 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Deprecation warnings are not on by default in tests. You can pass -Wall while running tests to turn on all warnings. ./python -Wall -m test test_capi 0:00:00 load avg: 2.46 Run tests sequentially 0:00:00 load avg: 2.46 [1/1] test_capi /home

[issue41322] unittest: deprecate test methods returning non-None values

2021-08-21 Thread Andrei Kulakov
Andrei Kulakov added the comment: I should just add that none of the these tests are actually a problem, i.e. they all do run properly and not running duplicate times (except that I'm not sure about the 2 distutils tests, but that shouldn't matter much as distutils is deprecated and up for

[issue41322] unittest: deprecate test methods returning non-None values

2021-08-21 Thread Andrei Kulakov
, but they didn't trigger the deprecation when running a test PR I made yesterday here: https://github.com/python/cpython/pull/27869/checks?check_run_id=3387700689 -- ___ Python tracker <https://bugs.python.org/issue41

[issue41322] unittest: deprecate test methods returning non-None values

2021-08-21 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: There are few deprecation warnings in other tests : 0:00:05 load avg: 3.20 [ 52/428] test_code passed /home/karthikeyan/stuff/python/cpython/Lib/unittest/case.py:550: DeprecationWarning: It is deprecated to return a value!=None from a test case

[issue41322] unittest: deprecate test methods returning non-None values

2021-08-20 Thread Ryan Mast (nightlark)
Ryan Mast (nightlark) added the comment: The new issue for the failing test is bpo-44968 -- ___ Python tracker <https://bugs.python.org/issue41322> ___ ___ Pytho

[issue41322] unittest: deprecate test methods returning non-None values

2021-08-20 Thread Ryan Mast (nightlark)
Ryan Mast (nightlark) added the comment: Sure, I'll open a new issue. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue41322] unittest: deprecate test methods returning non-None values

2021-08-20 Thread Andrei Kulakov
Andrei Kulakov added the comment: The test was refactored in this commit: https://github.com/python/cpython/commit/658103f84ea860888f8dab9615281ea64fee31b9 the refactoring moved yield statement from inner func into the test. That was 8 years ago so it hasn't worked since then, and since

[issue41322] unittest: deprecate test methods returning non-None values

2021-08-20 Thread Andrei Kulakov
Andrei Kulakov added the comment: Yes, it seems like this deprecation detected a broken test that wasn't running. If I add a `raise` statement to it and rerun the test, it still passes on my local system: ./python.exe -m unittest -v

[issue41322] unittest: deprecate test methods returning non-None values

2021-08-20 Thread Ryan Mast (nightlark)
Ryan Mast (nightlark) added the comment: Would rewriting the test so that it doesn't yield be the right fix? ``` def test_subprocess_wait_no_same_group(self): # start the new process in a new session connect = self.loop.subprocess_shell

[issue41322] unittest: deprecate test methods returning non-None values

2021-08-20 Thread Andrei Kulakov
Andrei Kulakov added the comment: That test does have a yield statement in it, and does cause the deprecation warning to fire off. I'm looking into it.. -- ___ Python tracker <https://bugs.python.org/issue41

[issue41322] unittest: deprecate test methods returning non-None values

2021-08-20 Thread Ryan Mast (nightlark)
Ryan Mast (nightlark) added the comment: It looks like since GH-27748 got merged, `test_subprocess_wait_no_same_group` in `test_asyncio` has been failing for the Ubuntu SSL tests. -- nosy: +rmast ___ Python tracker

Re: some problems for an introductory python test

2021-08-20 Thread Hope Rouselle
Dennis Lee Bieber writes: > On Sun, 15 Aug 2021 00:15:58 -0300, Hope Rouselle > declaimed the following: > > Giganews seems to have just vomited up three days worth of traffic... > >>Dennis Lee Bieber writes: >> >>> >>> Granted, the fact that the Amiga used a shared common address

[issue44960] Add regression test for geometric_mean

2021-08-20 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue44960] Add regression test for geometric_mean

2021-08-20 Thread Irit Katriel
Irit Katriel added the comment: New changeset f5d7a8d29c49ad47254fa098abb7a510e5e7b45e by Irit Katriel in branch 'main': bpo-44960: add regression test for geometric_mean with mixed int/floa… (#27856) https://github.com/python/cpython/commit/f5d7a8d29c49ad47254fa098abb7a510e5e7b45e

[issue44960] Add regression test for geometric_mean

2021-08-20 Thread Irit Katriel
Change by Irit Katriel : -- title: Add regression test for geometric test -> Add regression test for geometric_mean ___ Python tracker <https://bugs.python.org/issu

[issue44960] Add regression test for geometric test

2021-08-20 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch pull_requests: +26315 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27856 ___ Python tracker ___

[issue44960] Add regression test for geometric test

2021-08-20 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44960] Add regression test for geometric test

2021-08-20 Thread Steven D'Aprano
New submission from Steven D'Aprano : Hi Irit, thanks for looking at #28327. Sorry to be That Guy who can't do it himself, but I'm still stuck with old tech and ignorance about the git way of doing things, which limits my ability to do PRs :-( Would you be willing to add a regression test

[issue41322] unittest: deprecate test methods returning non-None values

2021-08-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Every new feature should be documented and covered by tests (unless it is very trivial or it is very difficult to write a test for it). -- ___ Python tracker <https://bugs.python.org/issue41

[issue41322] unittest: deprecate test methods returning non-None values

2021-08-19 Thread Andrei Kulakov
Change by Andrei Kulakov : -- pull_requests: +26308 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/27846 ___ Python tracker <https://bugs.python.org/issu

Re: some problems for an introductory python test

2021-08-19 Thread Hope Rouselle
Chris Angelico writes: > On Tue, Aug 17, 2021 at 3:51 AM Hope Rouselle > wrote: >> >> Chris Angelico writes: >> >> Wow, I kinda feel the same as you here. I think this justifies >> >> perhaps >> >> using a hardware solution. (Crazy idea?! Lol.) >> > >> > uhhh Yes. Very crazy idea.

[issue41322] unittest: deprecate test methods returning non-None values

2021-08-19 Thread Andrei Kulakov
Andrei Kulakov added the comment: I will add the test in the next 1-2 days, I should have asked if it's needed in this case.. -- ___ Python tracker <https://bugs.python.org/issue41

[issue41322] unittest: deprecate test methods returning non-None values

2021-08-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +andrei.avk, defreng, ezio.melotti, michael.foord, rbcollins, terry.reedy, xtreak, zach.ware ___ Python tracker ___

[issue41322] unittest: deprecate test methods returning non-None values

2021-08-19 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +lukasz.langa, serhiy.storchaka -fdrake, stefan, terry.reedy versions: +Python 3.11 -Python 3.7 ___ Python tracker ___

[issue41322] unittest: deprecate test methods returning non-None values

2021-08-19 Thread santhosh
Change by santhosh : -- nosy: +fdrake, stefan, terry.reedy versions: +Python 3.7 -Python 3.8 ___ Python tracker ___ ___

[issue41322] unittest: deprecate test methods returning non-None values

2021-08-19 Thread santhosh
santhosh added the comment: def split_module_names(module): unnamed, named = set(), set() for name in dir(module): if not name.startswith('_'): attr = getattr(module, name) try: if hasattr(attr, '__name__'):

[issue41322] unittest: deprecate test methods returning non-None values

2021-08-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Tests are needed. -- resolution: fixed -> stage: resolved -> test needed status: closed -> open ___ Python tracker <https://bugs.python.or

[issue44914] tp_version_tag is not unique when test runs with -R :

2021-08-19 Thread Ken Jin
Ken Jin added the comment: I just realised I'm slightly wrong about identity checks -- there is a very very small chance where if the type object occupies the same address and the attribute is in a dynamically allocated __dict__ (and not some static slot), we can trick the checks and a

[issue41322] unittest: deprecate test methods returning non-None values

2021-08-19 Thread Łukasz Langa
Change by Łukasz Langa : -- versions: +Python 3.11 -Python 3.10 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue41322] unittest: deprecate test methods returning non-None values

2021-08-19 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks for reporting, Alexander, and Andrei for the patch! ✨  ✨ -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue41322] unittest: deprecate test methods returning non-None values

2021-08-19 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 3db42fc5aca320b0cac1895bc3cb731235ede794 by andrei kulakov in branch 'main': bpo-41322: added deprecation warning for tests returning value!=None (GH-27748) https://github.com/python/cpython/commit/3db42fc5aca320b0cac1895bc3cb731235ede794

[issue44895] refleak test failure in test_exceptions

2021-08-18 Thread STINNER Victor
STINNER Victor added the comment: You can also play with the clear() method of frame objects and traceback.clear_frames() (which expects a traceback object). -- ___ Python tracker

[issue44895] refleak test failure in test_exceptions

2021-08-18 Thread STINNER Victor
STINNER Victor added the comment: > test leaked [-4, 4, -4] references, sum=-4 If I disable the GC, the script no longer detects "leaks". Same using a GC threshold of 800. Using a GC threshold between 100 and 700, I reproduce the [-4, 4, -4] references lea

[issue44895] refleak test failure in test_exceptions

2021-08-18 Thread STINNER Victor
the leak? To make the issue more likely, you can change check_rc_deltas() in Lib/test/libregrtest/refleak.py. Try: def check_rc_deltas(deltas): return any(delta >= 1 for delta in deltas) With this change, the script stops immediately: test leaked [-4, 4, -4] references, sum=-4 t

[issue44852] Add ability to wholesale silence DeprecationWarnings while running the test suite

2021-08-18 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset ebe7e6d86cf8f54d449d49866698d7f4c700cc7c by Miss Islington (bot) in branch '3.9': bpo-44852: Support filtering over warnings without a set message (GH-27793) (GH-27810)

[issue44852] Add ability to wholesale silence DeprecationWarnings while running the test suite

2021-08-18 Thread miss-islington
miss-islington added the comment: New changeset d1c0e4413dd544270df1f5b8a145fd4370cb759b by Miss Islington (bot) in branch '3.10': bpo-44852: Support filtering over warnings without a set message (GH-27793) https://github.com/python/cpython/commit/d1c0e4413dd544270df1f5b8a145fd4370cb759b

[issue44852] Add ability to wholesale silence DeprecationWarnings while running the test suite

2021-08-18 Thread miss-islington
Change by miss-islington : -- pull_requests: +26277 pull_request: https://github.com/python/cpython/pull/27810 ___ Python tracker ___

[issue44852] Add ability to wholesale silence DeprecationWarnings while running the test suite

2021-08-18 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +26276 pull_request: https://github.com/python/cpython/pull/27809 ___ Python tracker

[issue44852] Add ability to wholesale silence DeprecationWarnings while running the test suite

2021-08-18 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 8cf07d3db3eed02b43350a5f9dbf68f1c839ea82 by Łukasz Langa in branch 'main': bpo-44852: Support filtering over warnings without a set message (GH-27793) https://github.com/python/cpython/commit/8cf07d3db3eed02b43350a5f9dbf68f1c839ea82 --

[issue44895] refleak test failure in test_exceptions

2021-08-17 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: There is some timing-related race condition at hand because I tried in a Linux machine and a MacBook Pro (intel) laptop and I wasn't able to reproduce after 20 min of the script running :( -- ___ Python

[issue44895] refleak test failure in test_exceptions

2021-08-17 Thread Irit Katriel
- 3 -- beginning 6 repetitions 123456 .. test leaked [2, 4, 2] references, sum=8 test leaked [2, 4, 2] memory blocks, sum=8 -- ___ Python tracker <https://bugs.python.org/issu

[issue44895] refleak test failure in test_exceptions

2021-08-17 Thread Irit Katriel
Irit Katriel added the comment: I'm using a mac. It typically fails within at most 10-20 iterations. -- ___ Python tracker ___ ___

[issue44895] refleak test failure in test_exceptions

2021-08-17 Thread Mark Shannon
Mark Shannon added the comment: refleak.py seems to run forever for me. Got bored after 6000 iterations. Which O/S and configure options are needed for refleak.py to fail? -- ___ Python tracker

[issue44895] refleak test failure in test_exceptions

2021-08-17 Thread Irit Katriel
Irit Katriel added the comment: This doesn't leak: try: raise B() except B: tb = sys.exc_info()[1].__traceback__ So this isn't about the traceback being part of the cycle. The B() needs to be there too. --

[issue44895] refleak test failure in test_exceptions

2021-08-17 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > But this makes it not leak again, so now we know it's the traceback: The traceback is a very heavy gc object because it contains the frames, and in the locals of the frame is the traceback itself via the exception. This is a well known heavy cycle,

<    2   3   4   5   6   7   8   9   10   11   >