Hello community,

here is the log from the commit of package python-pydle for openSUSE:Factory 
checked in at 2020-07-08 19:13:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pydle (Old)
 and      /work/SRC/openSUSE:Factory/.python-pydle.new.3060 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pydle"

Wed Jul  8 19:13:17 2020 rev:8 rq:819269 version:0.9.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pydle/python-pydle.changes        
2020-02-11 22:26:27.895602401 +0100
+++ /work/SRC/openSUSE:Factory/.python-pydle.new.3060/python-pydle.changes      
2020-07-08 19:13:39.067245331 +0200
@@ -1,0 +2,12 @@
+Tue Jul  7 16:06:37 UTC 2020 - Mia Herkt <[email protected]>
+
+- Enable unit tests
+- Update to version 0.9.4
+  Fixes:
+  * on_part will now be called prior to channel / user destruction
+  * disconnecting client pools should work again
+
+  New features:
+  * Add optional support for REPL_WHOISHOST, an UnrealIRCd feature.
+
+-------------------------------------------------------------------

Old:
----
  pydle-0.9.4rc1.tar.gz

New:
----
  pydle-0.9.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pydle.spec ++++++
--- /var/tmp/diff_new_pack.cdePWR/_old  2020-07-08 19:13:40.551250617 +0200
+++ /var/tmp/diff_new_pack.cdePWR/_new  2020-07-08 19:13:40.555250631 +0200
@@ -20,7 +20,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %bcond_without test
 Name:           python-pydle
-Version:        0.9.4rc1
+Version:        0.9.4
 Release:        0
 Summary:        Modular, callback-based IRCv3 library for Python 3
 License:        BSD-3-Clause
@@ -28,6 +28,7 @@
 URL:            https://github.com/Shizmob/pydle
 Source:         
https://github.com/Shizmob/pydle/archive/v%{version}.tar.gz#/pydle-%{version}.tar.gz
 Source1:        LICENSE.md
+BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  dos2unix
 BuildRequires:  fdupes
@@ -61,6 +62,9 @@
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 %python_expand chmod +x %{buildroot}%{$python_sitelib}/pydle/utils/irccat.py
 
+%check
+%pytest -m unit
+
 %files %{python_files}
 %license LICENSE.md
 %{python_sitelib}/*

++++++ pydle-0.9.4rc1.tar.gz -> pydle-0.9.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pydle-0.9.4rc1/docs/features/overview.rst 
new/pydle-0.9.4/docs/features/overview.rst
--- old/pydle-0.9.4rc1/docs/features/overview.rst       2020-02-10 
07:59:08.000000000 +0100
+++ new/pydle-0.9.4/docs/features/overview.rst  2020-06-15 00:43:59.000000000 
+0200
@@ -234,3 +234,22 @@
 Support for user and channel metadata.
 
 This allows you to set and unset arbitrary key-value information on yourself 
and on channels, as well as retrieve such values from other users and channels.
+
+==============
+IRCd implementation-specific features
+==============
+Optional features that for IRCds that have non-standard messages.
+
+UnrealIRCd
+==========
+Features implementation-specific to UnrealIRCd servers.
+
+RPL_WHOIS_HOST
+--------------
+*API:* :class:`pydle.features.rpl_whoishost.RplWhoisHostSupport`
+
+Support For `RPL_WHOIS_HOST` messages, this allows pydle to expose an IRC users
+real IP address and host, if the bot has access to that information.
+
+This information will fill in the `real_ip_address` and `real_hostname` fields
+of an :class:`pydle.Client.whois()` response.
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pydle-0.9.4rc1/pydle/client.py 
new/pydle-0.9.4/pydle/client.py
--- old/pydle-0.9.4rc1/pydle/client.py  2020-02-10 07:59:08.000000000 +0100
+++ new/pydle-0.9.4/pydle/client.py     2020-06-15 00:43:59.000000000 +0200
@@ -469,7 +469,7 @@
         """ Remove client from pool. """
         self.clients.remove(client)
         del self.connect_args[client]
-        client.disconnect()
+        asyncio.run_coroutine_threadsafe(client.disconnect(expected=True), 
self.eventloop)
 
     def __contains__(self, item):
         return item in self.clients
@@ -491,6 +491,3 @@
 
         # run the clients
         self.eventloop.run_forever()
-
-        for client in self.clients:
-            client.disconnect()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pydle-0.9.4rc1/pydle/features/rfc1459/client.py 
new/pydle-0.9.4/pydle/features/rfc1459/client.py
--- old/pydle-0.9.4rc1/pydle/features/rfc1459/client.py 2020-02-10 
07:59:08.000000000 +0100
+++ new/pydle-0.9.4/pydle/features/rfc1459/client.py    2020-06-15 
00:43:59.000000000 +0200
@@ -689,13 +689,13 @@
             # We left the channel. Remove from channel list. :(
             for channel in channels:
                 if self.in_channel(channel):
-                    self._destroy_channel(channel)
                     await self.on_part(channel, nick, reason)
+                    self._destroy_channel(channel)
         else:
             # Someone else left. Remove them.
             for channel in channels:
-                self._destroy_user(nick, channel)
                 await self.on_part(channel, nick, reason)
+                self._destroy_user(nick, channel)
 
     async def on_raw_ping(self, message):
         """ PING command. """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pydle-0.9.4rc1/pydle/features/rpl_whoishost/__init__.py 
new/pydle-0.9.4/pydle/features/rpl_whoishost/__init__.py
--- old/pydle-0.9.4rc1/pydle/features/rpl_whoishost/__init__.py 1970-01-01 
01:00:00.000000000 +0100
+++ new/pydle-0.9.4/pydle/features/rpl_whoishost/__init__.py    2020-06-15 
00:43:59.000000000 +0200
@@ -0,0 +1,6 @@
+"""
+Adds support for RPL_WHOISHOST (reply type 378)
+"""
+from .rpl_whoishost import RplWhoisHostSupport
+
+__all__ = ["RplWhoisHostSupport"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pydle-0.9.4rc1/pydle/features/rpl_whoishost/rpl_whoishost.py 
new/pydle-0.9.4/pydle/features/rpl_whoishost/rpl_whoishost.py
--- old/pydle-0.9.4rc1/pydle/features/rpl_whoishost/rpl_whoishost.py    
1970-01-01 01:00:00.000000000 +0100
+++ new/pydle-0.9.4/pydle/features/rpl_whoishost/rpl_whoishost.py       
2020-06-15 00:43:59.000000000 +0200
@@ -0,0 +1,25 @@
+from pydle.features.rfc1459 import RFC1459Support
+
+
+class RplWhoisHostSupport(RFC1459Support):
+    """ Adds support for RPL_WHOISHOST messages (378) """
+
+    async def on_raw_378(self, message):
+        """ handles a RPL_WHOISHOST message """
+        _, target, data = message.params
+        data = data.split(" ")
+        target = message.params[1]
+        ip_addr = data[-1]
+        host = data[-2]
+
+        meta = {"real_ip_address": ip_addr, "real_hostname": host}
+        self._sync_user(target, meta)
+        if target in self._whois_info:
+            self._whois_info[target]["real_ip_address"] = ip_addr
+            self._whois_info[target]["real_hostname"] = host
+
+    async def whois(self, nickname):
+        info = await super().whois(nickname)
+        info.setdefault("real_ip_address", None)
+        info.setdefault("real_hostname", None)
+        return info
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pydle-0.9.4rc1/setup.py new/pydle-0.9.4/setup.py
--- old/pydle-0.9.4rc1/setup.py 2020-02-10 07:59:08.000000000 +0100
+++ new/pydle-0.9.4/setup.py    2020-06-15 00:43:59.000000000 +0200
@@ -2,11 +2,12 @@
 
 setup(
     name='pydle',
-    version='0.9.4rc1',
+    version='0.9.4',
     python_requires=">=3.5",
     packages=[
         'pydle',
         'pydle.features',
+        'pydle.features.rpl_whoishost',
         'pydle.features.rfc1459',
         'pydle.features.ircv3',
         'pydle.utils'


Reply via email to