commit 07c7bf688d6b4bc5e97fca4f8f2653fe60f6a821f6b6f4f3e5cc2156de70c74a Author: Tomáš Chvátal Date: Thu Apr 11 09:53:44 2019 +0000 Accepting request 689955 from home:jayvdb:nltk_data - Use GitHub archive tarball - Use %license - Remove bcond test - Update to v3.7.0 - Fixes for cursoring API endpoints - Improve html_for_tweet() parsing - Documentation cleanup - Documentation for cursor's return_pages keyword argument - Update links to Twitter API in documentation - Added create_metadata endpoint - Raise error for when cursor is not provided a callable - Add get_oembed_tweet-endpoint.patch - Fixed the api end point in get_oembed_tweet - Activate tests ignoring five failures - initial version v3.6.0 OBS-URL: https://build.opensuse.org/request/show/689955 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-twython?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/get_oembed_tweet-endpoint.patch b/get_oembed_tweet-endpoint.patch new file mode 100644 index 0000000..569b151 --- /dev/null +++ b/get_oembed_tweet-endpoint.patch @@ -0,0 +1,22 @@ +From 340fb4ea162b3e02fb5e245ad8651ec62d34cea5 Mon Sep 17 00:00:00 2001 +From: Vishvajit Pathak +Date: Sat, 29 Sep 2018 15:18:31 +0530 +Subject: [PATCH] ISSUE-497 : Fixed the api end point in get_oembed_tweet + +--- + twython/endpoints.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/twython/endpoints.py b/twython/endpoints.py +index 00392b8..9da30db 100644 +--- a/twython/endpoints.py ++++ b/twython/endpoints.py +@@ -268,7 +268,7 @@ def get_oembed_tweet(self, **params): + https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/get-statuses-oembed + + """ +- return self.get('statuses/oembed', params=params) ++ return self.get('oembed', params=params) + + def get_retweeters_ids(self, **params): + """Returns a collection of up to 100 user IDs belonging to users who diff --git a/python-twython.changes b/python-twython.changes new file mode 100644 index 0000000..0fd5ea1 --- /dev/null +++ b/python-twython.changes @@ -0,0 +1,26 @@ +------------------------------------------------------------------- +Sat Mar 30 03:19:14 UTC 2019 - John Vandenberg + +- Use GitHub archive tarball +- Use %license +- Remove bcond test + +------------------------------------------------------------------- +Sat Feb 9 15:36:07 UTC 2019 - John Vandenberg + +- Update to v3.7.0 + - Fixes for cursoring API endpoints + - Improve html_for_tweet() parsing + - Documentation cleanup + - Documentation for cursor's return_pages keyword argument + - Update links to Twitter API in documentation + - Added create_metadata endpoint + - Raise error for when cursor is not provided a callable +- Add get_oembed_tweet-endpoint.patch + - Fixed the api end point in get_oembed_tweet +- Activate tests ignoring five failures + +------------------------------------------------------------------- +Tue Nov 7 18:25:42 UTC 2017 - toddrme2178@gmail.com + +- initial version v3.6.0 diff --git a/python-twython.spec b/python-twython.spec new file mode 100644 index 0000000..85f94ab --- /dev/null +++ b/python-twython.spec @@ -0,0 +1,83 @@ +# +# spec file for package python-twython +# +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: python-twython +Version: 3.7.0 +Release: 0 +License: MIT +Summary: Python wrapper for the Twitter API +Url: https://github.com/ryanmcgrath/twython +Group: Development/Languages/Python +Source: https://github.com/ryanmcgrath/twython/archive/%{version}.tar.gz#/twython-%{version}.tar.gz +Patch: get_oembed_tweet-endpoint.patch +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildRequires: %{python_module nose} +BuildRequires: %{python_module requests >= 2.1.0} +BuildRequires: %{python_module requests-oauthlib >= 0.4.0} +BuildRequires: %{python_module responses} +# PyJWT 1.4.2 isnt compatible with single-spec +BuildRequires: %{python_module PyJWT > 1.4.2} +Requires: python-requests >= 2.1.0 +Requires: python-requests-oauthlib >= 0.4.0 +BuildArch: noarch + +%python_subpackages + +%description +Twython is a Python library providing a way to access Twitter data. + +Features include: + +- Query data for: + - User information + - Twitter lists + - Timelines + - Direct Messages + - and anything found in `the docs `_ +- Image Uploading: + - Update user status with an image + - Change user avatar + - Change user background image + - Change user banner image +- OAuth 2 Application Only (read-only) Support +- Support for Twitter's Streaming API +- Seamless Python 3 support! + +%prep +%setup -q -n twython-%{version} +%patch -p1 + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +# Five failing tests +%python_exec %{_bindir}/nosetests -e '(test_get_lastfunction_header_should_return_header|test_request_should_handle_(rate_limit|401|400_that_is_not_auth_related|400_for_missing_auth_data))' + +%files %{python_files} +%doc README.rst +%license LICENSE +%{python_sitelib}/* + +%changelog diff --git a/twython-3.7.0.tar.gz b/twython-3.7.0.tar.gz new file mode 100644 index 0000000..69c0b9b --- /dev/null +++ b/twython-3.7.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:075165fdd26dc0200769edd7cc48cde0206fbb7f2452d16794e283abd327726d +size 373183