Ticket #4505 task closed fixed

Opened 3 years ago

Last modified 3 years ago

Deprecate or remove unused warnings and exceptions in twisted.trial.util

Reported by: cyli Owned by: cyli
Priority: normal Milestone:
Component: trial Keywords: easy
Cc: jessica.mckellar@… Branch: branches/remove-trialutil-exceptions-4505
Author: jesstess Launchpad Bug:

Description

FailureError, DirtyReactorWarning, DirtyReactorError, PendingTimedCallsError have been deprecated since Twisted 8.0, although the deprecation was stated in a docstring rather than as a warning.

This should either be deprecated correctly (via warnings) or removed. Removing them does not seem to affect any tests.

Attachments

4505.diff Download (2.1 KB) - added by cyli 3 years ago.

Change History

Changed 3 years ago by cyli

1

  Changed 3 years ago by cyli

  • owner jml deleted
  • keywords review added

I am in favor of removal, as it is simpler. Also, the docstring for twisted.trial.util say that it is a module for internal use only.

2

  Changed 3 years ago by jesstess

  • owner set to jesstess

3

  Changed 3 years ago by jesstess

  • branch set to branches/remove-trialutil-exceptions-4505
  • branch_author set to jesstess

(In [29309]) Branching to 'remove-trialutil-exceptions-4505'

4

  Changed 3 years ago by jesstess

(In [29310]) Apply patch 4505.diff by cyli.

refs #4505

5

follow-up: ↓ 7   Changed 3 years ago by jesstess

  • keywords review removed
  • cc jessica.mckellar@… added
  • owner changed from jesstess to cyli

Thanks for tackling all these deprecations and removals, cyli!

Given the "This code is for Trial's internal use. Do NOT use this code if you are writing tests. It is subject to change at the Trial maintainer's whim." disclaimer at the top of util.py, I agree with removal instead of deprecation.

Some feedback:

  • In the topfile, the message is duplicated.
  • In util.py, pyflakes catches that _ _all_ _ still references the removed Exceptions.
  • There are still references to DirtyReactorError in twisted/trial/test/test_reporter.py and twisted/trial/reporter.py

6

  Changed 3 years ago by cyli

(In [29313]) Bump copyright (previous commit: fixes for review)

refs #4505

7

in reply to: ↑ 5   Changed 3 years ago by cyli

  • keywords review added

* In the topfile, the message is duplicated.

Huh, odd, it wasn't in the diff. Fixed though.

* In util.py, pyflakes catches that _ _all_ _ still references the removed Exceptions.

Removed.

* There are still references to DirtyReactorError in twisted/trial/test/test_reporter.py and twisted/trial/reporter.py

Looks like someone forgot to modify the comments when they changed over from using DirtyReactorError to using DirtyReactorAggregateError. Fixed.

8

  Changed 3 years ago by cyli

  • owner cyli deleted

9

  Changed 3 years ago by jesstess

  • owner set to jesstess

10

  Changed 3 years ago by jesstess

  • keywords review removed
  • owner changed from jesstess to cyli

C{DirtyReactorAggregateError} might as well be L{DirtyReactorAggregateError} in test_warningsEnabled and test_warningsMaskErrors. Other than that, I think this good to merge.

11

  Changed 3 years ago by cyli

(In [29316]) Updated C{DirtyReactorAggregateError} to L{DirtyReactorAggregateError}

refs #4505

12

  Changed 3 years ago by cyli

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

(In [29317]) Merge remove-trialutil-exceptions-4505 : remove deprecated exceptions in t.trial.util

Author: cyli Reviewer: jesstess Fixes: #4505

Remove deprecated warnings and exceptions from t.trial.util, as well as some comments in t.trial.reporter and t.trial.test.test_reporter

13

  Changed 3 years ago by cyli

Thanks for the quick turnaround time!

Note: See TracTickets for help on using tickets.