Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit 164b1f8

Browse files
committed
complete cleanup of verify_context code
1 parent ba876d5 commit 164b1f8

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

twitter/api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,8 @@ def __init__(
595595
TwitterCall.__init__(
596596
self, auth=auth, format=format, domain=domain,
597597
callable_cls=TwitterCall,
598-
secure=secure, uriparts=uriparts, retry=retry, verify_context=verify_context)
598+
secure=secure, uriparts=uriparts, retry=retry,
599+
verify_context=verify_context)
599600

600601

601602
__all__ = ["Twitter", "TwitterError", "TwitterHTTPError", "TwitterResponse"]

twitter/stream.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,16 +264,17 @@ class TwitterStream(TwitterCall):
264264
"""
265265
def __init__(self, domain="stream.twitter.com", secure=True, auth=None,
266266
api_version='1.1', block=True, timeout=None,
267-
heartbeat_timeout=90.0):
267+
heartbeat_timeout=90.0, verify_context=True):
268268
uriparts = (str(api_version),)
269269

270270
class TwitterStreamCall(TwitterCall):
271-
def _handle_response(self, req, uri, arg_data, _timeout=None, verify_context=True):
271+
def _handle_response(self, req, uri, arg_data, _timeout=None):
272272
return handle_stream_response(
273273
req, uri, arg_data, block,
274-
_timeout or timeout, heartbeat_timeout)
274+
_timeout or timeout, heartbeat_timeout, verify_context)
275275

276276
TwitterCall.__init__(
277277
self, auth=auth, format="json", domain=domain,
278278
callable_cls=TwitterStreamCall,
279-
secure=secure, uriparts=uriparts, timeout=timeout, gzip=False)
279+
secure=secure, uriparts=uriparts, timeout=timeout, gzip=False,
280+
retry=False, verify_context=verify_context)

0 commit comments

Comments
 (0)