- Add patch support-python314.patch:

* Check for zstd support in the testsuite.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-twython?expand=0&rev=9
This commit is contained in:
2025-11-17 01:02:24 +00:00
committed by Git OBS Bridge
commit 80ea39de3e
6 changed files with 185 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

55
python-twython.changes Normal file
View File

@@ -0,0 +1,55 @@
-------------------------------------------------------------------
Mon Nov 17 01:01:38 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch support-python314.patch:
* Check for zstd support in the testsuite.
-------------------------------------------------------------------
Wed Jun 4 06:14:47 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Switch to pyproject macros.
- No more greedy globs in %files.
-------------------------------------------------------------------
Tue Oct 11 16:19:03 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
- Update to version 3.9.1
* Changes from raising StopIteration to returning instead.
* Updates information about Python 2.7 support drop.
-------------------------------------------------------------------
Tue Jun 2 09:05:23 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
- Update to version to 3.8.2
* Bump release with latest patches from GitHub.
* Fix Direct Messages with patches from @manuelcortez.
* Use PyPI tarball again because upstream did not tag this release
- Drop upstreamed patch get_oembed_tweet-endpoint.patch
- Replace nose with pytest
-------------------------------------------------------------------
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

84
python-twython.spec Normal file
View File

@@ -0,0 +1,84 @@
#
# spec file for package python-twython
#
# Copyright (c) 2025 SUSE LLC and contributors
#
# 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 https://bugs.opensuse.org/
#
Name: python-twython
Version: 3.9.1
Release: 0
Summary: Python wrapper for the Twitter API
License: MIT
URL: https://github.com/ryanmcgrath/twython
Source: https://files.pythonhosted.org/packages/source/t/twython/twython-%{version}.tar.gz
# PATCH-FIX-OPENSUSE Check for zstd compression support in a test
Patch0: support-python314.patch
# PyJWT 1.4.2 isnt compatible with single-spec
BuildRequires: %{python_module PyJWT > 1.4.2}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module requests >= 2.1.0}
BuildRequires: %{python_module requests-oauthlib >= 0.4.0}
BuildRequires: %{python_module responses}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
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
%autosetup -p1 -n twython-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# Five failing tests
%pytest -k "not (test_get_lastfunction_header_should_return_header or test_request_should_handle_40 or test_request_should_handle_rate_limit)"
%files %{python_files}
%doc README.md
%license LICENSE
%{python_sitelib}/twython
%{python_sitelib}/twython-%{version}.dist-info
%changelog

19
support-python314.patch Normal file
View File

@@ -0,0 +1,19 @@
Index: twython-3.9.1/tests/test_core.py
===================================================================
--- twython-3.9.1.orig/tests/test_core.py
+++ twython-3.9.1/tests/test_core.py
@@ -285,7 +285,13 @@ class TwythonAPITestCase(unittest.TestCa
self.api.get(endpoint)
- self.assertEqual(b'gzip, deflate', responses.calls[0].request.headers['Accept-Encoding'])
+ accept_encoding = b'gzip, deflate'
+ try:
+ import compression.zstd
+ accept_encoding += b', zstd'
+ except ImportError:
+ pass
+ self.assertEqual(accept_encoding, responses.calls[0].request.headers['Accept-Encoding'])
# Static methods
def test_construct_api_url(self):

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

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5a3f0ac24d10705257028fb4205bfedf432ff28d358b796e0c2f01a2f9990c84
size 376877