[issue21178] doctest cause warnings in tests using generators

2021-12-10 Thread Irit Katriel
Irit Katriel added the comment: Reproduced on 3.11. -- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4, Python 3.5 ___ Python tracker ___ __

[issue21178] doctest cause warnings in tests using generators

2014-04-12 Thread Ontje Lünsdorf
Ontje Lünsdorf added the comment: I think there may be a bug in doctest which is getting exposed by Python 3.4 new handling of reference cycles. I've attached a simpler example with a global variable. There's no error if you run the code directly, the global variable still exists during the g

[issue21178] doctest cause warnings in tests using generators

2014-04-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: I not am not sure I see a bug here, a discrepancy between doc and behavior. Even if not, you may have a legitimate enhancement request. 3.4 now warns about ignored exceptions during shutdown in case there is a fixable bug in the code being shut down. This is i

[issue21178] doctest cause warnings in tests using generators

2014-04-08 Thread Ontje Lünsdorf
Ontje Lünsdorf added the comment: Sorry, the test does not really expose the problem with Python 3.4. Here is an updated example. Python 2.7 and 3.3 succeed without warnings, while Python 3.4 warns about an ignored exception. -- Added file: http://bugs.python.org/file34761/doctest.txt

[issue21178] doctest cause warnings in tests using generators

2014-04-08 Thread Ontje Lünsdorf
New submission from Ontje Lünsdorf: The attached doctest raises a warning since Python 3.4: $ python -m doctest doctest.txt Exception ignored in: Traceback (most recent call last): File "", line 4, in foo NameError: name 'socket' is not defined My guess is that doctest cleans up globals() of