[issue44895] refleak test failure in test_exceptions

2021-08-17 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I am still amazed that I cannot reproduce the leaks on my machine. Maybe I am missing some steps. Could you outline how are you reproducing the leaks? -- ___ Python tracker

[issue44895] refleak test failure in test_exceptions

2021-08-17 Thread Irit Katriel
Irit Katriel added the comment: But this makes it not leak again, so now we know it's the traceback: try: raise B() except B: b = sys.exc_info()[1] b.__traceback__ = None -- ___ Python tracker

[issue44895] refleak test failure in test_exceptions

2021-08-17 Thread Irit Katriel
Irit Katriel added the comment: It's probably not that because this leaks too, and it skips the cleanup: try: raise B() except B: b = sys.exc_info()[1] -- ___ Python tracker

[issue44895] refleak test failure in test_exceptions

2021-08-17 Thread Guido van Rossum
Guido van Rossum added the comment: So there's code generated for an except clause with a variable that clears the variable at the end, so that this works: try: ... except Exception as err: ... print(err) # Should fail, since err was cleared when the except clause exited. Maybe there's

[issue44895] refleak test failure in test_exceptions

2021-08-17 Thread Irit Katriel
Irit Katriel added the comment: I'm pretty sure the frame locals is involved. This leaks (not a is being re-raised, not b): - def test_no_hang_on_context_chain_cycle2(): class A(Exception): pass class B(Exception): pass try: try: raise

[issue44895] refleak test failure in test_exceptions

2021-08-17 Thread Irit Katriel
Change by Irit Katriel : -- Removed message: https://bugs.python.org/msg399763 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue44895] refleak test failure in test_exceptions

2021-08-17 Thread Irit Katriel
Irit Katriel added the comment: I'm pretty sure the frame locals is involved. This leaks (note that a is being re-raised, not b): - def test_no_hang_on_context_chain_cycle2(): class A(Exception): pass class B(Exception): pass try: try:

[issue44895] refleak test failure in test_exceptions

2021-08-17 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset c2c857b40f226575d64e0d56a759cbd799f51e62 by Dong-hee Na in branch 'main': bpo-44895: Introduce PYTHONDUMPREFSFILE variable for refcount dumping (GH-27767) https://github.com/python/cpython/commit/c2c857b40f226575d64e0d56a759cbd799f51e62

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

2021-08-17 Thread Łukasz Langa
Change by Łukasz Langa : -- pull_requests: +26262 pull_request: https://github.com/python/cpython/pull/27793 ___ Python tracker ___

[issue44895] refleak test failure in test_exceptions

2021-08-17 Thread Irit Katriel
Irit Katriel added the comment: But if I also add a gc loop at the beginning of test_recursion_in_except_handler, the leak goes away. def test_recursion_in_except_handler(): while gc.collect(): pass def set_relative_recursion_limit(n): ... So maybe

[issue44895] refleak test failure in test_exceptions

2021-08-17 Thread Irit Katriel
gc_collect in Lib/test/support/__init__.py (which is called by the refleak check) to loop until gc.collect() returns 0 (currently it calls gc.collect() 3 times). Still leaks. -- ___ Python tracker <https://bugs.python.org/issue44

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

2021-08-17 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > But it also does identity (pointer) comparison of type/class object Good point! Even if I wrote that code I forgot about all the guards that were needed for correctness. I now remember all the weird cases we discovered there :) --

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

2021-08-17 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset bc98f981326d7cb30f939dedd04b91f378255d88 by Łukasz Langa in branch '3.10': [3.10] bpo-44852: Support ignoring specific DeprecationWarnings wholesale in regrtest (GH-27634) (GH-27784)

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

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

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

2021-08-17 Thread Ken Jin
Ken Jin added the comment: @Pablo yup the 3.10 opcache used tp_version_tag. But it also does identity (pointer) comparison of type/class object https://github.com/python/cpython/blob/3.10/Python/ceval.c#L3432. Which is why it doesn't fail. I created this issue because we don't do type

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

2021-08-17 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: The opcode cache for load attribute in 3.10 uses the tp_version_tag so unless I am missing something we can fall into the same problem, no? -- ___ Python tracker

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

2021-08-17 Thread Ken Jin
Ken Jin added the comment: Thanks Mark and Victor for the patch and reviews! This issue also affects 3.10, but IMO we don't need to backport this as we don't have other code relying on this invariant in that version, so it won't affect anything there. If you feel otherwise, please let me

Re: some problems for an introductory python test

2021-08-16 Thread Dennis Lee Bieber
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 space for >> all running applications

[issue44895] refleak test failure in test_exceptions

2021-08-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: >> x = list(range(100)) Is creating a lot of objects, and the gc has a chance to run on every object creation so maybe what's happening there is that you are inadvertently triggering the gc -- ___ Python

[issue44895] refleak test failure in test_exceptions

2021-08-16 Thread Irit Katriel
Irit Katriel added the comment: It's midnight, so just one last weirdness before I turn into a pumpkin: If I add this assignment to x the issue seems to go away (or become less frequent so I don't see it?) But if I assign x to a small constant it still leaks. def

[issue44895] refleak test failure in test_exceptions

2021-08-16 Thread Irit Katriel
Irit Katriel added the comment: I meant refleaks.py, not reflinks.py. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue44895] refleak test failure in test_exceptions

2021-08-16 Thread Irit Katriel
Irit Katriel added the comment: I've reproduced the leak in 3.10 (with the reflinks.py script). In 3.9 the double-recursion segfaults: Fatal Python error: _Py_CheckRecursiveCall: Cannot recover from stack overflow. Python runtime state: initialized -- versions: +Python 3.10

[issue44895] refleak test failure in test_exceptions

2021-08-16 Thread Irit Katriel
Irit Katriel added the comment: (Pdb) test_no_hang_on_context_chain_cycle2.__code__.co_consts[1] (Pdb) sys.getrefcount(test_no_hang_on_context_chain_cycle2.__code__.co_consts[1]) 2 (Pdb) gc.get_referrers(test_no_hang_on_context_chain_cycle2.__code__.co_consts[1]) [] --

[issue44895] refleak test failure in test_exceptions

2021-08-16 Thread Irit Katriel
Irit Katriel added the comment: The leak seems to be due to the nested definitions of the Exception types A and B. It goes away if I move them out of the function so that it's like: class A(Exception): pass class B(Exception): pass def test_no_hang_on_context_chain_cycle2():

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

2021-08-16 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset c7c4cbc58e18ef5a6f4f377b1ece0a84a54335a7 by Łukasz Langa in branch '3.9': [3.9] bpo-44852: Support ignoring specific DeprecationWarnings wholesale in regrtest (GH-27634) (GH-27785)

[issue44895] refleak test failure in test_exceptions

2021-08-16 Thread Irit Katriel
Irit Katriel added the comment: I've attached an even shorter script (refleak.py) that reproduces the leak. -- Added file: https://bugs.python.org/file50224/refleak.py ___ Python tracker

Re: some problems for an introductory python test

2021-08-16 Thread Abhiram R
in Python! Happy to provide more tips wrt this if required. Regards Abhi R <http://abhiramr.com> On Tue, Aug 10, 2021 at 2:56 AM Hope Rouselle wrote: > I'm looking for questions to put on a test for students who never had > any experience with programming, but have learned to

Re: some problems for an introductory python test

2021-08-16 Thread Chris Angelico
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. Can't imagine why anyone would ever > >

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

2021-08-16 Thread Mark Shannon
Mark Shannon added the comment: New changeset d84d2c4985457733602d46dc4ee77290da4e9539 by Ken Jin in branch 'main': bpo-44914: Add tests for some invariants of tp_version_tag (GH-27774) https://github.com/python/cpython/commit/d84d2c4985457733602d46dc4ee77290da4e9539 --

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

2021-08-16 Thread Łukasz Langa
Change by Łukasz Langa : -- pull_requests: +26254 pull_request: https://github.com/python/cpython/pull/27785 ___ Python tracker ___

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

2021-08-16 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset a0a6d39295a30434b088f4b66439bf5ea21a3e4e by Łukasz Langa in branch 'main': bpo-44852: Support ignoring specific DeprecationWarnings wholesale in regrtest (GH-27634) https://github.com/python/cpython/commit/a0a6d39295a30434b088f4b66439bf5ea21a3e4e

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

2021-08-16 Thread Łukasz Langa
Change by Łukasz Langa : -- pull_requests: +26253 pull_request: https://github.com/python/cpython/pull/27784 ___ Python tracker ___

Re: some problems for an introductory python test

2021-08-16 Thread Hope Rouselle
Grant Edwards writes: > On 2021-08-12, Hope Rouselle wrote: > >>> OS/2 had all kinds of amazing features (for its time). [...] Plus, >>> it had this fancy concept of "extended attributes"; on older >>> systems (like MS-DOS's "FAT" family), a file might be Read-Only, >>> Hidden, a System file,

Re: some problems for an introductory python test

2021-08-16 Thread Hope Rouselle
Hope Rouselle writes: [...] >> Granted you may have to restrict some features if [...] > > To let students use the entire language feels a bit weird in the sense > that the group goes in so many different directions. It definitely put > teachers in a position they have to be --- I don't know

Re: some problems for an introductory python test

2021-08-16 Thread Hope Rouselle
Chris Angelico writes: > On Fri, Aug 13, 2021 at 2:15 AM Hope Rouselle wrote: >> >> Chris Angelico writes: >> >> > History lesson! >> > >> > Once upon a time, IBM and Microsoft looked at what Intel was >> > producing, and went, hey, we need to design an operating system that >> > can take

Re: some problems for an introductory python test

2021-08-16 Thread Hope Rouselle
Dennis Lee Bieber writes: > On Wed, 11 Aug 2021 09:27:38 -0300, Hope Rouselle > declaimed the following: >> >>I wouldn't. This is all Python-stuff. The course chooses a language >>like Python, but it is not trying to teach Python --- it is trying to >>teach computer programming, that is,

Re: some problems for an introductory python test

2021-08-16 Thread Hope Rouselle
Chris Angelico writes: > On Thu, Aug 12, 2021 at 9:23 AM Dennis Lee Bieber > wrote: [...] >> I was spoiled by the Amiga variant of REXX. Most current >> implementations (well, Regina is the only one I've looked at) can just pass >> command to the default shell. The Amiga version took

Re: some problems for an introductory python test

2021-08-16 Thread Hope Rouselle
Dennis Lee Bieber writes: > On Thu, 12 Aug 2021 06:15:28 +1000, Chris Angelico > declaimed the following: > >>The default command interpreter and shell on OS/2 was fairly primitive >>by today's standards, and was highly compatible with the MS-DOS one, >>but it also had the ability to run REXX

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

2021-08-16 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +26251 pull_request: https://github.com/python/cpython/pull/27774 ___ Python tracker ___ ___

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

2021-08-16 Thread Mark Shannon
Mark Shannon added the comment: New changeset 1a511dc92dd10ee8fc2e5da9f52f795924bdc89a by Mark Shannon in branch 'main': bpo-44914: Maintain invariants of type version tags. (GH-27773) https://github.com/python/cpython/commit/1a511dc92dd10ee8fc2e5da9f52f795924bdc89a --

[issue44895] refleak test failure in test_exceptions

2021-08-16 Thread miss-islington
miss-islington added the comment: New changeset 1960409a6dcbd1e3527f02b523bd27df9086dd77 by Miss Islington (bot) in branch '3.10': bpo-44895: skip test_no_hang_on_context_chain_cycle2 until the refleak is fixed (GH-27761)

[issue44895] refleak test failure in test_exceptions

2021-08-16 Thread miss-islington
Change by miss-islington : -- pull_requests: +26250 pull_request: https://github.com/python/cpython/pull/27778 ___ Python tracker ___

[issue44895] refleak test failure in test_exceptions

2021-08-16 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 62bc716fde20fcb7b47416c7959be9e66df93212 by Irit Katriel in branch 'main': bpo-44895: skip test_no_hang_on_context_chain_cycle2 until the refleak is fixed (GH-27761)

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

2021-08-15 Thread Mark Shannon
Mark Shannon added the comment: PyType_ClearCache() is documented as: Clear the internal lookup cache. Return the current version tag. Modifying it to do what it is documented to do fixes this bug :) -- ___ Python tracker

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

2021-08-15 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +26247 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27773 ___ Python tracker ___

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

2021-08-15 Thread Ken Jin
/6f84656dc188191225c8d5cdfd2a00de663988d0/Lib/test/libregrtest/refleak.py#L170 2. This calls PyType_ClearCache, which sets the global next_version_tag counter to 0 https://github.com/python/cpython/blob/cee67fa66129b5d1db5c8aa3884338f82f0da3de/Objects/typeobject.c#L292. 3. On next run, since runs and type cache

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

2021-08-15 Thread Mark Shannon
Mark Shannon added the comment: Thanks for putting in the effort to find this. I think the first step to fixing this is to formalize the semantics of `tp_version_tag`. Initially it was designed just for the method cache, but we have started using it as a unique identifier for the state of a

[issue44895] refleak test failure in test_exceptions

2021-08-14 Thread Irit Katriel
Irit Katriel added the comment: I created issue44917 for the recursion hang because it seems like it's really another bug. -- ___ Python tracker ___

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

2021-08-14 Thread Ken Jin
: def __init__(self): pass cls_id = hex(id(C)) tp_version_tag_before = C.v x = C() tp_version_tag_after = C.v print(f'C ID: {cls_id}, before: {tp_version_tag_before} after: {tp_version_tag_after}') Result: "python_d.exe" -m test test

[issue44895] refleak test failure in test_exceptions

2021-08-14 Thread Dong-hee Na
Dong-hee Na added the comment: GH-27767 is a tooling patch for extract dump easily. See cpython-1628938551.dump.gz for msg399588. -- ___ Python tracker ___

[issue44895] refleak test failure in test_exceptions

2021-08-14 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +26243 pull_request: https://github.com/python/cpython/pull/27767 ___ Python tracker ___

[issue44895] refleak test failure in test_exceptions

2021-08-14 Thread Dong-hee Na
=18 test_exceptions failed (reference leak) == Tests result: FAILURE == 1 test failed: test_exceptions 1 re-run test: test_exceptions Total duration: 5.7 sec Tests result: FAILURE -- Added file: https://bugs.python.org/file50216/cpython-1628938551.dump.gz

[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Chris Jerdonek
Chris Jerdonek added the comment: FYI, I tried myself, and setting PYTHONHASHSEED didn't make the failures deterministic. -- ___ Python tracker ___

[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: If someone can reproduce more or less reliably, it would be great to know where are the leaked objects. For that, compile CPython with "-with-trace-refs", surround the suspicious test in a loop (test_no_hang_on_context_chain_cycle2 f

[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Chris Jerdonek
Chris Jerdonek added the comment: Last question: might trying different values of PYTHONHASHSEED help? -- ___ Python tracker ___

[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Irit Katriel
Irit Katriel added the comment: For instance, if memory addresses of objects are different, so objects sort differently in different runs on the same system. -- ___ Python tracker

[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Chris Jerdonek
Chris Jerdonek added the comment: "How does this explain it not being non-deterministic on" -> "How does this explain it not being deterministic on" -- ___ Python tracker

[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Chris Jerdonek
Chris Jerdonek added the comment: > Maybe it's a very precise threshold which triggers the issue. Between Linux > and macOS, the site module executes different code paths which produce > different GC counters. > Sometimes, the GC must happen in a very precise line, one line later is too >

[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Irit Katriel
Irit Katriel added the comment: Regarding the hang in msg399539, do we need some special handling of the case were a RecursionError is being raised and its context is another RecursionError? Like a FatalError? -- ___ Python tracker

[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Dong-hee Na
Dong-hee Na added the comment: Oops sorry. Without PR 27746, I was able to reproduce on my macOS environment. test_exceptions leaked [6, 6, 6] references, sum=18 test_exceptions leaked [6, 6, 6] memory blocks, sum=18 test_exceptions failed (reference leak) --

[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Irit Katriel
Change by Irit Katriel : -- pull_requests: +26237 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/27761 ___ Python tracker ___

[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Dong-hee Na
Dong-hee Na added the comment: > However hang was able to reproduce. I meant msg399539 -- ___ Python tracker ___ ___

[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Dong-hee Na
Dong-hee Na added the comment: >From my macOS, I was not able to reproduce the issue also as like as Victor >and Pablo. repeat 10 ./python.exe -m test -R 3:3 test_exceptions -m test_no_hang_on_context_chain_cycle2 -m test_recursion_normalizing_infinite_except

[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Irit Katriel
Irit Katriel added the comment: Adding Mark since he worked on recursion recently. -- nosy: +Mark.Shannon ___ Python tracker ___

[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Irit Katriel
Irit Katriel added the comment: The script below hangs on my mac (it's an extract from test_recursion_in_except_handler). --- import sys count = 0 def main(): def f(): global count count += 1 try: f() except RecursionError: f()

[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I have tried to reproduce this on my Linux and Mac machines and I have been unable to do it for the time being in either of them. -- nosy: +pablogsal ___ Python tracker

[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread STINNER Victor
STINNER Victor added the comment: Chris: > Out of curiosity, is the failure deterministic in environments where it > fails? If not, what is the source of the indeterminism -- some kind of race > condition or something else? The GC uses counters and thresholds to decide which collection and

[issue44873] base64 RFC4648 test cases

2021-08-13 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks, Andrei! ✨  ✨ -- nosy: +lukasz.langa resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue44873] base64 RFC4648 test cases

2021-08-13 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 1.0 -> 2.0 pull_requests: +26234 pull_request: https://github.com/python/cpython/pull/27757 ___ Python tracker

[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Łukasz Langa
Łukasz Langa added the comment: I merged the workaround to get refleak buildbots unstuck for the weekend. I bumped the issue stage back to "needs patch" as the available one isn't a solution. -- stage: patch review -> needs patch ___ Python

[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread miss-islington
miss-islington added the comment: New changeset ebc59262349d6901b825ed9101d604e826757262 by Miss Islington (bot) in branch '3.10': bpo-44895: Temporarily add an extra gc.collect() call (GH-27746) https://github.com/python/cpython/commit/ebc59262349d6901b825ed9101d604e826757262 --

[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Irit Katriel
Irit Katriel added the comment: > what is the source of the indeterminism -- some kind of race condition or > something else? My hunch is it could be timing of GC. But it's hard to say at this point. -- ___ Python tracker

[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +26229 pull_request: https://github.com/python/cpython/pull/27753 ___ Python tracker

[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 7bf28cbb4bf37fa6bdfc2d3f8a3939066b3f8f22 by Irit Katriel in branch 'main': bpo-44895: Temporarily add an extra gc.collect() call (GH-27746) https://github.com/python/cpython/commit/7bf28cbb4bf37fa6bdfc2d3f8a3939066b3f8f22 -- nosy:

[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Irit Katriel
Irit Katriel added the comment: It’s not deterministic. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44895] refleak test failure in test_exceptions

2021-08-12 Thread Chris Jerdonek
Chris Jerdonek added the comment: Out of curiosity, is the failure deterministic in environments where it fails? If not, what is the source of the indeterminism -- some kind of race condition or something else? -- nosy: +chris.jerdonek ___ Python

Re: some problems for an introductory python test

2021-08-12 Thread Greg Ewing
On 13/08/21 5:52 am, Grant Edwards wrote: I think what he's talking about is allowing the user to attach arbitrary _metadata_ to the file ... IOW, something similar to the > "resource fork" that MacOS used to have. The resource fork was used for more than just metadata, it was often the

Re: some problems for an introductory python test

2021-08-12 Thread Greg Ewing
On 13/08/21 11:42 am, Cameron Simpson wrote: 2: It took me a while to see, but this is a type annotiation. Interestingly, it seems to be parsed as a form of assignment with a missing RHS. >>> from ast import parse, dump >>> dump(parse("if0: print('yes!')"))

Re: some problems for an introductory python test

2021-08-12 Thread Cameron Simpson
On 12Aug2021 12:09, Hope Rouselle wrote: >Chris Angelico writes: >> [...] Plus, it had this fancy >> concept of "extended attributes"; on older systems (like MS-DOS's >> "FAT" family), a file might be Read-Only, Hidden, a System file, or >> needing to be Archived, and that was it - but on HPFS,

Re: some problems for an introductory python test

2021-08-12 Thread Cameron Simpson
On 11Aug2021 09:11, Hope Rouselle wrote: >Greg Ewing writes: >> That may not be doing what you think it's doing. Consider also >> > if0: print('yes!') >> yes! > >So, yes, that's puzzling. > 0 == False >True if0: print("yes") >yes if(0): print("yes") > > >What's going on

[issue44895] refleak test failure in test_exceptions

2021-08-12 Thread Irit Katriel
Irit Katriel added the comment: My smallest failing example so far: def test_recursion_in_except_handler(self): self.test_no_hang_on_context_chain_cycle2() def set_relative_recursion_limit(n): depth = 1 while True: try:

Re: some problems for an introductory python test

2021-08-12 Thread Dennis Lee Bieber
On Fri, 13 Aug 2021 04:41:42 +1000, Chris Angelico declaimed the following: >Yeah. It was a strange choice by today's standards, but back then, >most of my GUI programs were written in REXX. > >https://en.wikipedia.org/wiki/VX-REXX >http://www.edm2.com/0206/vrexx.html > There was a

Re: some problems for an introductory python test

2021-08-12 Thread Grant Edwards
On 2021-08-12, MRAB wrote: > >> Windows never had filesystems that supported metadata like OS/2 and >> MacOS did. The registry was an ugly hack that attempted (very poorly) >> to make up for that lack of metadata. >> > FYI, NTFS does support Alternate Data Streams. That is interesting -- and it

Re: some problems for an introductory python test

2021-08-12 Thread Dennis Lee Bieber
On Thu, 12 Aug 2021 12:09:58 -0300, Hope Rouselle declaimed the following: >How is it possible that Microsoft would take part of the code of OS/2? >Did IBM just hand it to them? > Because IBM subcontracted (IE: "paid") M$ to create an OS with XYZ features for their latest PC (under

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

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

Re: some problems for an introductory python test

2021-08-12 Thread MRAB
On 2021-08-12 18:52, Grant Edwards wrote: On 2021-08-12, Hope Rouselle wrote: OS/2 had all kinds of amazing features (for its time). [...] Plus, it had this fancy concept of "extended attributes"; on older systems (like MS-DOS's "FAT" family), a file might be Read-Only, Hidden, a System file,

[issue44873] base64 RFC4648 test cases

2021-08-12 Thread Andrei Kulakov
Change by Andrei Kulakov : -- keywords: +patch pull_requests: +26225 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27747 ___ Python tracker ___

Re: some problems for an introductory python test

2021-08-12 Thread Chris Angelico
On Fri, Aug 13, 2021 at 5:03 AM Grant Edwards wrote: > > On 2021-08-12, Hope Rouselle wrote: > > >> OS/2 had all kinds of amazing features (for its time). [...] Plus, > >> it had this fancy concept of "extended attributes"; on older > >> systems (like MS-DOS's "FAT" family), a file might be

Re: some problems for an introductory python test

2021-08-12 Thread Grant Edwards
On 2021-08-12, Hope Rouselle wrote: >> OS/2 had all kinds of amazing features (for its time). [...] Plus, >> it had this fancy concept of "extended attributes"; on older >> systems (like MS-DOS's "FAT" family), a file might be Read-Only, >> Hidden, a System file, or needing to be Archived, and

Re: some problems for an introductory python test

2021-08-12 Thread Chris Angelico
On Fri, Aug 13, 2021 at 2:15 AM Hope Rouselle wrote: > > Chris Angelico writes: > > > History lesson! > > > > Once upon a time, IBM and Microsoft looked at what Intel was > > producing, and went, hey, we need to design an operating system that > > can take advantage of the fancy features of this

[issue44895] refleak test failure in test_exceptions

2021-08-12 Thread Irit Katriel
Irit Katriel added the comment: This fails (test_recursion_normalizing_with_no_memory is not needed): ./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

[issue44895] refleak test failure in test_exceptions

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

Re: some problems for an introductory python test

2021-08-12 Thread Hope Rouselle
Chris Angelico writes: [...] >> > [1] And boy oh boy was that good fun. The OS/2 Presentation Manager >> > had a wealth of power available. Good times, sad that's history now. >> >> I know OS/2 only by name. I never had the pleasure of using it. In >> fact, I don't even know how it looks. I

[issue44895] refleak test failure in test_exceptions

2021-08-12 Thread Irit Katriel
Irit Katriel added the comment: The problem disappears if I add a gc.collect() loop at the beginning of the new test: diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index 79798ecf05..e0aeac9d10 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py

[issue44895] refleak test failure in test_exceptions

2021-08-12 Thread Irit Katriel
Irit Katriel added the comment: > I don't know why you need to kill it. It's not a long test. Ah I see, -F. -- ___ Python tracker <https://bugs.python.org/issu

[issue44895] refleak test failure in test_exceptions

2021-08-12 Thread STINNER Victor
STINNER Victor added the comment: > I see it on Mac but not windows. Aha, maybe there is something specific on Mac which triggers an exact code path to trigger to bug. I already saw bugs like that. You can try to play with gc.set_threshold() to change how garbage collection is triggered.

[issue44895] refleak test failure in test_exceptions

2021-08-12 Thread Irit Katriel
Irit Katriel added the comment: I don't know why you need to kill it. It's not a long test. -- ___ Python tracker <https://bugs.python.org/issue44895> ___ ___

[issue44895] refleak test failure in test_exceptions

2021-08-12 Thread STINNER Victor
STINNER Victor added the comment: > Victor, if the …cycle2 test is hanging then you need the change in PR27626. That's the commit d5c217475c4957a8084ac3f92ae012ece5edc7cb. My main branch is up to date (commit 8ac0886091c27bf4b6bb0a9b571e174b554d31a4), it includes the com

[issue44895] refleak test failure in test_exceptions

2021-08-12 Thread STINNER Victor
STINNER Victor added the comment: I am not more lucky in the main branch. I ran it for 30 minutes and it didn't fail. $ ./python -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-08-12 Thread Irit Katriel
Irit Katriel added the comment: Victor, if the …cycle2 test is hanging then you need the change in PR27626. -- ___ Python tracker <https://bugs.python.org/issue44

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