Skip to content

Commit

Permalink
Merge pull request #4246 from tardyp/upgrade_twisted
Browse files Browse the repository at this point in the history
Upgrade twisted
  • Loading branch information
tardyp committed Aug 8, 2018
2 parents abe9bd7 + 9cc45a9 commit 36d2e33
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions common/code_spelling_ignore_words.txt
Expand Up @@ -513,6 +513,7 @@ gatherresults
gayton
gcc
gc'd
gc
gerrit
getaddress
getargspec
Expand Down
14 changes: 14 additions & 0 deletions master/buildbot/monkeypatches/__init__.py
Expand Up @@ -119,6 +119,19 @@ def patch_unittest_testcase():
TestCase.assertRegex = TestCase.assertRegexpMatches


@onlyOnce
def patch_testcase_flushLoggedErrors():
from twisted.trial.unittest import SynchronousTestCase
import gc

# DebugInfo use of __del__ leads to hard to find gc timing issues
# https://twistedmatrix.com/trac/ticket/9505
def flushLoggedErrors(self, *errorTypes):
gc.collect()
return self._observer.flushErrors(*errorTypes)
SynchronousTestCase.flushLoggedErrors = flushLoggedErrors


def patch_all(for_tests=False):
if for_tests:
patch_servicechecks()
Expand All @@ -127,6 +140,7 @@ def patch_all(for_tests=False):
patch_mysqlclient_warnings()
patch_config_for_unit_tests()
patch_unittest_testcase()
patch_testcase_flushLoggedErrors()

patch_python14653()
patch_twisted9127()
2 changes: 1 addition & 1 deletion requirements-ci.txt
Expand Up @@ -79,7 +79,7 @@ termcolor==1.1.0
toml==0.9.4
towncrier==18.6.0
treq==18.6.0
Twisted==18.4.0
Twisted==18.7.0
txaio==18.7.1
txrequests==0.9.6
typing==3.6.4
Expand Down

0 comments on commit 36d2e33

Please sign in to comment.