commit python-pydle for openSUSE:Factory
![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community, here is the log from the commit of package python-pydle for openSUSE:Factory checked in at 2018-06-29 22:36:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pydle (Old) and /work/SRC/openSUSE:Factory/.python-pydle.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-pydle" Fri Jun 29 22:36:21 2018 rev:2 rq:619655 version:0.8.4 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pydle/python-pydle.changes 2017-12-11 18:56:22.854910491 +0100 +++ /work/SRC/openSUSE:Factory/.python-pydle.new/python-pydle.changes 2018-06-29 22:36:23.522002258 +0200 @@ -1,0 +2,11 @@ +Fri Jun 29 00:53:04 UTC 2018 - 9+suse@cirno.systems + +- Update to version 0.8.4 + * Explicit dependency on python-tornado 4.5.3 -- Future versions + of pydle will use asyncio instead, hence no effort is being + made to support newer versions of Tornado. + * Normalize everything related to whois/whowas + * Fix typo where self.channels was using the self.users dict + * Fix reconnecting + +------------------------------------------------------------------- Old: ---- pydle-0.8.3.tar.gz New: ---- pydle-0.8.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pydle.spec ++++++ --- /var/tmp/diff_new_pack.6akeKY/_old 2018-06-29 22:36:23.882001946 +0200 +++ /var/tmp/diff_new_pack.6akeKY/_new 2018-06-29 22:36:23.882001946 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-pydle # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,7 +20,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without test Name: python-pydle -Version: 0.8.3 +Version: 0.8.4 Release: 0 Summary: Modular, callback-based IRCv3 library for Python 3 License: BSD-3-Clause @@ -33,7 +33,7 @@ BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-pure-sasl -Requires: python-tornado +Requires: python-tornado == 4.5.3 BuildArch: noarch %python_subpackages ++++++ pydle-0.8.3.tar.gz -> pydle-0.8.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pydle-0.8.3/PKG-INFO new/pydle-0.8.4/PKG-INFO --- old/pydle-0.8.3/PKG-INFO 2016-12-20 17:28:57.000000000 +0100 +++ new/pydle-0.8.4/PKG-INFO 2018-06-29 02:07:30.000000000 +0200 @@ -1,6 +1,6 @@ -Metadata-Version: 1.0 +Metadata-Version: 2.1 Name: pydle -Version: 0.8.3 +Version: 0.8.4 Summary: A compact, flexible and standards-abiding IRC library for Python 3. Home-page: https://github.com/Shizmob/pydle Author: Shiz @@ -9,3 +9,7 @@ Description: UNKNOWN Keywords: irc library python3 compact flexible Platform: UNKNOWN +Provides-Extra: coverage +Provides-Extra: sasl +Provides-Extra: tests +Provides-Extra: docs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pydle-0.8.3/README.md new/pydle-0.8.4/README.md --- old/pydle-0.8.3/README.md 1970-01-01 01:00:00.000000000 +0100 +++ new/pydle-0.8.4/README.md 2016-12-20 17:21:49.000000000 +0100 @@ -0,0 +1,98 @@ +pydle +===== +Python IRC library. +------------------- + +pydle is a compact, flexible and standards-abiding IRC library for Python 3. + +Features +-------- +* Well-organized: Thanks to the modularized feature system, it's not hard to find what you're looking for in the well-organized source code. +* Standards-abiding: Based on [RFC1459](https://tools.ietf.org/html/rfc1459.html) with some small extension tweaks, with full support of optional extension standards: + - [TLS](http://tools.ietf.org/html/rfc5246) + - [CTCP](http://www.irchelp.org/irchelp/rfc/ctcpspec.html) + - (coming soon) [DCC](http://www.irchelp.org/irchelp/rfc/dccspec.html) and extensions + - [ISUPPORT/PROTOCTL](http://tools.ietf.org/html/draft-hardy-irc-isupport-00) + - [IRCv3.1](http://ircv3.org/) (full) + - [IRCv3.2](http://ircv3.org) (base only, in progress) +* Callback-based: IRC is an asynchronous protocol and so should a library that implements it be. Callbacks are used to process events from the server. +* Modularised and extensible: Features on top of RFC1459 are implemented as seperate modules for a user to pick and choose, and write their own. Broad features are written to be as extensible as possible. +* Liberally licensed: The 3-clause BSD license ensures you can use it everywhere. + +Basic Usage +----------- +`python3 setup.py install` + +From there, you can `import pydle` and subclass `pydle.Client` for your own functionality. + +Setting a nickname and starting a connection over TLS: +```python +import pydle + +# Simple echo bot. +class MyOwnBot(pydle.Client): + def on_connect(self): + self.join('#bottest') + + def on_message(self, source, target, message): + self.message(target, message) + +client = MyOwnBot('MyBot', realname='My Bot') +client.connect('irc.rizon.net', 6697, tls=True, tls_verify=False) +client.handle_forever() +``` + +*But wait, I want to handle multiple clients!* + +No worries! Use `pydle.ClientPool` like such: +```python +pool = pydle.ClientPool() +for i in range(10): + client = MyOwnBot('MyBot' + str(i)) + pool.connect(client, 'irc.rizon.net', 6697, tls=True, tls_verify=False) + +# This will make sure all clients are treated in a fair way priority-wise. +pool.handle_forever() +``` + +Customization +------------- + +If you want to customize bot features, you can subclass `pydle.BasicClient` and one or more features from `pydle.features` or your own feature classes, like such: +```python +# Only support RFC1459 (+small features), CTCP and our own ACME extension to IRC. +class MyFeaturedBot(pydle.features.ctcp.CTCPSupport, acme.ACMESupport, rfc1459.RFC1459Support): + pass +``` + +To create your own features, just subclass from `pydle.BasicClient` and start adding callbacks for IRC messages: +```python +# Support custom ACME extension. +class ACMESupport(pydle.BasicClient): + def on_raw_999(self, source, params): + """ ACME's custom 999 numeric tells us to change our nickname. """ + nickname = params[0] + self.set_nickname(nickname) +``` + +FAQ +--- + +**Q: When constructing my own client class from several base classes, I get the following error: _TypeError: Cannot create a consistent method resolution order (MRO) for bases X, Y, Z_. What causes this and how can I solve it?** + +Pydle's use of class inheritance as a feature model may cause method resolution order conflicts if a feature inherits from a different feature, while a class inherits from both the original feature and the inheriting feature. To solve such problem, pydle offers a `featurize` function that will automatically put all classes in the right order and create an appropriate base class: +```python +# Purposely mis-ordered base classes, as SASLSupport inherits from CapabilityNegotiationSupport, but everything works fine. +MyBase = pydle.featurize(pydle.features.CapabilityNegotiationSupport, pydle.features.SASLSupport) +class Client(MyBase): + pass +``` + +**Q: How do I...?** + +Stop! Read the [documentation](http://pydle.readthedocs.org) first. If you're still in need of support, join us on IRC! We hang at `#kochira` on `irc.freenode.net`. If someone is around, they'll most likely gladly help you. + +License +------- + +Pydle is licensed under the 3-clause BSD license. See LICENSE.md for details. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pydle-0.8.3/pydle/__init__.py new/pydle-0.8.4/pydle/__init__.py --- old/pydle-0.8.3/pydle/__init__.py 2016-12-20 17:26:33.000000000 +0100 +++ new/pydle-0.8.4/pydle/__init__.py 2018-06-29 02:04:07.000000000 +0200 @@ -5,8 +5,8 @@ from .features.ircv3.cap import NEGOTIATING as CAPABILITY_NEGOTIATING, FAILED as CAPABILITY_FAILED, NEGOTIATED as CAPABILITY_NEGOTIATED __name__ = 'pydle' -__version__ = '0.8.3' -__version_info__ = (0, 8, 3) +__version__ = '0.8.4' +__version_info__ = (0, 8, 4) __license__ = 'BSD' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pydle-0.8.3/pydle/client.py new/pydle-0.8.4/pydle/client.py --- old/pydle-0.8.3/pydle/client.py 2016-12-20 17:21:49.000000000 +0100 +++ new/pydle-0.8.4/pydle/client.py 2018-03-14 05:05:44.000000000 +0100 @@ -100,7 +100,10 @@ # Reset attributes and connect. if not reconnect: self._reset_connection_attributes() - self._connect(hostname=hostname, port=port, reconnect=reconnect, **kwargs) + try: + self._connect(hostname=hostname, port=port, reconnect=reconnect, **kwargs) + except OSError: + self.on_disconnect(expected=False) # Set logger name. if self.server_tag: @@ -363,7 +366,7 @@ def on_data(self, data): """ Handle received data. """ self._receive_buffer += data - + # Schedule new timeout event. self.eventloop.unschedule(self._ping_checker_handle) self._ping_checker_handle = self.eventloop.schedule_in(PING_TIMEOUT, self._perform_ping_timeout) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pydle-0.8.3/pydle/features/rfc1459/client.py new/pydle-0.8.4/pydle/features/rfc1459/client.py --- old/pydle-0.8.3/pydle/features/rfc1459/client.py 2016-12-20 17:21:49.000000000 +0100 +++ new/pydle-0.8.4/pydle/features/rfc1459/client.py 2018-03-14 05:05:44.000000000 +0100 @@ -19,6 +19,9 @@ def _reset_attributes(self): super()._reset_attributes() + # Casemapping. + self._case_mapping = protocol.DEFAULT_CASE_MAPPING + # Limitations. self._away_message_length_limit = None self._channel_length_limit = protocol.CHANNEL_LENGTH_LIMIT @@ -48,15 +51,14 @@ self._attempt_nicknames = self._nicknames[:] # Info. - self._pending['whois'] = {} - self._pending['whowas'] = {} - self._whois_info = {} - self._whowas_info = {} + self._pending['whois'] = parsing.NormalizingDict(case_mapping=self._case_mapping) + self._pending['whowas'] = parsing.NormalizingDict(case_mapping=self._case_mapping) + self._whois_info = parsing.NormalizingDict(case_mapping=self._case_mapping) + self._whowas_info = parsing.NormalizingDict(case_mapping=self._case_mapping) # Misc. self.motd = None - self._case_mapping = protocol.DEFAULT_CASE_MAPPING - self.channels = parsing.NormalizingDict(self.users, case_mapping=self._case_mapping) + self.channels = parsing.NormalizingDict(self.channels, case_mapping=self._case_mapping) self.users = parsing.NormalizingDict(self.users, case_mapping=self._case_mapping) def _reset_connection_attributes(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pydle-0.8.3/pydle.egg-info/PKG-INFO new/pydle-0.8.4/pydle.egg-info/PKG-INFO --- old/pydle-0.8.3/pydle.egg-info/PKG-INFO 2016-12-20 17:28:57.000000000 +0100 +++ new/pydle-0.8.4/pydle.egg-info/PKG-INFO 2018-06-29 02:07:30.000000000 +0200 @@ -1,6 +1,6 @@ -Metadata-Version: 1.0 +Metadata-Version: 2.1 Name: pydle -Version: 0.8.3 +Version: 0.8.4 Summary: A compact, flexible and standards-abiding IRC library for Python 3. Home-page: https://github.com/Shizmob/pydle Author: Shiz @@ -9,3 +9,7 @@ Description: UNKNOWN Keywords: irc library python3 compact flexible Platform: UNKNOWN +Provides-Extra: coverage +Provides-Extra: sasl +Provides-Extra: tests +Provides-Extra: docs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pydle-0.8.3/pydle.egg-info/SOURCES.txt new/pydle-0.8.4/pydle.egg-info/SOURCES.txt --- old/pydle-0.8.3/pydle.egg-info/SOURCES.txt 2016-12-20 17:28:57.000000000 +0100 +++ new/pydle-0.8.4/pydle.egg-info/SOURCES.txt 2018-06-29 02:07:30.000000000 +0200 @@ -1,3 +1,4 @@ +README.md setup.py pydle/__init__.py pydle/async.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pydle-0.8.3/pydle.egg-info/requires.txt new/pydle-0.8.4/pydle.egg-info/requires.txt --- old/pydle-0.8.3/pydle.egg-info/requires.txt 2016-12-20 17:28:57.000000000 +0100 +++ new/pydle-0.8.4/pydle.egg-info/requires.txt 2018-06-29 02:07:30.000000000 +0200 @@ -1,4 +1,4 @@ -tornado +tornado==4.5.3 [coverage] pytest-cov @@ -7,7 +7,7 @@ sphinx_rtd_theme [sasl] -pure-sasl >=0.1.6 +pure-sasl>=0.1.6 [tests] pytest diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pydle-0.8.3/setup.cfg new/pydle-0.8.4/setup.cfg --- old/pydle-0.8.3/setup.cfg 2016-12-20 17:28:57.000000000 +0100 +++ new/pydle-0.8.4/setup.cfg 2018-06-29 02:07:30.000000000 +0200 @@ -1,5 +1,4 @@ [egg_info] tag_build = tag_date = 0 -tag_svn_revision = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pydle-0.8.3/setup.py new/pydle-0.8.4/setup.py --- old/pydle-0.8.3/setup.py 2016-12-20 17:26:27.000000000 +0100 +++ new/pydle-0.8.4/setup.py 2018-06-29 02:04:11.000000000 +0200 @@ -2,7 +2,7 @@ setup( name='pydle', - version='0.8.3', + version='0.8.4', packages=[ 'pydle', 'pydle.features', @@ -10,7 +10,7 @@ 'pydle.features.ircv3', 'pydle.utils' ], - install_requires=['tornado'], + install_requires=['tornado==4.5.3'], extras_require={ 'sasl': 'pure-sasl >=0.1.6', # for pydle.features.sasl 'docs': 'sphinx_rtd_theme', # the Sphinx theme we use
participants (1)
-
root