Hello community, here is the log from the commit of package python-wptools for openSUSE:Factory checked in at 2018-01-10 23:36:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-wptools (Old) and /work/SRC/openSUSE:Factory/.python-wptools.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-wptools" Wed Jan 10 23:36:29 2018 rev:3 rq:563082 version:0.4.6 Changes: -------- --- /work/SRC/openSUSE:Factory/python-wptools/python-wptools.changes 2017-12-20 10:39:58.946477342 +0100 +++ /work/SRC/openSUSE:Factory/.python-wptools.new/python-wptools.changes 2018-01-10 23:36:43.607635081 +0100 @@ -1,0 +2,8 @@ +Tue Jan 9 16:16:21 UTC 2018 - [email protected] + +- Update to version 0.4.6: + * Merged deleted Wikidata item PR (gh#siznax/wptools#97). +- Rebase python-wptools-avoid-reading-readme.patch to apply + cleanly against updated sources. + +------------------------------------------------------------------- Old: ---- wptools-0.4.5.tar.gz New: ---- wptools-0.4.6.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-wptools.spec ++++++ --- /var/tmp/diff_new_pack.R31zOx/_old 2018-01-10 23:36:44.115611248 +0100 +++ /var/tmp/diff_new_pack.R31zOx/_new 2018-01-10 23:36:44.119611060 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-wptools # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 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 @@ -19,7 +19,7 @@ %define pyname wptools %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-wptools -Version: 0.4.5 +Version: 0.4.6 Release: 0 Summary: Wikipedia tools (for Humans) License: MIT ++++++ python-wptools-avoid-reading-readme.patch ++++++ --- /var/tmp/diff_new_pack.R31zOx/_old 2018-01-10 23:36:44.135610309 +0100 +++ /var/tmp/diff_new_pack.R31zOx/_new 2018-01-10 23:36:44.139610122 +0100 @@ -1,7 +1,7 @@ -Index: wptools-0.4.5/setup.py +Index: wptools-0.4.6/setup.py =================================================================== ---- wptools-0.4.5.orig/setup.py -+++ wptools-0.4.5/setup.py +--- wptools-0.4.6.orig/setup.py ++++ wptools-0.4.6/setup.py @@ -2,8 +2,6 @@ from setuptools import setup, find_packages @@ -13,7 +13,7 @@ @@ -12,7 +10,16 @@ setup( name='wptools', - version='0.4.5', + version='0.4.6', description='Wikipedia tools (for Humans)', - long_description=readme + '\n\n' + history, + long_description= ++++++ wptools-0.4.5.tar.gz -> wptools-0.4.6.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wptools-0.4.5/HISTORY.rst new/wptools-0.4.6/HISTORY.rst --- old/wptools-0.4.5/HISTORY.rst 2017-12-13 23:19:17.000000000 +0100 +++ new/wptools-0.4.6/HISTORY.rst 2017-12-23 01:53:04.000000000 +0100 @@ -3,9 +3,10 @@ Release History --------------- -0.4.5 (2017-12-13) +0.4.6 (2017-12-22) ++++++++++++++++++ +* Merged deleted Wikidata item PR by @seansay (#97) * Fixed TypeError on Windows 10 (#95) * Fixed RESTBase LookupError on slash titles (#94) * Added boxterm param for more Infobox reach (#91) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wptools-0.4.5/PKG-INFO new/wptools-0.4.6/PKG-INFO --- old/wptools-0.4.5/PKG-INFO 2017-12-13 23:24:34.000000000 +0100 +++ new/wptools-0.4.6/PKG-INFO 2017-12-23 01:58:54.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: wptools -Version: 0.4.5 +Version: 0.4.6 Summary: Wikipedia tools (for Humans) Home-page: https://github.com/siznax/wptools/ Author: Steve @siznax @@ -139,9 +139,10 @@ Release History --------------- - 0.4.5 (2017-12-13) + 0.4.6 (2017-12-22) ++++++++++++++++++ + * Merged deleted Wikidata item PR by @seansay (#97) * Fixed TypeError on Windows 10 (#95) * Fixed RESTBase LookupError on slash titles (#94) * Added boxterm param for more Infobox reach (#91) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wptools-0.4.5/setup.py new/wptools-0.4.6/setup.py --- old/wptools-0.4.5/setup.py 2017-12-13 23:19:35.000000000 +0100 +++ new/wptools-0.4.6/setup.py 2017-12-23 01:53:13.000000000 +0100 @@ -10,7 +10,7 @@ setup( name='wptools', - version='0.4.5', + version='0.4.6', 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.5/wptools/__init__.py new/wptools-0.4.6/wptools/__init__.py --- old/wptools-0.4.5/wptools/__init__.py 2017-12-13 23:19:26.000000000 +0100 +++ new/wptools-0.4.6/wptools/__init__.py 2017-12-23 01:53:23.000000000 +0100 @@ -18,7 +18,7 @@ __contact__ = "https://github.com/siznax/wptools" __license__ = "MIT" __title__ = "wptools" -__version__ = "0.4.5" +__version__ = "0.4.6" from . import core from . import query diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wptools-0.4.5/wptools/core.py new/wptools-0.4.6/wptools/core.py --- old/wptools-0.4.5/wptools/core.py 2017-12-13 22:40:35.000000000 +0100 +++ new/wptools-0.4.6/wptools/core.py 2017-12-23 01:43:24.000000000 +0100 @@ -137,8 +137,8 @@ if action == 'parse' and not data.get('parse'): raise LookupError(_query) - if action == 'wikidata' and '-1' in data.get('entities'): - raise LookupError(_query) + if action == 'wikidata': + handle_wikidata_errors(data, _query) return data @@ -245,6 +245,23 @@ prettyprint(output) +def handle_wikidata_errors(data, query): + """ + Raises LookupError if wikidata error found + """ + entities = data.get('entities') + + if not entities: + raise LookupError(query) + elif '-1' in entities: + raise LookupError(query) + else: + item = list(entities.values())[0] + if 'missing' in item: + errmsg = "wikidata item %s has been deleted" % item['id'] + raise LookupError(errmsg) + + def prettyprint(datastr): """ Print page data strings to stderr diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wptools-0.4.5/wptools.egg-info/PKG-INFO new/wptools-0.4.6/wptools.egg-info/PKG-INFO --- old/wptools-0.4.5/wptools.egg-info/PKG-INFO 2017-12-13 23:24:34.000000000 +0100 +++ new/wptools-0.4.6/wptools.egg-info/PKG-INFO 2017-12-23 01:58:54.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: wptools -Version: 0.4.5 +Version: 0.4.6 Summary: Wikipedia tools (for Humans) Home-page: https://github.com/siznax/wptools/ Author: Steve @siznax @@ -139,9 +139,10 @@ Release History --------------- - 0.4.5 (2017-12-13) + 0.4.6 (2017-12-22) ++++++++++++++++++ + * Merged deleted Wikidata item PR by @seansay (#97) * Fixed TypeError on Windows 10 (#95) * Fixed RESTBase LookupError on slash titles (#94) * Added boxterm param for more Infobox reach (#91)
