Don't parse requirements. Don't use 'async', which got promoted to

keyword in Python 3.7. Bump revision.
This commit is contained in:
joerg 2020-02-24 00:02:59 +00:00
parent 2d49c76392
commit bcb184b9eb
5 changed files with 130 additions and 4 deletions

View file

@ -1,7 +1,8 @@
# $NetBSD: Makefile,v 1.7 2018/01/07 21:01:28 joerg Exp $
# $NetBSD: Makefile,v 1.8 2020/02/24 00:02:59 joerg Exp $
DISTNAME= tweepy-3.5.0
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
PKGREVISION= 1
CATEGORIES= net python
MASTER_SITES= ${MASTER_SITE_PYPI:=t/tweepy/}

View file

@ -1,8 +1,7 @@
@comment $NetBSD: PLIST,v 1.2 2017/10/14 10:23:01 adam Exp $
@comment $NetBSD: PLIST,v 1.3 2020/02/24 00:02:59 joerg Exp $
${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
${PYSITELIB}/${EGG_INFODIR}/requires.txt
${PYSITELIB}/${EGG_INFODIR}/top_level.txt
${PYSITELIB}/${EGG_INFODIR}/zip-safe
${PYSITELIB}/examples/__init__.py

View file

@ -1,6 +1,8 @@
$NetBSD: distinfo,v 1.3 2017/10/14 10:23:01 adam Exp $
$NetBSD: distinfo,v 1.4 2020/02/24 00:02:59 joerg Exp $
SHA1 (tweepy-3.5.0.tar.gz) = 572ab73540ac6aadd19c125dfaa3208c661ca65d
RMD160 (tweepy-3.5.0.tar.gz) = 96db56b0233e8ec01b57e2d28b1176b6f42c328c
SHA512 (tweepy-3.5.0.tar.gz) = cf87f0b7dea0ca444c17a3fdb9c2ebef814683c110511876c1997630b3202393276d3dd2de3b37fc21eb7a15382d22cc886109bda5a11b3d06a08081704c8c2a
Size (tweepy-3.5.0.tar.gz) = 24348 bytes
SHA1 (patch-setup.py) = 45429ecb0f37893df924aca353cd85add2fdd0dd
SHA1 (patch-tweepy_streaming.py) = 456652db7f555a8c0bb57e3cc168b039f6e637a3

View file

@ -0,0 +1,32 @@
$NetBSD: patch-setup.py,v 1.1 2020/02/24 00:02:59 joerg Exp $
Don't use obsolete parse_requirements.
--- setup.py.orig 2020-02-22 21:25:23.469977185 +0000
+++ setup.py
@@ -2,7 +2,6 @@
#from distutils.core import setup
import re, uuid
from setuptools import setup, find_packages
-from pip.req import parse_requirements
VERSIONFILE = "tweepy/__init__.py"
ver_file = open(VERSIONFILE, "rt").read()
@@ -14,9 +13,6 @@ if mo:
else:
raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))
-install_reqs = parse_requirements('requirements.txt', session=uuid.uuid1())
-reqs = [str(req.req) for req in install_reqs]
-
setup(name="tweepy",
version=version,
description="Twitter library for python",
@@ -25,7 +21,6 @@ setup(name="tweepy",
author_email="tweepy@googlegroups.com",
url="http://github.com/tweepy/tweepy",
packages=find_packages(exclude=['tests']),
- install_requires=reqs,
keywords="twitter library",
classifiers=[
'Development Status :: 4 - Beta',

View file

@ -0,0 +1,92 @@
$NetBSD: patch-tweepy_streaming.py,v 1.1 2020/02/24 00:02:59 joerg Exp $
async is a keyword with Python 3.7+.
--- tweepy/streaming.py.orig 2020-02-22 21:32:10.478599720 +0000
+++ tweepy/streaming.py
@@ -352,9 +352,9 @@ class Stream(object):
if resp.raw.closed:
self.on_closed(resp)
- def _start(self, async):
+ def _start(self, do_async):
self.running = True
- if async:
+ if do_async:
self._thread = Thread(target=self._run)
self._thread.start()
else:
@@ -370,7 +370,7 @@ class Stream(object):
replies=None,
track=None,
locations=None,
- async=False,
+ do_async=False,
encoding='utf8'):
self.session.params = {'delimited': 'length'}
if self.running:
@@ -391,34 +391,34 @@ class Stream(object):
if track:
self.session.params['track'] = u','.join(track).encode(encoding)
- self._start(async)
+ self._start(do_async)
- def firehose(self, count=None, async=False):
+ def firehose(self, count=None, do_async=False):
self.session.params = {'delimited': 'length'}
if self.running:
raise TweepError('Stream object already connected!')
self.url = '/%s/statuses/firehose.json' % STREAM_VERSION
if count:
self.url += '&count=%s' % count
- self._start(async)
+ self._start(do_async)
- def retweet(self, async=False):
+ def retweet(self, do_async=False):
self.session.params = {'delimited': 'length'}
if self.running:
raise TweepError('Stream object already connected!')
self.url = '/%s/statuses/retweet.json' % STREAM_VERSION
- self._start(async)
+ self._start(do_async)
- def sample(self, async=False, languages=None):
+ def sample(self, do_async=False, languages=None):
self.session.params = {'delimited': 'length'}
if self.running:
raise TweepError('Stream object already connected!')
self.url = '/%s/statuses/sample.json' % STREAM_VERSION
if languages:
self.session.params['language'] = ','.join(map(str, languages))
- self._start(async)
+ self._start(do_async)
- def filter(self, follow=None, track=None, async=False, locations=None,
+ def filter(self, follow=None, track=None, do_async=False, locations=None,
stall_warnings=False, languages=None, encoding='utf8', filter_level=None):
self.body = {}
self.session.headers['Content-type'] = "application/x-www-form-urlencoded"
@@ -442,10 +442,10 @@ class Stream(object):
self.body['filter_level'] = unicode(filter_level, encoding)
self.session.params = {'delimited': 'length'}
self.host = 'stream.twitter.com'
- self._start(async)
+ self._start(do_async)
def sitestream(self, follow, stall_warnings=False,
- with_='user', replies=False, async=False):
+ with_='user', replies=False, do_async=False):
self.body = {}
if self.running:
raise TweepError('Stream object already connected!')
@@ -458,7 +458,7 @@ class Stream(object):
self.body['with'] = with_
if replies:
self.body['replies'] = replies
- self._start(async)
+ self._start(do_async)
def disconnect(self):
if self.running is False: