From 4590c7adebc5bb540429dd9f432f16155c4bf0b5 Mon Sep 17 00:00:00 2001 From: Harmon Date: Thu, 28 Jan 2021 11:56:12 -0600 Subject: [PATCH] Remove API.compression --- tweepy/api.py | 4 +--- tweepy/binder.py | 4 ---- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/tweepy/api.py b/tweepy/api.py index 4751464..41ccea5 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -19,7 +19,7 @@ class API: host='api.twitter.com', upload_host='upload.twitter.com', cache=None, api_root='/1.1', upload_root='/1.1', retry_count=0, retry_delay=0, retry_errors=None, timeout=60, - parser=None, compression=False, wait_on_rate_limit=False, + parser=None, wait_on_rate_limit=False, wait_on_rate_limit_notify=False, proxy=''): """ API instance constructor @@ -39,7 +39,6 @@ class API: seconds, default: 60 :param parser: ModelParser instance to parse the responses, default: None - :param compression: If the response is compressed, default: False :param wait_on_rate_limit: If the api wait when it hits the rate limit, default: False :param wait_on_rate_limit_notify: If the api print a notification when @@ -54,7 +53,6 @@ class API: self.api_root = api_root self.upload_root = upload_root self.cache = cache - self.compression = compression self.retry_count = retry_count self.retry_delay = retry_delay self.retry_errors = retry_errors diff --git a/tweepy/binder.py b/tweepy/binder.py index 2452433..96a276f 100644 --- a/tweepy/binder.py +++ b/tweepy/binder.py @@ -154,10 +154,6 @@ def bind_api(**config): if self.api.auth: auth = self.api.auth.apply_auth() - # Request compression if configured - if self.api.compression: - self.headers['Accept-encoding'] = 'gzip' - # Execute request try: resp = self.session.request(self.method, -- 2.25.1