twisted / twisted/twisted

twisted.internet.test.reactormixins.ReactorBuilder.unbuildReactor uses many non-interface APIs of reactors

Open
#5,522 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug core new priority-normal tests
Dominant language
Python
Stars
6k
Forks
1.2k
Avg merge
2d 10h
Merged PRs (30d)
10

Description

exarkun's avatar @exarkun reported
Trac ID trac#5522
Type defect
Created 2012-03-11 16:50:48Z

_uninstallHandler and disconnectAll are part of no interface, but ReactorBuilder tries to use them to clean up a reactor it just ran. It also uses getDelayedCalls without checking whether the reactor implements IReactorTime.

These uses lead to problems testing reactors that are missing one or more of these APIs.

Attachments:

Searchable metadata
trac-id__5522 5522
type__defect defect
reporter__exarkun exarkun
priority__normal normal
milestone__ 
branch__ 
branch_author__ 
status__new new
resolution__None None
component__core core
keywords__tests tests
time__1331484648000000 1331484648000000
changetime__1331485088000000 1331485088000000
version__None None
owner__ 

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at twisted.internet.test.reactormixins.ReactorBuilder.unbuildReactor and inspect its cleanup calls against the reactor interfaces. The issue names _uninstallHandler, disconnectAll, and getDelayedCalls; use unbuild-reactor.patch as context and verify that reactors lacking those APIs can be cleaned up without relying on them.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.