Ticket #5088 regression closed fixed

Opened 2 years ago

Last modified 23 months ago

cfreactor cannot be imported

Reported by: exarkun Owned by: exarkun
Priority: highest Milestone: Twisted-11.1
Component: core Keywords:
Cc: Branch: branches/cfreactor-import-5088
(diff, github, buildbot, log)
Author: exarkun Launchpad Bug:

Description

>>> from twisted.internet import cfreactor
/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/zope/__init__.py:1: UserWarning: Module twisted was already imported from twisted/__init__.pyc, but /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python is being added to sys.path
  __import__('pkg_resources').declare_namespace(__name__)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/exarkun/Projects/Twisted/trunk/twisted/internet/cfreactor.py", line 24, in <module>
    from twisted.internet.selectreactor import _NO_FILENO, _NO_FILEDESC
ImportError: cannot import name _NO_FILENO

Change History

1

  Changed 2 years ago by glyph

Looks like #4539 is the culprit. Why don't we have a failing buildbot?

2

follow-up: ↓ 3   Changed 2 years ago by exarkun

Because ImportError gets turned into a skip automatically for the reactor builder tests.

3

in reply to: ↑ 2   Changed 2 years ago by glyph

I guess I meant it as a rhetorical question.

Put more directly: one aspect of this fix should be a platform-specific "this should always run" thing which tells the OS X slaves to puke if they can't import this reactor for any reason.

4

  Changed 2 years ago by glyph

  • priority changed from normal to highest

Regression, so: highest priority. I would just revert the other change but it looks like an important bugfix for its own right.

5

  Changed 2 years ago by glyph

  • milestone set to Twisted-11.1

And it needs to be completed before 11.1.

6

  Changed 2 years ago by glyph

  • status changed from new to assigned
  • owner set to glyph

I guess I'll take it over.

7

  Changed 2 years ago by exarkun

  • branch set to branches/cfreactor-import-5088
  • branch_author set to exarkun

(In [31936]) Branching to 'cfreactor-import-5088'

8

  Changed 23 months ago by itamar

Anything else that needs to be done before this can go into review, other than adding a newsfile? This is only remaining blocker for 11.1.

9

  Changed 23 months ago by exarkun

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

10

  Changed 23 months ago by glyph

  • owner set to exarkun
  • keywords review removed

Thanks for turning the crank. Land it.

11

  Changed 23 months ago by glyph

I filed #5216 to try to improve the reactor builder tests so we won't see something like this again.

12

  Changed 23 months ago by exarkun

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

(In [32411]) Merge cfreactor-import-5088

Author: exarkun Reviewer: glyph Fixes: #5088

Fix a bad import in cfreactor which caused it to be unusable. Also fix the call-fileno-after-removal behavior which #4539 fixed for the other reactors.

Note: See TracTickets for help on using tickets.