Skip to content

Commit

Permalink
Remove deprecated methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed May 25, 2017
1 parent 4cf73df commit 6dc684d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 58 deletions.
6 changes: 6 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
16.0
====

* Removed deprecated ``execute_*`` methods on ``Connection``
and ``Reactor`` as introduced in 15.0.

15.1.1
======

Expand Down
58 changes: 0 additions & 58 deletions irc/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,52 +320,6 @@ def remove_global_handler(self, event, handler):
self.handlers[event].remove(h)
return 1

def execute_at(self, at, function, arguments=()):
"""Execute a function at a specified time.
Arguments:
at -- Execute at this time (a standard Unix timestamp).
function -- Function to call.
arguments -- Arguments to give the function.
"""
warnings.warn(
"Call Reactor.scheduler.execute_at directly",
DeprecationWarning,
)
function = functools.partial(function, *arguments)
self.scheduler.execute_at(at, function)

def execute_delayed(self, delay, function, arguments=()):
"""
Execute a function after a specified time.
delay -- How many seconds to wait.
function -- Function to call.
arguments -- Arguments to give the function.
"""
warnings.warn(
"Call Reactor.scheduler.execute_after directly",
DeprecationWarning,
)
function = functools.partial(function, *arguments)
self.scheduler.execute_after(delay, function)

def execute_every(self, period, function, arguments=()):
"""
Execute a function every 'period' seconds.
period -- How often to run (always waits this long for first).
function -- Function to call.
arguments -- Arguments to give the function.
"""
warnings.warn(
"Call Reactor.scheduler.execute_every directly",
DeprecationWarning,
)
function = functools.partial(function, *arguments)
self.scheduler.execute_every(period, function)

def dcc(self, dcctype="chat"):
"""Creates and returns a DCCConnection object.
Expand Down Expand Up @@ -419,18 +373,6 @@ def socket(self):
def __init__(self, reactor):
self.reactor = reactor

##############################
### Convenience wrappers - deprecated; do not use

def execute_at(self, at, function, arguments=()):
self.reactor.execute_at(at, function, arguments)

def execute_delayed(self, delay, function, arguments=()):
self.reactor.execute_delayed(delay, function, arguments)

def execute_every(self, period, function, arguments=()):
self.reactor.execute_every(period, function, arguments)


class ServerConnectionError(IRCError):
pass
Expand Down

0 comments on commit 6dc684d

Please sign in to comment.