Skip to content

Commit

Permalink
Deprecate compat.intern() and remove its uses
Browse files Browse the repository at this point in the history
  • Loading branch information
mthuurne committed Aug 27, 2020
1 parent 481a2b8 commit 7a2ce4d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/twisted/python/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/twisted/words/protocols/jabber/xmlstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/twisted/words/xish/xmlstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 7a2ce4d

Please sign in to comment.