Port twisted.deferredruntest to Twisted >= 15.1.0 #149

Closed
wants to merge 5 commits into
from

Conversation

Projects
None yet
2 participants

Twisted 15.1.0 removes the compatibility import of _LogObserver in
twisted.trial.unittest. This is unfortunate for us, but it's what we
get for using an internal interface. It at least still exists in
twisted.trial._synctest, so we can get it from there.

Twisted 15.2.0 adds the new twisted.logger framework, which requires a
slight adjustment to run_with_log_observers. There's no longer a
supported interface to get hold of all log observers, but since we're
already using an internal interface (see above), what's one more?

This passes "make check" with the current release, Twisted 15.3.0.

Port twisted.deferredruntest to Twisted >= 15.1.0
Twisted 15.1.0 removes the compatibility import of _LogObserver in
twisted.trial.unittest.  This is unfortunate for us, but it's what we
get for using an internal interface.  It at least still exists in
twisted.trial._synctest, so we can get it from there.

Twisted 15.2.0 adds the new twisted.logger framework, which requires a
slight adjustment to run_with_log_observers.  There's no longer a
supported interface to get hold of all log observers, but since we're
already using an internal interface (see above), what's one more?

This passes "make check" with the current release, Twisted 15.3.0.
Owner

rbtcollins commented Aug 19, 2015

Does it still work with older supported Twisted releases?

Owner

rbtcollins commented Aug 19, 2015

(I mean, I see the conditional code, but we don't strictly know). I think to merge this we probably want a new entry in the test matrix to run old twisted

It worked for me back to at least 14.0.0, but I take your point. How would I go about extending the test matrix? Is that even something in my power to do?

OK, I worked it out. Could you have a look at this?

.travis.yml
+ - python: "2.6"
+ env: TWISTED_REQ="Twisted==13.0.0"
+ - python: "2.6"
+ env: TWISTED_REQ="Twisted==15.2.0"
@rbtcollins

rbtcollins Aug 26, 2015

Owner

Ok so this one should be uncapped I think. Just 'Twisted'.

.travis.yml
+ - python: "2.7"
+ env: TWISTED_REQ="Twisted==13.0.0"
+ - python: "2.7"
+ env: TWISTED_REQ="Twisted==15.2.0"
.travis.yml
+ - python: "pypy"
+ env: TWISTED_REQ="Twisted==13.0.0"
+ - python: "pypy"
+ env: TWISTED_REQ="Twisted==15.2.0"
Owner

rbtcollins commented Aug 26, 2015

Do we need a test of the new global log observer functionality? Perhaps we should also file a ticket in twisted on the privates we're having to use.

cjwatson commented Sep 9, 2015

My feeling is that the fact that a slew of tests were failing without this change is probably sufficient - that is, the current deferredruntest tests already covered the basic function of running with different log observers, it's just that that needs different implementation details with current Twisted.

Owner

rbtcollins commented Oct 16, 2015

I have filed https://twistedmatrix.com/trac/ticket/8048 about the API being non-public.

Owner

rbtcollins commented Oct 16, 2015

Merged, thanks!

@rbtcollins rbtcollins closed this Oct 16, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment