[issue44808] test_inspect fails in refleak mode

2021-08-03 Thread miss-islington
miss-islington added the comment: New changeset bc2841c7a9fe2b05ef77ebdf77701188dc83b2ce by Miss Islington (bot) in branch '3.10': bpo-44808: fixes test for interactive inspect getsource of a class (GH-27571) https://github.com/python/cpython/commit/bc2841c7a9fe2b05ef77ebdf77701188dc83b2ce

[issue44808] test_inspect fails in refleak mode

2021-08-03 Thread Łukasz Langa
Change by Łukasz Langa : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ P

[issue44808] test_inspect fails in refleak mode

2021-08-03 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 58325971de0faf330c9c38269dae8315a0746e59 by andrei kulakov in branch 'main': bpo-44808: fixes test for interactive inspect getsource of a class (GH-27571) https://github.com/python/cpython/commit/58325971de0faf330c9c38269dae8315a0746e59 -

[issue44808] test_inspect fails in refleak mode

2021-08-03 Thread miss-islington
Change by miss-islington : -- pull_requests: +26084 pull_request: https://github.com/python/cpython/pull/27578 ___ Python tracker ___ __

[issue44808] test_inspect fails in refleak mode

2021-08-02 Thread Andrei Kulakov
Andrei Kulakov added the comment: Please disregard my last comment, I think I found a good way to fix it, the PR is up here: https://github.com/python/cpython/pull/27571/files -- ___ Python tracker

[issue44808] test_inspect fails in refleak mode

2021-08-02 Thread Andrei Kulakov
Change by Andrei Kulakov : -- pull_requests: +26078 pull_request: https://github.com/python/cpython/pull/27571 ___ Python tracker ___ __

[issue44808] test_inspect fails in refleak mode

2021-08-02 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- priority: release blocker -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue44808] test_inspect fails in refleak mode

2021-08-02 Thread Andrei Kulakov
Andrei Kulakov added the comment: I've been looking into avoiding global modification of modules['__main__'], the options are: 1. remove the test and leave it at that 2. remove the test and open a new issue for re-adding a test ; and look for a way to do it safely 3. create a temp scrip

[issue44808] test_inspect fails in refleak mode

2021-08-02 Thread miss-islington
miss-islington added the comment: New changeset a1eaa74d9dcd973ec278cefc22aac7f514faee4b by Miss Islington (bot) in branch '3.10': bpo-44808: Fix test_inspect in refleak mode (GH-27544) https://github.com/python/cpython/commit/a1eaa74d9dcd973ec278cefc22aac7f514faee4b -- ___

[issue44808] test_inspect fails in refleak mode

2021-08-02 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +26055 pull_request: https://github.com/python/cpython/pull/27546 ___ Python tracker _

[issue44808] test_inspect fails in refleak mode

2021-08-02 Thread Andrei Kulakov
Andrei Kulakov added the comment: Pablo: thanks for investigating and fixing this, I will look for examples of changing or patching sys.modules in the testsuite to see how to avoid global effects. I think we can keep this issue open for the follow-up discussion / fix? -- nosy: +andre

[issue44808] test_inspect fails in refleak mode

2021-08-02 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 626d397cc1612ea5eef153dd910834c2ee00ddbd by Pablo Galindo Salgado in branch 'main': bpo-44808: Fix test_inspect in refleak mode (GH-27544) https://github.com/python/cpython/commit/626d397cc1612ea5eef153dd910834c2ee00ddbd -- _

[issue44808] test_inspect fails in refleak mode

2021-08-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: With PR 27544: ❯ ./python.exe -m test test_inspect -R : 0:00:00 load avg: 2.91 Run tests sequentially 0:00:00 load avg: 2.91 [1/1] test_inspect beginning 9 repetitions 123456789 . == Tests result: SUCCESS == 1 test OK. Total duration: 13.7 sec

[issue44808] test_inspect fails in refleak mode

2021-08-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: PR 27544 just addresses the main problem, but I still have concerns about the test affecting sys.modules directly, making it dangerous to run in parallel. -- ___ Python tracker

[issue44808] test_inspect fails in refleak mode

2021-08-02 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +26053 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27544 ___ Python tracker __

[issue44808] test_inspect fails in refleak mode

2021-08-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Ah, the problem is that: mod.ParrotDroppings.__module__ = mod is wrong: `__module__` must be a string, not a module object -- ___ Python tracker ___

[issue44808] test_inspect fails in refleak mode

2021-08-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: >From f468ede4a2b7ab5c72ae85ab04cb56904300cd23: This code looks quite dangerous: class TestGetsourceInteractive(unittest.TestCase): def tearDown(self): mod.ParrotDroppings.__module__ = mod sys.modules['__main__'] = self.main That i

[issue44808] test_inspect fails in refleak mode

2021-08-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Check for instance the logs in https://buildbot.python.org/all/#/builders/679/builds/92/steps/5/logs/stdio -- ___ Python tracker ___

[issue44808] test_inspect fails in refleak mode

2021-08-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: The reason buildbots have not catched this is because the re-run login seems to not detect the problem on the second run: ./python.exe -m test test_inspect -j 1 -u all -W --slowest --fail-env-changed --timeout=11700 -R 3:3 -u-cpu -w WARNING: Disable

[issue44808] test_inspect fails in refleak mode

2021-08-02 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +lukasz.langa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue44808] test_inspect fails in refleak mode

2021-08-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: f468ede4a2b7ab5c72ae85ab04cb56904300cd23 is the first bad commit commit f468ede4a2b7ab5c72ae85ab04cb56904300cd23 Author: Miss Islington (bot) <31488909+miss-isling...@users.noreply.github.com> Date: Fri Jul 30 10:46:42 2021 -0700 bpo-44648: Fix er

[issue44808] test_inspect fails in refleak mode

2021-08-02 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- priority: normal -> release blocker ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue44808] test_inspect fails in refleak mode

2021-08-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I'm bisecting -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue44808] test_inspect fails in refleak mode

2021-08-02 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : >From https://bugs.python.org/issue44206 : File "/home/mark/repos/cpython/Lib/inspect.py", line 1154, in walktree classes.sort(key=attrgetter('__module__', '__name__')) ^^ TypeError: '<' no