3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 01:09:22 +01:00

utils: remove deprecated is* functions

This commit is contained in:
James Lu 2018-06-11 23:48:12 -07:00
parent a30921eeb8
commit ed5d46e28a
2 changed files with 0 additions and 38 deletions

View File

@ -1543,8 +1543,6 @@ class PyLinkNetworkCoreWithUtils(PyLinkNetworkCore):
# This is protocol specific, so stub it here in the base class. # This is protocol specific, so stub it here in the base class.
raise NotImplementedError raise NotImplementedError
utils._proto_utils_class = PyLinkNetworkCoreWithUtils # Used by compatibility wrappers
class IRCNetwork(PyLinkNetworkCoreWithUtils): class IRCNetwork(PyLinkNetworkCoreWithUtils):
S2S_BUFSIZE = 510 S2S_BUFSIZE = 510

View File

@ -21,7 +21,6 @@ from pylinkirc import protocols, plugins
PLUGIN_PREFIX = plugins.__name__ + '.' PLUGIN_PREFIX = plugins.__name__ + '.'
PROTOCOL_PREFIX = protocols.__name__ + '.' PROTOCOL_PREFIX = protocols.__name__ + '.'
NORMALIZEWHITESPACE_RE = re.compile(r'\s+') NORMALIZEWHITESPACE_RE = re.compile(r'\s+')
_proto_utils_class = None # Set by classes.py when loaded
class NotAuthorizedError(Exception): class NotAuthorizedError(Exception):
""" """
@ -55,41 +54,6 @@ def add_hook(func, command, priority=100):
world.hooks[command].sort(key=lambda pair: pair[0], reverse=True) world.hooks[command].sort(key=lambda pair: pair[0], reverse=True)
return func return func
# DEPRECATED
def isNick(s, nicklen=None):
"""Returns whether the string given is a valid nick.
Deprecated since 2.0: use irc.is_nick() instead."""
log.warning('utils.isNick() is deprecated since PyLink 2.0, use irc.is_nick() instead.')
return _proto_utils_class.is_nick(s, nicklen=nicklen)
# DEPRECATED
def isChannel(s):
"""Returns whether the string given is a valid channel name.
Deprecated since 2.0: use irc.is_channel() instead."""
log.warning('utils.isChannel() is deprecated since PyLink 2.0, use irc.is_channel() instead.')
return _proto_utils_class.is_channel(s)
# DEPRECATED
def isServerName(s):
"""Returns whether the string given is a valid server name.
Deprecated since 2.0: use irc.is_server_name() instead."""
log.warning('utils.isServerName() is deprecated since PyLink 2.0, use irc.is_server_name() instead.')
return _proto_utils_class.is_server_name(s)
# DEPRECATED
def isHostmask(text):
"""Returns whether the given text is a valid hostmask.
Deprecated since 2.0: use irc.is_hostmask() instead."""
log.warning('utils.isHostmask() is deprecated since PyLink 2.0, use irc.is_hostmask() instead.')
return _proto_utils_class.is_hostmask(text)
def expand_path(path): def expand_path(path):
""" """
Returns a path expanded with environment variables and home folders (~) expanded, in that order.""" Returns a path expanded with environment variables and home folders (~) expanded, in that order."""