Hello community,
here is the log from the commit of package python-python-twitter for
openSUSE:Factory checked in at 2019-05-12 11:36:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-python-twitter (Old)
and /work/SRC/openSUSE:Factory/.python-python-twitter.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-python-twitter"
Sun May 12 11:36:41 2019 rev:4 rq:701794 version:3.5
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-python-twitter/python-python-twitter.changes
2018-12-24 11:42:43.525381187 +0100
+++
/work/SRC/openSUSE:Factory/.python-python-twitter.new.5148/python-python-twitter.changes
2019-05-12 11:36:48.318468273 +0200
@@ -1,0 +2,10 @@
+Thu May 9 09:12:21 UTC 2019 - [email protected]
+
+- version update to 3.5
+ * Fix DM endpoint handling
+- added patches
+ fix test for PostDirectMessage endpoint with new data
+ + python-python-twitter-fix-test.patch
+- run tests
+
+-------------------------------------------------------------------
Old:
----
python-twitter-3.4.2.tar.gz
New:
----
python-python-twitter-fix-test.patch
v3.5.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-python-twitter.spec ++++++
--- /var/tmp/diff_new_pack.IHmoOJ/_old 2019-05-12 11:36:51.682478121 +0200
+++ /var/tmp/diff_new_pack.IHmoOJ/_new 2019-05-12 11:36:51.682478121 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-python-twitter
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 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
@@ -17,23 +17,32 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%ifarch %{ix86}
+# (type(resp[0]) is int) is not true for python 2.7, as it is long
+%define skip -k 'not (testGetFollowerIDsPaged or testGetFollowersIDs or
testGetRetweeters)'
+%endif
%define oldpython python
Name: python-python-twitter
-Version: 3.4.2
+Version: 3.5
Release: 0
Summary: A Python wrapper around the Twitter API
License: Apache-2.0
Group: Development/Languages/Python
Url: https://github.com/bear/python-twitter
-Source:
https://files.pythonhosted.org/packages/source/p/python-twitter/python-twitter-%{version}.tar.gz
+Source:
https://github.com/bear/python-twitter/archive/v%{version}.tar.gz
+#
https://github.com/bear/python-twitter/commit/f7eb83d9dca3ba0ee93e629ba5322732f99a3a30
+# fix test for PostDirectMessage endpoint with new data
+Patch0: python-python-twitter-fix-test.patch
BuildRequires: %{python_module pytest-runner}
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
# SECTION test requirements
BuildRequires: %{python_module future}
+BuildRequires: %{python_module hypothesis}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module requests-oauthlib}
BuildRequires: %{python_module requests}
+BuildRequires: %{python_module responses}
# /SECTION
BuildRequires: fdupes
Requires: python-future
@@ -55,7 +64,9 @@
%prep
%setup -q -n python-twitter-%{version}
-sed -i '1s/#!//' twitter/*.py
+%patch0 -p1
+sed -i -e '/^#!\/usr\/bin\/env/d' twitter/*.py
+echo %skip
%build
%python_build
@@ -64,8 +75,11 @@
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
+%check
+%pytest %{?skip}
+
%files %{python_files}
-%doc AUTHORS.rst CHANGES README.rst GAE.rst
+%doc AUTHORS.rst CHANGES README.rst GAE.rst NOTICE
%license LICENSE
%{python_sitelib}/*
++++++ python-python-twitter-fix-test.patch ++++++
diff --git a/testdata/direct_messages/post_post_direct_message.json
b/testdata/direct_messages/post_post_direct_message.json
index c4c2d59f..9e861211 100644
--- a/testdata/direct_messages/post_post_direct_message.json
+++ b/testdata/direct_messages/post_post_direct_message.json
@@ -1 +1 @@
-{"sender_id_str": "372018022", "entities": {"urls": [{"expanded_url":
"https://twitter.com/CamilleStein/status/854322543364382720", "indices": [0,
23], "url": "https://t.co/L4MIplKUwR", "display_url":
"twitter.com/CamilleStein/s\u2026"}], "symbols": [], "hashtags": [],
"user_mentions": []}, "recipient_id": 3206731269, "text":
"https://t.co/L4MIplKUwR", "id_str": "855194351294656515", "sender_id":
372018022, "id": 855194351294656515, "created_at": "Thu Apr 20 22:59:56 +0000
2017", "recipient_id_str": "3206731269", "recipient":
{"is_translation_enabled": false, "following": true, "name": "The GIFing Bot",
"profile_image_url":
"http://pbs.twimg.com/profile_images/592359786659880960/IwQsKZ7b_normal.png",
"profile_sidebar_border_color": "000000", "followers_count": 84, "created_at":
"Sat Apr 25 16:31:07 +0000 2015", "profile_link_color": "02B400",
"is_translator": false, "id": 3206731269, "profile_sidebar_fill_color":
"000000", "has_extended_profile": false, "profile_background_tile": false,
"profile_use_background_image": false, "default_profile_image": false,
"profile_background_image_url_https":
"https://abs.twimg.com/images/themes/theme1/bg.png", "lang": "en", "verified":
false, "favourites_count": 0, "protected": false, "notifications": false,
"friends_count": 100, "listed_count": 7, "location": "", "statuses_count": 19,
"entities": {"url": {"urls": [{"expanded_url":
"http://iseverythingstilltheworst.com/projects/the-gifing-bot/", "indices": [0,
23], "url": "https://t.co/BTsv2OJnqv", "display_url":
"iseverythingstilltheworst.com/projects/the-g\u2026"}]}, "description":
{"urls": []}}, "url": "https://t.co/BTsv2OJnqv", "utc_offset": null,
"time_zone": null, "profile_background_color": "000000", "id_str":
"3206731269", "description": "DM me a tweet with a GIF in it and I'll make it
into an actual GIF!!", "follow_request_sent": false, "screen_name":
"TheGIFingBot", "profile_text_color": "000000", "translator_type": "none",
"profile_image_url_https":
"https://pbs.twimg.com/profile_images/592359786659880960/IwQsKZ7b_normal.png",
"profile_background_image_url":
"http://abs.twimg.com/images/themes/theme1/bg.png", "contributors_enabled":
false, "default_profile": false, "geo_enabled": false}, "sender":
{"is_translation_enabled": false, "following": false, "name": "Jeremy",
"profile_image_url":
"http://pbs.twimg.com/profile_images/800076020741246976/fMpwMcBJ_normal.jpg",
"profile_sidebar_border_color": "000000", "followers_count": 142, "created_at":
"Sun Sep 11 23:49:28 +0000 2011", "profile_link_color": "EE3355",
"is_translator": false, "id": 372018022, "profile_sidebar_fill_color":
"000000", "has_extended_profile": false, "profile_background_tile": false,
"profile_use_background_image": false, "default_profile_image": false,
"profile_background_image_url_https":
"https://abs.twimg.com/images/themes/theme1/bg.png", "lang": "en", "verified":
false, "favourites_count": 7546, "protected": false, "notifications": false,
"friends_count": 593, "listed_count": 11, "location": "philly",
"statuses_count": 1785, "entities": {"url": {"urls": [{"expanded_url":
"http://iseverythingstilltheworst.com", "indices": [0, 23], "url":
"https://t.co/wtg3XyREnj", "display_url": "iseverythingstilltheworst.com"}]},
"description": {"urls": []}}, "url": "https://t.co/wtg3XyREnj", "utc_offset":
-14400, "time_zone": "Eastern Time (US & Canada)", "profile_background_color":
"FFFFFF", "id_str": "372018022", "description": "these people have addresses |
#botally", "follow_request_sent": false, "screen_name": "__jcbl__",
"profile_text_color": "000000", "translator_type": "none",
"profile_image_url_https":
"https://pbs.twimg.com/profile_images/800076020741246976/fMpwMcBJ_normal.jpg",
"profile_background_image_url":
"http://abs.twimg.com/images/themes/theme1/bg.png", "profile_banner_url":
"https://pbs.twimg.com/profile_banners/372018022/1475799101",
"contributors_enabled": false, "default_profile": false, "geo_enabled": false},
"sender_screen_name": "__jcbl__", "recipient_screen_name": "TheGIFingBot"}
\ No newline at end of file
+{"event": {"type": "message_create", "id": "1046388258840748037",
"created_timestamp": "1538313376518", "message_create": {"target":
{"recipient_id": "372018022"}, "sender_id": "372018022", "message_data":
{"text": "hello", "entities": {"hashtags": [], "symbols": [], "user_mentions":
[], "urls": []}}}}}
\ No newline at end of file
diff --git a/tests/test_direct_messages.py b/tests/test_direct_messages.py
index 348ea525..fa9108c6 100644
--- a/tests/test_direct_messages.py
+++ b/tests/test_direct_messages.py
@@ -63,9 +63,9 @@ def test_post_direct_message():
with open('testdata/direct_messages/post_post_direct_message.json', 'r')
as f:
responses.add(POST, DEFAULT_URL, body=f.read())
resp = api.PostDirectMessage(user_id='372018022',
- text='https://t.co/L4MIplKUwR')
+ text='hello')
assert isinstance(resp, twitter.DirectMessage)
- assert resp.text == 'https://t.co/L4MIplKUwR'
+ assert resp.text == 'hello'
@responses.activate