From 4adddabce6cb3f11e9742f9490197b4530795cbf Mon Sep 17 00:00:00 2001 From: Harmon Date: Fri, 19 Feb 2021 10:20:38 -0600 Subject: [PATCH] Stop allowing positional arguments for API.simple_upload Stop allowing positional arguments besides filename for API.simple_upload --- tweepy/api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tweepy/api.py b/tweepy/api.py index 2855a32..a4dcf5d 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -352,10 +352,10 @@ class API: return self.chunked_upload(filename, file=file, file_type=file_type, *args, **kwargs) else: - return self.simple_upload(filename, file=file, *args, **kwargs) + return self.simple_upload(filename, file=file, **kwargs) @payload('media') - def simple_upload(self, filename, *args, file=None, media_category=None, + def simple_upload(self, filename, *, file=None, media_category=None, additional_owners=None, **kwargs): """ :reference: https://developer.twitter.com/en/docs/media/upload-media/api-reference/post-media-upload """ @@ -371,7 +371,7 @@ class API: post_data['additional_owners'] = additional_owners return self.request( - 'POST', 'media/upload', *args, post_data=post_data, files=files, + 'POST', 'media/upload', post_data=post_data, files=files, upload_api=True, **kwargs ) -- 2.25.1