New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mark twisted.internet.defer.timeout as Deprecated #654
Conversation
Current coverage is 91.09% (diff: 100%)@@ trunk #654 diff @@
==========================================
Files 843 843
Lines 147019 147028 +9
Methods 0 0
Messages 0 0
Branches 12996 12996
==========================================
- Hits 134079 133942 -137
- Misses 10707 10844 +137
- Partials 2233 2242 +9
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good, just minor comments. Address and merge.
self.assertFailure(deferred, defer.TimeoutError) | ||
warningsShown = self.flushWarnings([self.test_deprecatedTimeout]) | ||
self.assertEqual(len(warningsShown), 1) | ||
self.assertIdentical(warningsShown[0]['category'], DeprecationWarning) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think assertIs
is preferred. That's the stdlib unittest spelling for this assertion.
@@ -160,6 +160,8 @@ def maybeDeferred(f, *args, **kw): | |||
|
|||
|
|||
|
|||
@deprecated(Version('Twisted', 16, 8, 0), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Presumably this will be a 17.x.y now but I'm not sure what the current system for picking such numbers is, nor how one predicts this in advance. I heard some folks talking about Version("Twisted", "NEXT", 0, 0)
? Maybe that was a joke of some sort though.
Probably at minimum bump this to some 17.x.y guess.
@hawkowl what is the next version number of Twisted going to be, so I can make sure this patch has the right one? |
https://twistedmatrix.com/trac/ticket/8971