14
0

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
This commit is contained in:
Tomáš Chvátal
2019-04-11 09:53:44 +00:00
committed by Git OBS Bridge
commit 07c7bf688d
6 changed files with 158 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -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

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

View File

@@ -0,0 +1,22 @@
From 340fb4ea162b3e02fb5e245ad8651ec62d34cea5 Mon Sep 17 00:00:00 2001
From: Vishvajit Pathak <vishvajit@motoinsight.com>
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

26
python-twython.changes Normal file
View File

@@ -0,0 +1,26 @@
-------------------------------------------------------------------
Sat Mar 30 03:19:14 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
- Use GitHub archive tarball
- Use %license
- Remove bcond test
-------------------------------------------------------------------
Sat Feb 9 15:36:07 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
- 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

83
python-twython.spec Normal file
View File

@@ -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 <https://dev.twitter.com/docs/api/1.1>`_
- 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

3
twython-3.7.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:075165fdd26dc0200769edd7cc48cde0206fbb7f2452d16794e283abd327726d
size 373183