diff options
author | nia <nia@pkgsrc.org> | 2018-07-31 16:15:33 +0000 |
---|---|---|
committer | nia <nia@pkgsrc.org> | 2018-07-31 16:15:33 +0000 |
commit | f132d86a524157159b6a08b010beb3ac7f266358 (patch) | |
tree | f9b91c576ca7431a1874d7b4ebca95b78ccfb1ff | |
parent | ec46b8bd78f6e9dd59402ab69ec6659361d1923c (diff) | |
download | pkgsrc-f132d86a524157159b6a08b010beb3ac7f266358.tar.gz |
chat/tootstream: Add a patch removing the use of the 'async' keyword,
allowing it to be used with Python 3.7.
-rw-r--r-- | chat/tootstream/Makefile | 3 | ||||
-rw-r--r-- | chat/tootstream/distinfo | 3 | ||||
-rw-r--r-- | chat/tootstream/patches/patch-src_tootstream_toot.py | 34 |
3 files changed, 37 insertions, 3 deletions
diff --git a/chat/tootstream/Makefile b/chat/tootstream/Makefile index 6e8b7888f2c..59eb0bfceff 100644 --- a/chat/tootstream/Makefile +++ b/chat/tootstream/Makefile @@ -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 @@ EXTRACT_USING= bsdtar 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 --git a/chat/tootstream/distinfo b/chat/tootstream/distinfo index c2de2d404a6..bb7d25e7a8b 100644 --- a/chat/tootstream/distinfo +++ b/chat/tootstream/distinfo @@ -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 --git a/chat/tootstream/patches/patch-src_tootstream_toot.py b/chat/tootstream/patches/patch-src_tootstream_toot.py new file mode 100644 index 00000000000..5f9f6845fce --- /dev/null +++ b/chat/tootstream/patches/patch-src_tootstream_toot.py @@ -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.") |