Skip to content

Commit

Permalink
Merge branch 'trunk' into log-capture2
Browse files Browse the repository at this point in the history
  • Loading branch information
wsanchez authored Apr 12, 2019
2 parents 47ba97f + 849265f commit be8a1e8
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 219 deletions.
12 changes: 0 additions & 12 deletions src/twisted/conch/insults/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,3 @@
Insults: a replacement for Curses/S-Lang.
Very basic at the moment."""

from twisted.python import deprecate, versions

deprecate.deprecatedModuleAttribute(
versions.Version("Twisted", 10, 1, 0),
"Please use twisted.conch.insults.helper instead.",
__name__, "colors")

deprecate.deprecatedModuleAttribute(
versions.Version("Twisted", 10, 1, 0),
"Please use twisted.conch.insults.insults instead.",
__name__, "client")
140 changes: 0 additions & 140 deletions src/twisted/conch/insults/client.py

This file was deleted.

29 changes: 0 additions & 29 deletions src/twisted/conch/insults/colors.py

This file was deleted.

38 changes: 0 additions & 38 deletions src/twisted/conch/test/test_insults.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.

from twisted.python.reflect import namedAny
from twisted.trial import unittest
from twisted.test.proto_helpers import StringTransport

Expand Down Expand Up @@ -934,40 +933,3 @@ def test_reportCursorPosition(self):
self.protocol.reportCursorPosition()
self.assertEqual(self.transport.value(),
self.CSI + b'6' + CSFinalByte.DSR.value)




class DeprecationsTests(unittest.TestCase):
"""
Tests to ensure deprecation of L{insults.colors} and L{insults.client}
"""

def ensureDeprecated(self, message):
"""
Ensures that the correct deprecation warning was issued.
"""
warnings = self.flushWarnings()
self.assertIs(warnings[0]['category'], DeprecationWarning)
self.assertEqual(warnings[0]['message'], message)
self.assertEqual(len(warnings), 1)


def test_colors(self):
"""
The L{insults.colors} module is deprecated
"""
namedAny('twisted.conch.insults.colors')
self.ensureDeprecated("twisted.conch.insults.colors was deprecated "
"in Twisted 10.1.0: Please use "
"twisted.conch.insults.helper instead.")


def test_client(self):
"""
The L{insults.client} module is deprecated
"""
namedAny('twisted.conch.insults.client')
self.ensureDeprecated("twisted.conch.insults.client was deprecated "
"in Twisted 10.1.0: Please use "
"twisted.conch.insults.insults instead.")
1 change: 1 addition & 0 deletions src/twisted/newsfragments/9603.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
twisted.conch.insults.client and twisted.conch.insults.colors, deprecated since Twisted 10.1, have been removed.

0 comments on commit be8a1e8

Please sign in to comment.