Hello community,
here is the log from the commit of package python-wptools for openSUSE:Factory checked in at 2018-05-29 10:47:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-wptools (Old)
and /work/SRC/openSUSE:Factory/.python-wptools.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-wptools"
Tue May 29 10:47:49 2018 rev:7 rq:612424 version:0.4.14
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-wptools/python-wptools.changes 2018-05-01 23:28:41.193489374 +0200
+++ /work/SRC/openSUSE:Factory/.python-wptools.new/python-wptools.changes 2018-05-29 10:47:50.242033307 +0200
@@ -1,0 +2,14 @@
+Fri May 25 16:34:44 UTC 2018 - badshah400@gmail.com
+
+- Update to version 0.4.14:
+ + Moved expensive backlinks request to page.get_more() and other
+ minor fixes.
+- Changes from version 0.4.13:
+ + Support getting backlinks with continuations, and more general
+ continuation support in wptools.core
+- Minor rebase of python-wptools-avoid-reading-readme.patch.
+- Drop %%check entirely, tests require network.
+- Fix up sed command to remove hashbang: check for a valid
+ hashbang on the first line of file only and delete a match.
+
+-------------------------------------------------------------------
Old:
----
wptools-0.4.12.tar.gz
New:
----
wptools-0.4.14.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-wptools.spec ++++++
--- /var/tmp/diff_new_pack.IQammh/_old 2018-05-29 10:47:51.345992576 +0200
+++ /var/tmp/diff_new_pack.IQammh/_new 2018-05-29 10:47:51.345992576 +0200
@@ -19,7 +19,7 @@
%define pyname wptools
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-wptools
-Version: 0.4.12
+Version: 0.4.14
Release: 0
Summary: Wikipedia tools (for Humans)
License: MIT
@@ -32,7 +32,6 @@
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
-BuildRequires: python3-unittest2
Requires: python-certifi >= 2017.7.27.1
Requires: python-html2text >= 2016.9.19
Requires: python-lxml >= 3.8.0
@@ -54,7 +53,7 @@
%prep
%setup -q -n wptools-%{version}
%patch0 -p1
-sed -i '1d' scripts/wptool.py
+sed -E -i "1{/^#!\/usr\/bin.*python/d}" scripts/wptool.py
%build
%python_build
@@ -63,12 +62,6 @@
%python_install
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
-%check
-# TESTS ONLY WORK WITH PY3 UNITTEST
-%ifpython3
-%python_exec setup.py test
-%endif
-
%files %{python_files}
%doc HISTORY.rst LICENSE README.rst
%python3_only %{_bindir}/wptool
++++++ python-wptools-avoid-reading-readme.patch ++++++
--- /var/tmp/diff_new_pack.IQammh/_old 2018-05-29 10:47:51.365991837 +0200
+++ /var/tmp/diff_new_pack.IQammh/_new 2018-05-29 10:47:51.369991690 +0200
@@ -13,7 +13,7 @@
@@ -12,7 +10,16 @@ setup(
name='wptools',
- version='0.4.12',
+ version='0.4.14',
description='Wikipedia tools (for Humans)',
- long_description=readme + '\n\n' + history,
+ long_description=
++++++ wptools-0.4.12.tar.gz -> wptools-0.4.14.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wptools-0.4.12/HISTORY.rst new/wptools-0.4.14/HISTORY.rst
--- old/wptools-0.4.12/HISTORY.rst 2018-04-30 00:33:58.000000000 +0200
+++ new/wptools-0.4.14/HISTORY.rst 2018-05-23 05:56:54.000000000 +0200
@@ -3,9 +3,11 @@
Release History
---------------
-0.4.12 (2018-04-29)
+0.4.14 (2018-05-22)
+++++++++++++++++++
+* Put API warnings in data attribute (#120)
+* Support getting backlinks w/continuations (#119, #122)
* Always respect silent flag (#118)
* Improved infobox parsing (#91, #109)
* Added image (license, assessment) metadata (#104, #105)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wptools-0.4.12/PKG-INFO new/wptools-0.4.14/PKG-INFO
--- old/wptools-0.4.12/PKG-INFO 2018-04-30 00:38:59.000000000 +0200
+++ new/wptools-0.4.14/PKG-INFO 2018-05-23 06:11:08.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: wptools
-Version: 0.4.12
+Version: 0.4.14
Summary: Wikipedia tools (for Humans)
Home-page: https://github.com/siznax/wptools/
Author: Steve @siznax
@@ -295,9 +295,11 @@
Release History
---------------
- 0.4.12 (2018-04-29)
+ 0.4.14 (2018-05-22)
+++++++++++++++++++
+ * Put API warnings in data attribute (#120)
+ * Support getting backlinks w/continuations (#119, #122)
* Always respect silent flag (#118)
* Improved infobox parsing (#91, #109)
* Added image (license, assessment) metadata (#104, #105)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wptools-0.4.12/setup.py new/wptools-0.4.14/setup.py
--- old/wptools-0.4.12/setup.py 2018-04-30 00:34:14.000000000 +0200
+++ new/wptools-0.4.14/setup.py 2018-05-23 05:57:02.000000000 +0200
@@ -10,7 +10,7 @@
setup(
name='wptools',
- version='0.4.12',
+ version='0.4.14',
description='Wikipedia tools (for Humans)',
long_description=readme + '\n\n' + history,
url='https://github.com/siznax/wptools/',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wptools-0.4.12/wptools/__init__.py new/wptools-0.4.14/wptools/__init__.py
--- old/wptools-0.4.12/wptools/__init__.py 2018-04-30 00:34:32.000000000 +0200
+++ new/wptools-0.4.14/wptools/__init__.py 2018-05-23 05:57:11.000000000 +0200
@@ -18,7 +18,7 @@
__contact__ = "https://github.com/siznax/wptools"
__license__ = "MIT"
__title__ = "wptools"
-__version__ = "0.4.12"
+__version__ = "0.4.14"
from . import core
from . import query
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wptools-0.4.12/wptools/category.py new/wptools-0.4.14/wptools/category.py
--- old/wptools-0.4.12/wptools/category.py 2018-02-06 23:25:53.000000000 +0100
+++ new/wptools-0.4.14/wptools/category.py 2018-05-08 02:04:57.000000000 +0200
@@ -94,10 +94,7 @@
if action == 'random':
return qobj.random(namespace=14)
elif action == 'category':
- qry = qobj.category(title=title, pageid=pageid)
- if self.data.get('cmcontinue'):
- qry += "&cmcontinue=%s" % self.data['cmcontinue']
- return qry
+ return qobj.category(title, pageid, self._continue_params())
def _set_data(self, action):
"""
@@ -105,14 +102,7 @@
"""
data = self._load_response(action)
- try:
- cmcontinue = data.get('continue').get('cmcontinue')
- if cmcontinue:
- self.data['cmcontinue'] = cmcontinue
- del self.cache['category']
- except AttributeError:
- if 'cmcontinue' in self.data:
- del self.data['cmcontinue']
+ self._handle_continuations(data, 'category')
if action == 'category':
members = data.get('query').get('categorymembers')
@@ -151,9 +141,8 @@
self._get('category', show, proxy, timeout)
- if self.data.get('cmcontinue'):
- while self.data.get('cmcontinue'):
- self._get('category', show, proxy, timeout)
+ while self.data.get('continue'):
+ self._get('category', show, proxy, timeout)
return self
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wptools-0.4.12/wptools/core.py new/wptools-0.4.14/wptools/core.py
--- old/wptools-0.4.12/wptools/core.py 2018-04-10 04:16:35.000000000 +0200
+++ new/wptools-0.4.14/wptools/core.py 2018-05-23 06:05:21.000000000 +0200
@@ -21,7 +21,7 @@
"""
REQUEST_DELAY = 0
- REQUEST_LIMIT = 25
+ REQUEST_LIMIT = 50
cache = None
data = None
@@ -60,6 +60,83 @@
if kwargs.get('wiki'):
self.params.update({'wiki': kwargs.get('wiki')})
+ def _build_showstr(self, seed):
+ """
+ Returns show() display string for data attribute
+ """
+ output = ["%s (%s) data" % (seed, self.params['lang'])]
+
+ output.append('{')
+
+ maxwidth = WPToolsQuery.MAXWIDTH
+
+ for item in sorted(self.data):
+
+ if self.data[item] is None:
+ continue
+
+ prefix = item
+ value = self.data[item]
+
+ if isinstance(value, dict):
+ prefix = "%s: " % (prefix, len(value))
+ value = ', '.join((safestr(x) for x in value if x))
+ elif isinstance(value, tuple):
+ prefix = "%s:
" % (prefix, len(value))
- value = ', '.join((safestr(x) for x in value if x))
- elif isinstance(value, tuple):
- prefix = "%s: