Opened 6 years ago

Closed 5 years ago

#3719 enhancement closed fixed (fixed)

Stop using twisted.test.time_helpers in twisted.test.test_internet

Reported by: exarkun Owned by:
Priority: normal Milestone:
Component: core Keywords:
Cc: drake, thijs, jesstess Branch: branches/deprecate-time-helpers-3719
(diff, github, buildbot, log)
Author: exarkun Launchpad Bug:

Description

time_helpers is basically deprecated. We should stop using it internally and formally deprecate it.

Attachments (1)

time_helpers.diff (3.0 KB) - added by drake 6 years ago.

Download all attachments as: .zip

Change History (16)

Changed 6 years ago by drake

comment:1 Changed 6 years ago by drake

  • Cc drake added
  • Keywords review added
  • Owner glyph deleted

Changed twisted.test.test_internet to use twisted.internet.task.Clock and deprecated time_helpers.py

comment:2 Changed 6 years ago by exarkun

  • Keywords easy review removed
  • Owner set to itamar

Hmm. The test, testCallLaterDelayAndReset used to be a test for the IReactorTime implementation in twisted.internet.base.ReactorBase. With these changes, it's now a test for twisted.internet.task.Clock.

I think the test needs to be moved into twisted.internet.test.test_base and written as a test against ReactorBase (or a subclass which adds a fake implementation of seconds and probably doIteration).

The easy keyword was probably a mistake for this ticket.

comment:3 Changed 5 years ago by exarkun

  • Owner changed from itamar to exarkun
  • Status changed from new to assigned

comment:4 Changed 5 years ago by exarkun

  • Author set to exarkun
  • Branch set to branches/deprecate-time-helpers-3719

(In [27930]) Branching to 'deprecate-time-helpers-3719'

comment:5 Changed 5 years ago by exarkun

(In [27931]) Remove testCallLaterDelayAndReset and replace it with a bunch of tests in twisted.internet.test.test_posixbase

refs #3719

comment:6 Changed 5 years ago by exarkun

(In [27932]) Deprecate time_helpers

refs #3719

comment:7 Changed 5 years ago by exarkun

(In [27933]) News file for the deprecation

refs #3719

comment:8 Changed 5 years ago by exarkun

  • Keywords review added
  • Owner exarkun deleted
  • Status changed from assigned to new

comment:9 Changed 5 years ago by thijs

  • Cc thijs added
  • Keywords review removed
  • Owner set to exarkun

twisted/test/test_timehelpers.py needs an @since.

comment:10 Changed 5 years ago by exarkun

  • Keywords review added
  • Owner exarkun deleted

Hmm. Nah. I don't think any test module needs one of those. They're not part of the public API, and we don't generate API docs for them.

Anything else?

comment:11 Changed 5 years ago by jesstess

  • Cc jesstess added
  • Owner set to jesstess

comment:12 Changed 5 years ago by jesstess

  • Keywords review removed
  • Owner changed from jesstess to exarkun
  • time_helpers, test_internet, and test_posixbase need copyright bumps.
  • In TimeoutReportReactor: I don't understand this sentence fragment: "A reactor which is just barely runnable, but which cannot monitor any readers or writers,". Should the 'but' be an 'and'?
  • In IterationTimeoutTests: two lines between _checkIterationTimeout and test_noCalls

Other than that, +1 to merge.

comment:13 Changed 5 years ago by exarkun

(In [28036]) Update copyright dates

refs #3719

comment:14 Changed 5 years ago by exarkun

  • Resolution set to fixed
  • Status changed from new to closed

(In [28039]) Merge deprecate-time-helpers-3719

Author: drake, exarkun
Reviewer: thijs, jesstess
Fixes: #3719

Rewrite the last of the remaining tests which used twisted.test.time_helpers and
deprecate that module.

comment:15 Changed 4 years ago by <automation>

  • Owner exarkun deleted
Note: See TracTickets for help on using tickets.