15
0

- 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

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):