Ticket #3719 enhancement closed fixed

Opened 4 years ago

Last modified 3 years ago

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

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

Change History

Changed 4 years ago by drake

1

Changed 4 years ago by drake

  • keywords easy, review added; easy removed
  • cc drake added
  • owner glyph deleted

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

2

Changed 4 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.

3

Changed 3 years ago by exarkun

  • status changed from new to assigned
  • owner changed from itamar to exarkun

4

Changed 3 years ago by exarkun

  • branch set to branches/deprecate-time-helpers-3719
  • branch_author set to exarkun

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

5

Changed 3 years ago by exarkun

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

refs #3719

6

Changed 3 years ago by exarkun

(In [27932]) Deprecate time_helpers

refs #3719

7

Changed 3 years ago by exarkun

(In [27933]) News file for the deprecation

refs #3719

8

Changed 3 years ago by exarkun

  • status changed from assigned to new
  • keywords review added
  • owner exarkun deleted

9

Changed 3 years ago by thijs

  • cc thijs added
  • keywords review removed
  • owner set to exarkun

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

10

Changed 3 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?

11

Changed 3 years ago by jesstess

  • cc jesstess added
  • owner set to jesstess

12

Changed 3 years ago by jesstess

  • owner changed from jesstess to exarkun
  • keywords review removed
  • 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.

13

Changed 3 years ago by exarkun

(In [28036]) Update copyright dates

refs #3719

14

Changed 3 years ago by exarkun

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

(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.

15

Changed 2 years ago by <automation>

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