[issue47246] Race condition in `threadig.Thread._wait_for_tstate_lock`

2022-04-07 Thread Dieter Maurer
Dieter Maurer added the comment: The observation was caused by a bug which has been fixed in newer Python versions (3.9+ if I remember correctly). `isAlive` was called on a `_DummyThread` (while `_DummyThread` overides `is_alive` it had forgotten to override `isAlive` as well

[issue47246] Race condition in `threadig.Thread._wait_for_tstate_lock`

2022-04-07 Thread Dieter Maurer
Dieter Maurer added the comment: Apparently, the explanation is not that easy: `_stop` first sets `_is_stopped` to `True` and only then `_tstate_lock` to `None`. Therefore, the race should not cause the `AssertionError`. I observed the `AssertionError` in Python 3.6. The related `threading

[issue47246] Race condition in `threadig.Thread._wait_for_tstate_lock`

2022-04-07 Thread Dieter Maurer
New submission from Dieter Maurer : I have observed an `AssertionError (assert self._is_stopped)` in `threading.Thread._wait_for_tstate_lock`. This indicates that Python's internal state has been corrupted. The analysis revealed the following race condition: `_wait_for_tstate:lock` contains

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

2021-09-18 Thread Dieter Maurer
Dieter Maurer added the comment: Thank you for working on this issue! -- ___ Python tracker <https://bugs.python.org/issue36674> ___ ___ Python-bugs-list mailin

[issue42549] "quopri" line endings not standard conform

2020-12-02 Thread Dieter Maurer
New submission from Dieter Maurer : RFC 1521 and "https://tools.ietf.org/html/rfc2045#section-6.7; stipulate that the quoted printable encoding uses CRLF line endings. Python's "quopri" implementation does not honor this. -- components: Library (Lib) messages: 38235

[issue41307] "email.message.Message.as_bytes": fails to correctly handle "charset"

2020-07-15 Thread Dieter Maurer
Dieter Maurer added the comment: The following fixes the example: from copy import copy from io import BytesIO from email.message import Message from email.generator import BytesGenerator, _has_surrogates from email._policybase import Compat32 class FixedBytesGenerator(BytesGenerator

[issue41307] "email.message.Message.as_bytes": fails to correctly handle "charset"

2020-07-15 Thread Dieter Maurer
New submission from Dieter Maurer : In the transscript below, "ms" and "mb" should be equivalent: >>> from email import message_from_string, message_from_bytes >>> mt = """\ ... Mime-Version: 1.0 ... Content-Type: text/plain; charset

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

2019-04-27 Thread Dieter Maurer
Dieter Maurer added the comment: Terry J. Reedy wrote: > SkipTest is an exception and according to the doc it should be propagated to > the caller. __unittest_skip__ is an undocumented internal name, so you > probably should not be using it. > > If this request is not rejecte

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

2019-04-20 Thread Dieter Maurer
New submission from Dieter Maurer : Currently, "TestCase.run" supports several features to control testing - among others, a test can be skipped via the attribute "__unittest_skip__". "TestCase.debug" ignores all those controls and calls the test method

[issue36554] unittest.TestCase: "subTest" cannot be used together with "debug"

2019-04-08 Thread Dieter Maurer
Dieter Maurer added the comment: This is a duplicate of issue34900 -- stage: -> resolved status: open -> closed Added file: https://bugs.python.org/file48249/utest.py ___ Python tracker <https://bugs.python.org/i

[issue36554] unittest.TestCase: "subTest" cannot be used together with "debug"

2019-04-08 Thread Dieter Maurer
Change by Dieter Maurer : Added file: https://bugs.python.org/file48248/utest.py ___ Python tracker <https://bugs.python.org/issue36554> ___ ___ Python-bugs-list mailin

[issue36554] unittest.TestCase: "subTest" cannot be used together with "debug"

2019-04-08 Thread Dieter Maurer
New submission from Dieter Maurer : "subTest" accesses "self._outcome" which is "None" when the test is performed via "debug". -- components: Library (Lib) messages: 339607 nosy: dmaurer priority: normal severity: normal status: open title: uni

[issue35283] "threading._DummyThread" redefines "is_alive" but forgets "isAlive"

2018-12-03 Thread Dieter Maurer
Dieter Maurer added the comment: > Hi, I am going to solve this issue through below process. > ... > Is it okay? For me, this would be perfect. -- ___ Python tracker <https://bugs.python.or

[issue35283] "threading._DummyThread" redefines "is_alive" but forgets "isAlive"

2018-11-21 Thread Dieter Maurer
Dieter Maurer added the comment: > Care to open a PR to fix this? I am not familiar with the "github" workflow. The fix is so trivial (add the "isAlive = is_alive" alias to "threading._DummyThread" and replace "isAlive" by "is_alive" in

[issue35283] "threading._DummyThread" redefines "is_alive" but forgets "isAlive"

2018-11-20 Thread Dieter Maurer
New submission from Dieter Maurer : In module "threading", class "Thread" defines "is_alive" and defines "isAlive = is_alive". The derived class "_DummyThread" redefines "is_alive" but forgets to update the "isAliv

[issue2766] Doubtfull code in 'doctest.DocTestSuite'

2008-05-05 Thread Dieter Maurer
New submission from Dieter Maurer [EMAIL PROTECTED]: doctest.DocTestSuite has parameter globs=None. It uses globs in the call to test_finder.call. After this use, it potentually modifies globs but no longer uses it. Either the globs modification is irrelevant (then it should be removed

[issue2767] doctest.DocTestCase.debug clears test.globs too early

2008-05-05 Thread Dieter Maurer
New submission from Dieter Maurer [EMAIL PROTECTED]: doctest.DocTestCase.debug calls DebugRunner.run without clear_globs=False. As a consequence, already the runner clears test.globs and it is no longer available to tearDown (where is it cleared again). -- components: Library (Lib

[issue1785] inspect gets broken by some descriptors

2008-01-10 Thread Dieter Maurer
New submission from Dieter Maurer: The inspect functions getmembers(cls) and classify_class_attrs(cls) require that for a class *cls* each name in dir(cls) can be retrieved by getattr(cls, name). While this holds for usual class attributes, it may well fail for descriptors (descriptors set

[issue1785] inspect gets broken by some descriptors

2008-01-10 Thread Dieter Maurer
Dieter Maurer added the comment: In dm.zdoc (a pydoc wrapper for Zope) I simply filter out all names returned by dir which cannot be getattred. But, I am not sure, that this is good enough to be accepted as a patch (although it already improves upon the current state