Opened 8 years ago

Closed 8 years ago

#3719 enhancement closed fixed (fixed)

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

Reported by: Jean-Paul Calderone Owned by:
Priority: normal Milestone:
Component: core Keywords:
Cc: drake, Thijs Triemstra, jesstess Branch: branches/deprecate-time-helpers-3719
branch-diff, diff-cov, branch-cov, buildbot
Author: exarkun

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 8 years ago.

Download all attachments as: .zip

Change History (16)

Changed 8 years ago by drake

Attachment: time_helpers.diff added

comment:1 Changed 8 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 8 years ago by Jean-Paul Calderone

Keywords: easy review removed
Owner: set to Itamar Turner-Trauring

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 8 years ago by Jean-Paul Calderone

Owner: changed from Itamar Turner-Trauring to Jean-Paul Calderone
Status: newassigned

comment:4 Changed 8 years ago by Jean-Paul Calderone

Author: exarkun
Branch: branches/deprecate-time-helpers-3719

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

comment:5 Changed 8 years ago by Jean-Paul Calderone

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

refs #3719

comment:6 Changed 8 years ago by Jean-Paul Calderone

(In [27932]) Deprecate time_helpers

refs #3719

comment:7 Changed 8 years ago by Jean-Paul Calderone

(In [27933]) News file for the deprecation

refs #3719

comment:8 Changed 8 years ago by Jean-Paul Calderone

Keywords: review added
Owner: Jean-Paul Calderone deleted
Status: assignednew

comment:9 Changed 8 years ago by Thijs Triemstra

Cc: Thijs Triemstra added
Keywords: review removed
Owner: set to Jean-Paul Calderone

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

comment:10 Changed 8 years ago by Jean-Paul Calderone

Keywords: review added
Owner: Jean-Paul Calderone 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 8 years ago by jesstess

Cc: jesstess added
Owner: set to jesstess

comment:12 Changed 8 years ago by jesstess

Keywords: review removed
Owner: changed from jesstess to Jean-Paul Calderone
  • 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 8 years ago by Jean-Paul Calderone

(In [28036]) Update copyright dates

refs #3719

comment:14 Changed 8 years ago by Jean-Paul Calderone

Resolution: fixed
Status: newclosed

(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 7 years ago by <automation>

Owner: Jean-Paul Calderone deleted
Note: See TracTickets for help on using tickets.