Ticket #2394 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Python issue1569356 breaks coverage testing

Reported by: pjd Assigned to: pjd
Priority: highest Milestone:
Component: Nevow Severity: normal
Keywords: Cc:
Estimated Completion (YYYY/MM/DD): Branch: branches/issue1569356-workaround-2394
Author:

Description (Last modified by pjd)

Parents: #2391, #2392

There's a bug with Python's tracing support that (issue1569356) that causes closures to "leak", causing some tests to fail when run with trial --coverage.

A fix for this was committed in r53954, but not (yet?) backported to 2.5/2.5.1.

Vulnerable tests (in addition to the parent tickets):

  • formless.test.test_formless.Annotation.testTypedInterfaceProperties
  • formless.test.test_formless.Annotation.testTypedInterfaceMethods
  • xmantissa.test.test_theme.ThemedDocumentFactoryTests.test_getter

Change History

11/13/07 16:38:50 changed by pjd

  • component changed from Epsilon to Nevow.
  • description changed.

(note vulnerable tests)

11/13/07 16:42:38 changed by pjd

  • branch set to branches/issue1569356-workaround-2394.

(In [14213]) Branching to 'issue1569356-workaround-2394'

11/13/07 16:53:50 changed by pjd

  • keywords set to review.
  • owner changed from pjd to exarkun.
  • priority changed from normal to highest.

Any software problem can be solved by adding another layer of indirection.

(follow-up: ↓ 5 ) 11/14/07 15:38:05 changed by exarkun

  • keywords deleted.
  • owner changed from exarkun to pjd.

The two formless changes make a note of the Python issue being worked around, but the Mantissa change doesn't. Other than that, looks good. No need for re-review.

(in reply to: ↑ 4 ) 11/15/07 04:32:59 changed by pjd

The two formless changes make a note of the Python issue being worked around, but the Mantissa change doesn't. Other than that, looks good. No need for re-review.

This was intentional, since the formless change introduces an artificial indirection, while the Mantissa change only renames a local variable to an arguably better style anyway (corresponding to the changes in #2391/#2392).

I don't believe a warning in the latter case is warranted unless we apply it equally to all conflicting-when-leaked names; there are enough of them that it probably belongs in the coding standard, instead.

11/15/07 06:02:00 changed by pjd

OK, i added an explanation/guideline to the CodingStandard regarding this. Is that acceptable?

11/15/07 21:39:39 changed by pjd

  • status changed from new to closed.
  • resolution set to fixed.

(In [14270]) Merge issue1569356-workaround-2394

Author: pjd Reviewer: exarkun Fixes #2394

This works around a Python bug that breaks trial --coverage.

jethro@divmod.org