diff --git a/src/twisted/python/compat.py b/src/twisted/python/compat.py index b0f5e0d0da8..cc59bc57778 100644 --- a/src/twisted/python/compat.py +++ b/src/twisted/python/compat.py @@ -566,6 +566,11 @@ def fromFDWithoutModifyingFlags(fd, family, type, proto=None): +deprecatedModuleAttribute( + Version('Twisted', 'NEXT', 0, 0), + "Use sys.intern() directly", + __name__, 'intern') + deprecatedModuleAttribute( Version('Twisted', 'NEXT', 0, 0), "Use collections.abc.Sequence directly", diff --git a/src/twisted/words/protocols/jabber/xmlstream.py b/src/twisted/words/protocols/jabber/xmlstream.py index 2d771185905..607d2ea415d 100644 --- a/src/twisted/words/protocols/jabber/xmlstream.py +++ b/src/twisted/words/protocols/jabber/xmlstream.py @@ -25,13 +25,13 @@ from binascii import hexlify from hashlib import sha1 +from sys import intern from typing import Optional, Tuple from zope.interface import directlyProvides, implementer from twisted.internet import defer, protocol from twisted.internet.error import ConnectionLost from twisted.python import failure, log, randbytes -from twisted.python.compat import intern from twisted.words.protocols.jabber import error, ijabber, jid from twisted.words.xish import domish, xmlstream from twisted.words.xish.xmlstream import STREAM_CONNECTED_EVENT diff --git a/src/twisted/words/xish/xmlstream.py b/src/twisted/words/xish/xmlstream.py index 7818e3c5dfb..1f809c771ad 100644 --- a/src/twisted/words/xish/xmlstream.py +++ b/src/twisted/words/xish/xmlstream.py @@ -32,9 +32,10 @@ """ +from sys import intern from typing import Type + from twisted.python import failure -from twisted.python.compat import intern from twisted.internet import protocol from twisted.words.xish import domish, utility