Opened 6 years ago

Closed 6 years ago

#3580 task closed fixed (fixed)

deprecate twisted.words.protocols.toc

Reported by: exarkun Owned by:
Priority: normal Milestone:
Component: words Keywords:
Cc: Branch:
Author: Launchpad Bug:

Description

The AIM network no longer supports TOC clients. A TOC protocol implementation is almost useless. This module's docstring has claimed it is deprecated since 2002. Let's make that official with a deprecation warning.

Change History (4)

comment:1 Changed 6 years ago by exarkun

  • Keywords review added
  • Owner exarkun deleted

I dunno how to unit test module deprecations.

Index: twisted/words/protocols/toc.py
===================================================================
--- twisted/words/protocols/toc.py      (revision 25703)
+++ twisted/words/protocols/toc.py      (working copy)
@@ -2,7 +2,6 @@
 # Copyright (c) 2001-2005 Twisted Matrix Laboratories.
 # See LICENSE for details.
 
-
 """
 Implements a AOL Instant Messenger TOC server and client, using the Twisted
 framework.
@@ -16,6 +15,13 @@
 Maintainer: Paul Swartz
 """
 
+import warnings
+warnings.warn(
+    "twisted.words.protocols.toc is deprecated since Twisted 8.3.  "
+    "Use twisted.words.protocols.oscar instead.",
+    category=DeprecationWarning,
+    stacklevel=2)
+
 # twisted imports
 from twisted.internet import reactor, protocol
 from twisted.python import log

comment:2 Changed 6 years ago by therve

  • Keywords easy review removed
  • Owner set to exarkun

Fair enough. Can you mention Twisted 9.0 instead, though? Thanks.

comment:3 Changed 6 years ago by exarkun

  • Resolution set to fixed
  • Status changed from new to closed

(In [25789]) Apply twisted/words/protocols/toc.py deprecation patch

Author: exarkun
Reviewer: therve
Fixes: #3580

Formally deprecate twisted.words.protocols.toc, informally deprecated for seven
years already, and largely non-working and useless since AOL disabled TOC on their
AIM network.

comment:4 Changed 3 years ago by <automation>

  • Owner exarkun deleted
Note: See TracTickets for help on using tickets.