29 Mar 2019
Rely on importlib_metadata for loading version from metadata. Removes implicit dependency on setuptools and pkg_resources.
#158: The AsyncIO server now accepts a connection factory to enable features like SSL and IPv6 support.
SimpleIRCClientnow has a
dccmethod for initiating and associating a DCCConnection object with the client.
DCCConnection.listennow accepts a
SimpleIRCClient.dcc_connectin favor of the better separation of concerns. Clients should replace:
client.dcc_connect(addr, port, type) client.dcc_listen(type)
client.dcc(type).connect(addr, port) client.dcc(type).listen()
21 Oct 2018
irc.buffermodule, deprecated in 14.2.
#153: Drop support for Python 3.3 and 2.7.
01 Aug 2018
Long Term Service release for Python 2.7.
AioConnection.connectmoved to coroutine, added disconnect handling for AsyncIO.
20 May 2018
06 Mar 2018
Package refresh and cleanup.
29 Oct 2017
Connection.transmit_encodingto enable encodings other than UTF-8 to be used when transmitting text.
23 Jun 2017
Reactoras introduced in 15.0.
Fixed link in README.
19 Apr 2017
send_itemsmethod takes star args for simplicity in the syntax and usage.
19 Apr 2017
ServerConnection.send_items, consolidating common behavior across many methods previously calling
12 Sep 2016
Deprecated calls to Connection.execute_* and Reactor.execute_*. Instead, call the equivalently-named methods on the reactor’s scheduler.
12 Sep 2016
The event scheduling functionality has been decoupled from the client.Reactor object. Now the reactor will construct a Scheduler from the scheduler_class property, which must be an instance of irc.schedule.IScheduler.
_on_scheduleparameter is no longer accepted to the Reactor class. Implementations requiring a signal during scheduling should hook into the
addmethod of the relevant scheduler class.
Moved the underlying scheduler implementation to tempora, allowing it to be re-used for other purposes.
11 Jun 2016
Issue #98: Add an ugly hack to force
build_sphinxcommand to have the requisite libraries to build module documentation.
11 Jun 2016
28 Feb 2016
SingleServerIRCBotnow accepts a
reconparameter implementing a ReconnectStrategy. The new default strategy is ExponentialBackoff, implementing an exponential backoff with jitter. The
reconnection_intervalparameter is now deprecated but retained for compatibility. To customize the minimum time before reconnect, create a custom ExponentialBackoff instance or create another ReconnectStrategy object and pass that as the
reconnection_intervalparameter will be removed in future versions.
Issue #82: The
ExponentialBackoffimplementation now protects from multiple scheduled reconnects, avoiding the issue where reconnect attempts accumulate exponentially when the bot is immediately disconnected by the server.
15 Feb 2016
Dropped deprecated constructor
connection.Factory.from_legacy_params. Use the natural constructor instead.
connection.Factoryno longer attempts to bind before connect unless a bind address is specified.
31 Dec 2015
Now remove mode for owners, halfops, and admins when the user is removed from a channel.
Refactored the Channel class implementation for cleaner, less repetitive code.
Expanded tests coverage for Channel class.
31 Dec 2015
Issue #75: In
irc.bot, add support for tracking admin status (mode ‘a’) in channels. Use
channel.adminsto identify admin users for a channel.
Removed deprecated irc.logging module.
20 Nov 2015
Moved hosting to github.
04 Oct 2015
Issue #67: Fix infinite recursion for
21 Aug 2015
schedulemodule to properly support timezone aware times and use them by default. Clients that rely on the timezone naïve datetimes may restore the old behavior by overriding the
schedule.from_timestampfunctions like so:
schedule.from_timestamp = datetime.datetime.fromtimestamp schedule.now = datetime.datetime.now
Clients that were previously patching
schedule.DelayedCommand.nowwill need to instead patch the aforementioned module-global methods. The classmethod technique was a poor interface for effectively controlling timezone awareness, so was likely unused. Please file a ticket with the project for support with your client as needed.
01 Jul 2015
Bump to jaraco.functools 1.5 to throttler failures in Python 2.
25 May 2015
25 Apr 2015
28 Feb 2015
Remove changelog from package metadata.
25 Feb 2015
Remove dependency on jaraco.util. Instead depend on surgical packages.
irc.loggingin favor of
Dropped support for Python 3.2.
18 Feb 2015
Decoding errors now log a warning giving a reference to the
Decoding Inputsection of the readme.
15 Nov 2014
irc.client.Reactor. Reactor better reflects the implementation as a reactor pattern <. This name makes it’s function much more clear and inline with standard terminology.
irclibobjproperties from Connection. Use
13 Nov 2014
ServerConnection.as_nick, a context manager to set a nick for the duration of the context.
27 Oct 2014
Dropped support for Python 2.6.
irc.client.Manifoldto provide a clearer name for that object. Clients supporting 8.6 and later can use the
Manifoldname. Latest clients must use the
manifold. The property is still exposed as
irclibobjfor compatibility but will be removed in a future version.
Added extra numerics for ‘whoisaccount’ and ‘cannotknock’.
22 Oct 2014
25 Apr 2014
24 Apr 2014
Issue #34: Introduced
buffer.LenientDecodingLineBufferfor handling input in a more lenient way, preferring UTF-8 but falling back to latin-1 if the content cannot be decoded as UTF-8. To enable it by default for your application, set it as the default decoder:
irc.client.ServerConnection.buffer_class = irc.buffer.LenientDecodingLineBuffer
21 Apr 2014
Introduced ‘Manifold’ as an alias for irc.client.IRC. This better name will replace the IRC name in a future version.
Introduced the ‘manifold’ property of SimpleIRCClient as an alias for ircobj.
Added ‘manifold_class’ property to the client.SimpleIRCClient to allow consumers to provide a customized Manifold.
17 Nov 2013
16 Aug 2013
Fix timestamp support in
10 Aug 2013
19 Jul 2013
17 Jul 2013
Issue #22: Catch error in bot.py on NAMREPLY when nick is not in any visible channel.
04 Jul 2013
Fixed encoding errors in server on Python 3.
22 Apr 2013
set_keepalivemethod to the ServerConnection. Sends a periodic PING message every indicated interval.
14 Apr 2013
Added support for throttling send_raw messages via the ServerConnection object. For example, on any connection object:
That would set the rate limit to 30 Hz (30 per second). Thanks to Jason Kendall for the suggestion and bug fixes.
12 Apr 2013
Fix typo in client.NickMask.
04 Apr 2013
Fix typo in bot.py.
02 Apr 2013
Issue #15: Added client support for ISUPPORT directives on server connections. Now, each ServerConnection has a features attribute which reflects the features supported by the server. See the docs for irc.features for details about the implementation.
11 Feb 2013
Issue #14: Fix errors when handlers of the same priority are added under Python 3. This also fixes the unintended behavior of allowing handlers of the same priority to compare as unequal.
12 Jan 2013
This release brings several backward-incompatible changes to the scheduled commands.
Refactored implementation of schedule classes. No longer do they override the datetime constructor, but now only provide suitable classmethods for construction in various forms.
Removed backward-compatible references from irc.client.
Remove ‘arguments’ parameter from scheduled commands.
Clients that reference the schedule classes from irc.client or that construct them from the basic constructor will need to update to use the new class methods:
- DelayedCommand -> DelayedCommand.after - PeriodicCommand -> PeriodicCommand.after
Arguments may no longer be passed to the ‘function’ callback, but one is encouraged instead to use functools.partial to attach parameters to the callback. For example:
DelayedCommand.after(3, func, ('a', 10))
func = functools.partial(func, 'a', 10) DelayedCommand.after(3, func)
This mode puts less constraints on the both the handler and the caller. For example, a caller can now pass keyword arguments instead:
func = functools.partial(func, name='a', quantity=10) DelayedCommand.after(3, func)
Readability, maintainability, and usability go up.
12 Jan 2013
Issue #13: TypeError on Python 3 when constructing PeriodicCommand (and thus execute_every).
05 Jan 2013
Fixed regression created in 7.0 where PeriodicCommandFixedDelay would only cause the first command to be scheduled, but not subsequent ones.
04 Jan 2013
Moved scheduled command classes to irc.schedule module. Kept references for backwards-compatibility.
01 Jan 2013
PeriodicCommand now raises a ValueError if it’s created with a negative or zero delay (meaning all subsequent commands are immediately due). This fixes #12.
Renamed the parameters to the IRC object. If you use a custom event loop and your code constructs the IRC object with keyword parameters, you will need to update your code to use the new names, so:
IRC(fn_to_add_socket=adder, fn_to_remove_socket=remover, fn_to_add_timeout=timeout)
IRC(on_connect=adder, on_disconnect=remover, on_schedule=timeout)
If you don’t use a custom event loop or you pass the parameters positionally, no change is necessary.
29 Dec 2012
Fixed some unhandled exceptions in server client connections when the client would disconnect in response to messages sent after select was called.
28 Dec 2012
Moved LineBuffer and DecodingLineBuffer from client to buffer module. Backward-compatible references have been kept for now.
Removed daemon mode and log-to-file options for server.
Miscellaneous bugfixes in server.
25 Dec 2012
The IRC library is now licensed under the MIT license.
Added irc/server.py, based on hircd by Ferry Boender.
Added support for CAP command (pull request #10), thanks to Danneh Oaks.
15 Nov 2012
Another backward-incompatible change. In irc 5.0, many of the unnecessary getter functions have been removed and replaced with simple attributes. This change addresses issue #2. In particular:
Connection._get_socket() -> Connection.socket (including subclasses)
Event.eventtype() -> Event.type
Event.source() -> Event.source
Event.target() -> Event.target
Event.arguments() -> Event.arguments
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.
15 Nov 2012
Removed deprecated arguments to ServerConnection.connect. See notes on the 3.3 release on how to use the connect_factory parameter if your application requires ssl, ipv6, or other connection customization.
15 Nov 2012
Filter out disconnected sockets when processing input.
08 Nov 2012
Created two new exceptions in irc.client: MessageTooLong and InvalidCharacters.
Use explicit exceptions instead of ValueError when sending data.
06 Nov 2012
SingleServerIRCBot now accepts keyword arguments which are passed through to the ServerConnection.connect method. One can use this to use SSL for connections:
factory = irc.connection.Factory(wrapper=ssl.wrap_socket) bot = irc.bot.SingleServerIRCBot(..., connect_factory = factory)
25 Oct 2012
22 Oct 2012
3.4 never worked - the decoding customization feature was improperly implemented and never tested.
The ServerConnection now allows custom classes to be supplied to customize the decoding of incoming lines. For example, to disable the decoding of incoming lines, replace the buffer_class on the ServerConnection with a version that passes through the lines directly:
irc.client.ServerConnection.buffer_class = irc.client.LineBuffer
This fixes #5.
18 Oct 2012
17 Oct 2012
Added connection module with a Factory for creating socket connections.
Added connect_factory parameter to the ServerConnection.
It’s now possible to create connections with custom SSL parameters or other socket wrappers. For example, to create a connection with a custom SSL cert:
import ssl import irc.client import irc.connection import functools irc = irc.client.IRC() server = irc.server() wrapper = functools.partial(ssl.wrap_socket, ssl_cert=my_cert()) server.connect(connect_factory = irc.connection.Factory(wrapper=wrapper))
With this release, many of the parameters to ServerConnection.connect are now deprecated:
Instead, one should pass the appropriate values to a connection.Factory instance and pass that factory to the .connect method. Backwards-compatibility will be maintained for these parameters until the release of irc 4.0.
14 Oct 2012
Restore Python 2.6 compatibility.
11 Oct 2012
Protect from UnicodeDecodeError when decoding data on the wire when data is not properly encoded in ASCII or UTF-8.
11 Oct 2012
Additional branch protected by mutex.
09 Oct 2012
Implemented thread safety via a reentrant lock guarding shared state in IRC objects.
07 Oct 2012
Fix some issues with bytes/unicode on Python 3
07 Oct 2012
Distribute using setuptools rather than paver.
Minor tweaks for Python 3 support. Now installs on Python 3.
29 Sep 2012
Added error checking when sending a message - for both message length and embedded carriage returns. Fixes #4.
05 Sep 2012
Improved Unicode support. Fixes failing tests and errors lowering Unicode channel names.
Sourceforge 18 - The ServerConnection and DCCConnection now encode any strings as UTF-8 before transmitting.
Sourceforge 17 - Updated strings.FoldedCase to support comparison against objects of other types.
Shutdown the sockets before closing.
Applications that are currently encoding unicode as UTF-8 before passing the strings to ServerConnection.send_raw need to be updated to send Unicode or ASCII.
05 Sep 2012
This release officially deprecates 2.0.1-2.0.3 in favor of 3.0.
Re-release of irc 2.0 (without the changes from 2.0.1-2.0.3) for correct compatibility indication.
22 May 2012
DelayedCommands now use the local time for calculating ‘at’ and ‘due’ times. This will be more friendly for simple servers. Servers that expect UTC times should either run in UTC or override DelayedCommand.now to return an appropriate time object for ‘now’. For example:
def startup_bot(): irc.client.DelayedCommand.now = irc.client.DelayedCommand.utcnow ...
11 May 2012
Added irc.client.PeriodicCommandFixedDelay. Schedule this command to have a function executed at a specific time and then at periodic intervals thereafter.
10 May 2012
Removed irclib and ircbot legacy modules.
02 May 2012
18 Apr 2012
Moved functionality from irclib module to irc.client module.
Moved functionality from ircbot module to irc.bot module.
Retained irclib and ircbot modules for backward-compatibility. These will be removed in 1.0.
Renamed project to simply ‘irc’.
To support the new module structure, simply replace references to the irclib module with irc.client and ircbot module with irc.bot. This project will support that interface through all versions of irc 1.x, so if you’ve made these changes, you can safely depend on irc >= 0.7, <2.0dev.
16 Apr 2012
Fixed failing test where DelayedCommands weren’t being sorted properly. DelayedCommand a now subclass of the DateTime object, where the command’s due time is the datetime. Fixed issue Sourceforge 15.
15 Apr 2012
Fixed incorrect usage of Connection.execute_delayed (again).