Opened 11 years ago

Closed 11 years ago

#4860 enhancement closed invalid (invalid)

Move an import statement to top of file.

Reported by: e Owned by:
Priority: low Milestone:
Component: core Keywords:
Cc: Branch:


On twisted.internet.task, we should move

    from twisted.internet import reactor

to the top of

(_defaultScheduler, line 305)

Change History (2)

comment:1 Changed 11 years ago by Jean-Paul Calderone

Resolution: invalid
Status: newclosed

Importing the reactor has an unfortunate side-effect. If no reactor exists yet, then the default reactor is instantiated and installed. For this reason, modules in Twisted try to avoid importing the reactor as a side-effect of being imported themselves. Thus the reactor import hidden inside the _defaultScheduler function.

comment:2 Changed 11 years ago by <automation>

Note: See TracTickets for help on using tickets.