Jason R. Coombs avatar Jason R. Coombs committed 58959ad

Removed backward-compatibility function aliases

Comments (0)

Files changed (3)

 The `nm_to_*` functions were removed. Instead, use the NickMask class
 attributes.
 
+These deprecated function aliases were removed from irc.client::
+
+ - parse_nick_modes -> modes.parse_nick_modes
+ - parse_channel_modes -> modes.parse_channel_modes
+ - generated_events -> events.generated
+ - protocol_events -> events.protocol
+ - numeric_events -> events.numeric
+ - all_events -> events.all
+ - irc_lower -> strings.lower
+
 Also, the parameter name when constructing an event was renamed from
 `eventtype` to simply `type`.
 
 def _ping_ponger(connection, event):
     "A global handler for the 'ping' event"
     connection.pong(event.target)
-
-# for backward compatibility
-parse_nick_modes = modes.parse_nick_modes
-parse_channel_modes = modes.parse_channel_modes
-
-generated_events = events.generated
-protocol_events = events.protocol
-numeric_events = events.numeric
-all_events = events.all
-
-irc_lower = strings.lower

scripts/testbot.py

 """
 
 import irc.bot
-from irc.client import irc_lower, ip_numstr_to_quad, ip_quad_to_numstr
+import irc.strings
+from irc.client import ip_numstr_to_quad, ip_quad_to_numstr
 
 class TestBot(irc.bot.SingleServerIRCBot):
     def __init__(self, channel, nickname, server, port=6667):
 
     def on_pubmsg(self, c, e):
         a = e.arguments[0].split(":", 1)
-        if len(a) > 1 and irc_lower(a[0]) == irc_lower(self.connection.get_nickname()):
+        if len(a) > 1 and irc.strings.lower(a[0]) == irc.strings.lower(self.connection.get_nickname()):
             self.do_command(e, a[1].strip())
         return
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.