pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/chat/tootstream chat/tootstream: Add a patch removing ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6ed237b1df16
branches:  trunk
changeset: 311089:6ed237b1df16
user:      nia <nia%pkgsrc.org@localhost>
date:      Tue Jul 31 16:15:33 2018 +0000

description:
chat/tootstream: Add a patch removing the use of the 'async' keyword,
allowing it to be used with Python 3.7.

diffstat:

 chat/tootstream/Makefile                             |   3 +-
 chat/tootstream/distinfo                             |   3 +-
 chat/tootstream/patches/patch-src_tootstream_toot.py |  34 ++++++++++++++++++++
 3 files changed, 37 insertions(+), 3 deletions(-)

diffs (67 lines):

diff -r 1e5f011093b3 -r 6ed237b1df16 chat/tootstream/Makefile
--- a/chat/tootstream/Makefile  Tue Jul 31 16:14:29 2018 +0000
+++ b/chat/tootstream/Makefile  Tue Jul 31 16:15:33 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2018/07/31 15:55:16 nia Exp $
+# $NetBSD: Makefile,v 1.3 2018/07/31 16:15:33 nia Exp $
 
 DISTNAME=      tootstream-0.3.4
 CATEGORIES=    chat www
@@ -13,7 +13,6 @@
 USE_LANGUAGES= # none
 
 PYTHON_VERSIONS_INCOMPATIBLE+= 27
-PYTHON_VERSIONS_INCOMPATIBLE+= 37 # mastodon.py
 
 DEPENDS+=      ${PYPKGPREFIX}-click-[0-9]*:../../devel/py-click
 DEPENDS+=      ${PYPKGPREFIX}-colored-[0-9]*:../../textproc/py-colored
diff -r 1e5f011093b3 -r 6ed237b1df16 chat/tootstream/distinfo
--- a/chat/tootstream/distinfo  Tue Jul 31 16:14:29 2018 +0000
+++ b/chat/tootstream/distinfo  Tue Jul 31 16:15:33 2018 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.1 2018/07/26 20:24:48 nia Exp $
+$NetBSD: distinfo,v 1.2 2018/07/31 16:15:33 nia Exp $
 
 SHA1 (tootstream-0.3.4.tar.gz) = ebeb5d39aaa836a57c7e52a0b78678181afbd030
 RMD160 (tootstream-0.3.4.tar.gz) = 04e36ac3cbc6ab5ed4958b47bf90feb8ef32e519
 SHA512 (tootstream-0.3.4.tar.gz) = 261c8dc7bad6203c8df8781c2d9e4884f6e1e82228e32bf181b27d072541ecd4b2c29cfdd55643bf3eedd46b890c40e3570010974489a78e690bcbf6e398b6a2
 Size (tootstream-0.3.4.tar.gz) = 24627 bytes
+SHA1 (patch-src_tootstream_toot.py) = fb9c23183f6edee2f805f83d0b591dd4e4cc5956
diff -r 1e5f011093b3 -r 6ed237b1df16 chat/tootstream/patches/patch-src_tootstream_toot.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/chat/tootstream/patches/patch-src_tootstream_toot.py      Tue Jul 31 16:15:33 2018 +0000
@@ -0,0 +1,34 @@
+$NetBSD: patch-src_tootstream_toot.py,v 1.1 2018/07/31 16:15:33 nia Exp $
+
+'async' is a reserved keyword in Python 3.7.
+
+--- src/tootstream/toot.py.orig        2018-05-31 00:06:11.000000000 +0000
++++ src/tootstream/toot.py
+@@ -1279,11 +1279,11 @@ def stream(mastodon, rest):
+ 
+     try:
+         if rest == "home" or rest == "":
+-            handle = mastodon.stream_user(toot_listener, async=True)
++            handle = mastodon.stream_user(toot_listener, run_async=True)
+         elif rest == "fed" or rest == "public":
+-            handle = mastodon.stream_public(toot_listener, async=True)
++            handle = mastodon.stream_public(toot_listener, run_async=True)
+         elif rest == "local":
+-            handle = mastodon.stream_local(toot_listener, async=True)
++            handle = mastodon.stream_local(toot_listener, run_async=True)
+         elif rest.startswith('list'):
+             # Remove list from the rest string
+             items = rest.split('list ')
+@@ -1295,10 +1295,10 @@ def stream(mastodon, rest):
+                 cprint("List {} is not found".format(items[-1]), fg('red'))
+                 return
+ 
+-            handle = mastodon.stream_list(item, toot_listener, async=True)
++            handle = mastodon.stream_list(item, toot_listener, run_async=True)
+         elif rest.startswith('#'):
+             tag = rest[1:]
+-            handle = mastodon.stream_hashtag(tag, toot_listener, async=True)
++            handle = mastodon.stream_hashtag(tag, toot_listener, run_async=True)
+         else:
+             handle = None
+             print("Only 'home', 'fed', 'local', 'list', and '#hashtag' streams are supported.")



Home | Main Index | Thread Index | Old Index