Hello community, here is the log from the commit of package python-jellyfish for openSUSE:Factory checked in at 2019-04-04 12:07:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-jellyfish (Old) and /work/SRC/openSUSE:Factory/.python-jellyfish.new.3908 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-jellyfish" Thu Apr 4 12:07:47 2019 rev:3 rq:691021 version:0.7.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-jellyfish/python-jellyfish.changes 2018-08-03 12:37:46.995612475 +0200 +++ /work/SRC/openSUSE:Factory/.python-jellyfish.new.3908/python-jellyfish.changes 2019-04-04 12:07:49.893416265 +0200 @@ -1,0 +2,8 @@ +Wed Apr 3 10:40:50 UTC 2019 - Tomáš Chvátal <tchva...@suse.com> + +- Update to 0.7.1: + * drop Python 2 compatibility & legacy code + * add bugfix for NYSIIS for words starting with PF + * restrict install to Python >= 3.4 + +------------------------------------------------------------------- Old: ---- jellyfish-0.6.1.tar.gz New: ---- jellyfish-0.7.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-jellyfish.spec ++++++ --- /var/tmp/diff_new_pack.4iV04P/_old 2019-04-04 12:07:51.065415154 +0200 +++ /var/tmp/diff_new_pack.4iV04P/_new 2019-04-04 12:07:51.069415150 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-jellyfish # -# 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 @@ -12,13 +12,14 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define skip_python2 1 Name: python-jellyfish -Version: 0.6.1 +Version: 0.7.1 Release: 0 Summary: A library for doing approximate and phonetic matching of strings License: BSD-2-Clause @@ -28,7 +29,6 @@ BuildRequires: %{python_module devel} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module unicodecsv} BuildRequires: fdupes BuildRequires: python-rpm-macros %python_subpackages @@ -56,8 +56,7 @@ %python_expand %fdupes %{buildroot}%{$python_sitearch} %check -# Tests actually do some crazy import order -#%%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} py.test-%{$python_version} jellyfish/test.py +%pytest %{buildroot}%{$python_sitearch}/jellyfish/test.py %files %{python_files} %license LICENSE ++++++ jellyfish-0.6.1.tar.gz -> jellyfish-0.7.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jellyfish-0.6.1/PKG-INFO new/jellyfish-0.7.1/PKG-INFO --- old/jellyfish-0.6.1/PKG-INFO 2018-04-16 16:00:27.000000000 +0200 +++ new/jellyfish-0.7.1/PKG-INFO 2019-01-11 05:35:53.000000000 +0100 @@ -1,10 +1,8 @@ -Metadata-Version: 1.1 +Metadata-Version: 1.2 Name: jellyfish -Version: 0.6.1 +Version: 0.7.1 Summary: a library for doing approximate and phonetic matching of strings. Home-page: http://github.com/jamesturk/jellyfish -Author: UNKNOWN -Author-email: UNKNOWN License: UNKNOWN Description: ========= jellyfish @@ -28,7 +26,7 @@ Jellyfish is a python library for doing approximate and phonetic matching of strings. - Written by James Turk <james.p.t...@gmail.com> and Michael Stephens. + Written by James Turk <d...@jamesturk.net> and Michael Stephens. See https://github.com/jamesturk/jellyfish/graphs/contributors for contributors. @@ -36,6 +34,8 @@ Source is available at http://github.com/jamesturk/jellyfish. + **Jellyfish >= 0.7 only supports Python 3, if you need Python 2 please use 0.6.x.** + Included Algorithms =================== @@ -94,8 +94,8 @@ Classifier: License :: OSI Approved :: BSD License Classifier: Natural Language :: English Classifier: Operating System :: OS Independent -Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Topic :: Text Processing :: Linguistic +Requires-Python: >3.4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jellyfish-0.6.1/README.rst new/jellyfish-0.7.1/README.rst --- old/jellyfish-0.6.1/README.rst 2017-10-06 06:36:10.000000000 +0200 +++ new/jellyfish-0.7.1/README.rst 2019-01-11 05:30:23.000000000 +0100 @@ -20,7 +20,7 @@ Jellyfish is a python library for doing approximate and phonetic matching of strings. -Written by James Turk <james.p.t...@gmail.com> and Michael Stephens. +Written by James Turk <d...@jamesturk.net> and Michael Stephens. See https://github.com/jamesturk/jellyfish/graphs/contributors for contributors. @@ -28,6 +28,8 @@ Source is available at http://github.com/jamesturk/jellyfish. +**Jellyfish >= 0.7 only supports Python 3, if you need Python 2 please use 0.6.x.** + Included Algorithms =================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jellyfish-0.6.1/cjellyfish/jellyfishmodule.c new/jellyfish-0.7.1/cjellyfish/jellyfishmodule.c --- old/jellyfish-0.6.1/cjellyfish/jellyfishmodule.c 2018-04-16 16:00:16.000000000 +0200 +++ new/jellyfish-0.7.1/cjellyfish/jellyfishmodule.c 2019-01-11 05:32:26.000000000 +0100 @@ -6,12 +6,9 @@ PyObject *unicodedata_normalize; }; -#if PY_MAJOR_VERSION >= 3 #define GETSTATE(m) ((struct jellyfish_state*)PyModule_GetState(m)) -#else -#define GETSTATE(m) (&_state) -static struct jellyfish_state _state; -#endif +#define UTF8_BYTES(s) (PyBytes_AS_STRING(s)) +#define NO_BYTES_ERR_STR "str argument expected" #ifdef _MSC_VER #define INLINE __inline @@ -19,14 +16,6 @@ #define INLINE inline #endif -#if PY_MAJOR_VERSION >= 3 -#define UTF8_BYTES(s) (PyBytes_AS_STRING(s)) -#define NO_BYTES_ERR_STR "str argument expected" -#else -#define UTF8_BYTES(s) (PyString_AS_STRING(s)) -#define NO_BYTES_ERR_STR "unicode argument expected" -#endif - #define UNSUPPORTED_CODEPOINT "Encountered unsupported code point in string." @@ -391,7 +380,6 @@ {NULL, NULL, 0, NULL} }; -#if PY_MAJOR_VERSION >= 3 #define INITERROR return NULL static struct PyModuleDef moduledef = { @@ -407,20 +395,9 @@ }; PyObject* PyInit_cjellyfish(void) -#else - -#define INITERROR return - -PyMODINIT_FUNC initcjellyfish(void) -#endif { PyObject *unicodedata; - -#if PY_MAJOR_VERSION >= 3 PyObject *module = PyModule_Create(&moduledef); -#else - PyObject *module = Py_InitModule("jellyfish.cjellyfish", jellyfish_methods); -#endif if (module == NULL) { INITERROR; @@ -435,7 +412,5 @@ PyObject_GetAttrString(unicodedata, "normalize"); Py_DECREF(unicodedata); -#if PY_MAJOR_VERSION >= 3 return module; -#endif } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jellyfish-0.6.1/cjellyfish/nysiis.c new/jellyfish-0.7.1/cjellyfish/nysiis.c --- old/jellyfish-0.6.1/cjellyfish/nysiis.c 2018-04-16 16:00:16.000000000 +0200 +++ new/jellyfish-0.7.1/cjellyfish/nysiis.c 2019-01-11 05:32:26.000000000 +0100 @@ -41,7 +41,7 @@ copy[0] = 'N'; } else if (len >= 1 && copy[0] == 'K') { copy[0] = 'C'; - } else if (len >= 2 && copy[0] == 'P' && copy[1] == 'H') { + } else if (len >= 2 && copy[0] == 'P' && (copy[1] == 'H' || copy[1] == 'F')) { copy[0] = 'F'; copy[1] = 'F'; } else if (len >= 3 && copy[0] == 'S' && copy[1] == 'C' && copy[2] == 'H') { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jellyfish-0.6.1/docs/changelog.rst new/jellyfish-0.7.1/docs/changelog.rst --- old/jellyfish-0.6.1/docs/changelog.rst 2018-04-16 15:59:20.000000000 +0200 +++ new/jellyfish-0.7.1/docs/changelog.rst 2019-01-11 05:35:33.000000000 +0100 @@ -1,6 +1,15 @@ Changelog ========= +0.7.1 - 10 January 2019 +----------------------- +* restrict install to Python >= 3.4 + +0.7.0 - 10 January 2019 +----------------------- +* drop Python 2 compatibility & legacy code +* add bugfix for NYSIIS for words starting with PF + 0.6.1 - April 16 2018 --------------------- * fixed wheel release issue diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jellyfish-0.6.1/docs/conf.py new/jellyfish-0.7.1/docs/conf.py --- old/jellyfish-0.6.1/docs/conf.py 2018-04-16 15:58:30.000000000 +0200 +++ new/jellyfish-0.7.1/docs/conf.py 2019-01-11 05:35:39.000000000 +0100 @@ -45,16 +45,16 @@ # General information about the project. project = 'jellyfish' -copyright = '2016, James Turk' +copyright = '2018, James Turk' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -version = '0.6' +version = '0.7' # The full version, including alpha/beta/rc tags. -release = '0.6.0' +release = '0.7.1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jellyfish-0.6.1/jellyfish/_jellyfish.py new/jellyfish-0.7.1/jellyfish/_jellyfish.py --- old/jellyfish-0.6.1/jellyfish/_jellyfish.py 2017-10-06 06:36:10.000000000 +0200 +++ new/jellyfish-0.7.1/jellyfish/_jellyfish.py 2019-01-11 05:30:23.000000000 +0100 @@ -1,6 +1,6 @@ import unicodedata from collections import defaultdict -from .compat import _range, _zip_longest, IS_PY3 +from itertools import zip_longest from .porter import Stemmer @@ -9,10 +9,8 @@ def _check_type(s): - if IS_PY3 and not isinstance(s, str): + if not isinstance(s, str): raise TypeError('expected str or unicode, got %s' % type(s).__name__) - elif not IS_PY3 and not isinstance(s, unicode): - raise TypeError('expected unicode, got %s' % type(s).__name__) def levenshtein_distance(s1, s2): @@ -31,9 +29,9 @@ prev = None cur = range(cols) - for r in _range(1, rows): + for r in range(1, rows): prev, cur = cur, [r] + [0]*(cols-1) - for c in _range(1, cols): + for c in range(1, cols): deletion = prev[c] + 1 insertion = cur[c-1] + 1 edit = prev[c-1] + (0 if s1[r-1] == s2[c-1] else 1) @@ -65,7 +63,7 @@ for i, ying_ch in enumerate(ying): low = i - search_range if i > search_range else 0 hi = i + search_range if i + search_range < yang_len else yang_len - 1 - for j in _range(low, hi+1): + for j in range(low, hi+1): if not yang_flags[j] and yang[j] == ying_ch: ying_flags[i] = yang_flags[j] = True common_chars += 1 @@ -79,7 +77,7 @@ k = trans_count = 0 for i, ying_f in enumerate(ying_flags): if ying_f: - for j in _range(k, yang_len): + for j in range(k, yang_len): if yang_flags[j]: k = j + 1 break @@ -124,19 +122,19 @@ da = defaultdict(int) # distance matrix - score = [[0]*(len2+2) for x in _range(len1+2)] + score = [[0]*(len2+2) for x in range(len1+2)] score[0][0] = infinite - for i in _range(0, len1+1): + for i in range(0, len1+1): score[i+1][0] = infinite score[i+1][1] = i - for i in _range(0, len2+1): + for i in range(0, len2+1): score[0][i+1] = infinite score[1][i+1] = i - for i in _range(1, len1+1): + for i in range(1, len1+1): db = 0 - for j in _range(1, len2+1): + for j in range(1, len2+1): i1 = da[s2[j-1]] j1 = db cost = 1 @@ -359,7 +357,7 @@ min_rating = 2 # strip off common prefixes - for c1, c2 in _zip_longest(codex1, codex2): + for c1, c2 in zip_longest(codex1, codex2): if c1 != c2: if c1: res1.append(c1) @@ -367,7 +365,7 @@ res2.append(c2) unmatched_count1 = unmatched_count2 = 0 - for c1, c2 in _zip_longest(reversed(res1), reversed(res2)): + for c1, c2 in zip_longest(reversed(res1), reversed(res2)): if c1 != c2: if c1: unmatched_count1 += 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jellyfish-0.6.1/jellyfish/compat.py new/jellyfish-0.7.1/jellyfish/compat.py --- old/jellyfish-0.6.1/jellyfish/compat.py 2017-10-06 06:36:10.000000000 +0200 +++ new/jellyfish-0.7.1/jellyfish/compat.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,11 +0,0 @@ -import sys -import itertools - -IS_PY3 = sys.version_info[0] == 3 - -if IS_PY3: - _range = range - _zip_longest = itertools.zip_longest -else: - _range = xrange - _zip_longest = itertools.izip_longest diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jellyfish-0.6.1/jellyfish/porter.py new/jellyfish-0.7.1/jellyfish/porter.py --- old/jellyfish-0.6.1/jellyfish/porter.py 2017-10-06 06:36:10.000000000 +0200 +++ new/jellyfish-0.7.1/jellyfish/porter.py 2019-01-11 05:30:23.000000000 +0100 @@ -1,5 +1,3 @@ -from .compat import _range - _s2_options = { 'a': ((['a', 't', 'i', 'o', 'n', 'a', 'l'], ['a', 't', 'e']), (['t', 'i', 'o', 'n', 'a', 'l'], ['t', 'i', 'o', 'n'])), @@ -96,7 +94,7 @@ def vowel_in_stem(self): """ True iff 0...j contains vowel """ - for i in _range(0, self.j+1): + for i in range(0, self.j+1): if not self.cons(i): return True return False diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jellyfish-0.6.1/jellyfish/test.py new/jellyfish-0.7.1/jellyfish/test.py --- old/jellyfish-0.6.1/jellyfish/test.py 2017-10-06 06:36:10.000000000 +0200 +++ new/jellyfish-0.7.1/jellyfish/test.py 2019-01-11 05:30:23.000000000 +0100 @@ -1,14 +1,10 @@ # -*- coding: utf-8 -*- import sys -if sys.version_info[0] < 3: - import unicodecsv as csv - open_kwargs = {} -else: - import csv - open_kwargs = {'encoding': 'utf8'} +import csv import platform import pytest +open_kwargs = {'encoding': 'utf8'} def assertAlmostEqual(a, b, places=3): assert abs(a - b) < (0.1**places) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jellyfish-0.6.1/jellyfish.egg-info/PKG-INFO new/jellyfish-0.7.1/jellyfish.egg-info/PKG-INFO --- old/jellyfish-0.6.1/jellyfish.egg-info/PKG-INFO 2018-04-16 16:00:27.000000000 +0200 +++ new/jellyfish-0.7.1/jellyfish.egg-info/PKG-INFO 2019-01-11 05:35:52.000000000 +0100 @@ -1,10 +1,8 @@ -Metadata-Version: 1.1 +Metadata-Version: 1.2 Name: jellyfish -Version: 0.6.1 +Version: 0.7.1 Summary: a library for doing approximate and phonetic matching of strings. Home-page: http://github.com/jamesturk/jellyfish -Author: UNKNOWN -Author-email: UNKNOWN License: UNKNOWN Description: ========= jellyfish @@ -28,7 +26,7 @@ Jellyfish is a python library for doing approximate and phonetic matching of strings. - Written by James Turk <james.p.t...@gmail.com> and Michael Stephens. + Written by James Turk <d...@jamesturk.net> and Michael Stephens. See https://github.com/jamesturk/jellyfish/graphs/contributors for contributors. @@ -36,6 +34,8 @@ Source is available at http://github.com/jamesturk/jellyfish. + **Jellyfish >= 0.7 only supports Python 3, if you need Python 2 please use 0.6.x.** + Included Algorithms =================== @@ -94,8 +94,8 @@ Classifier: License :: OSI Approved :: BSD License Classifier: Natural Language :: English Classifier: Operating System :: OS Independent -Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Topic :: Text Processing :: Linguistic +Requires-Python: >3.4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jellyfish-0.6.1/jellyfish.egg-info/SOURCES.txt new/jellyfish-0.7.1/jellyfish.egg-info/SOURCES.txt --- old/jellyfish-0.6.1/jellyfish.egg-info/SOURCES.txt 2018-04-16 16:00:27.000000000 +0200 +++ new/jellyfish-0.7.1/jellyfish.egg-info/SOURCES.txt 2019-01-11 05:35:52.000000000 +0100 @@ -22,7 +22,6 @@ docs/stemming.rst jellyfish/__init__.py jellyfish/_jellyfish.py -jellyfish/compat.py jellyfish/porter.py jellyfish/test.py jellyfish.egg-info/PKG-INFO diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jellyfish-0.6.1/setup.cfg new/jellyfish-0.7.1/setup.cfg --- old/jellyfish-0.6.1/setup.cfg 2018-04-16 16:00:27.000000000 +0200 +++ new/jellyfish-0.7.1/setup.cfg 2019-01-11 05:35:53.000000000 +0100 @@ -1,5 +1,4 @@ [egg_info] tag_build = tag_date = 0 -tag_svn_revision = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jellyfish-0.6.1/setup.py new/jellyfish-0.7.1/setup.py --- old/jellyfish-0.6.1/setup.py 2018-04-16 15:58:50.000000000 +0200 +++ new/jellyfish-0.7.1/setup.py 2019-01-11 05:35:08.000000000 +0100 @@ -95,7 +95,8 @@ long_description = readme.read() setup(name="jellyfish", - version="0.6.1", + version="0.7.1", + python_requires=">3.4", platforms=["any"], description=("a library for doing approximate and " "phonetic matching of strings."), @@ -106,7 +107,6 @@ "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: OS Independent", - "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jellyfish-0.6.1/testdata/metaphone.csv new/jellyfish-0.7.1/testdata/metaphone.csv --- old/jellyfish-0.6.1/testdata/metaphone.csv 2018-04-16 16:00:21.000000000 +0200 +++ new/jellyfish-0.7.1/testdata/metaphone.csv 2019-01-11 05:32:26.000000000 +0100 @@ -26,3 +26,4 @@ 8 queens,KNS Utah,UT WH,W +walt,WLT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jellyfish-0.6.1/testdata/nysiis.csv new/jellyfish-0.7.1/testdata/nysiis.csv --- old/jellyfish-0.6.1/testdata/nysiis.csv 2018-04-16 16:00:21.000000000 +0200 +++ new/jellyfish-0.7.1/testdata/nysiis.csv 2019-01-11 05:32:26.000000000 +0100 @@ -31,3 +31,4 @@ K,C M,M E,E +PFEISTER,FASTAR