[Python-modules-commits] [fuzzywuzzy] 02/04: Import fuzzywuzzy_0.10.0.orig.tar.gz
Edward Betts
edward at moszumanska.debian.org
Tue Mar 22 08:29:15 UTC 2016
This is an automated email from the git hooks/post-receive script.
edward pushed a commit to branch master
in repository fuzzywuzzy.
commit d6e1af1eda2c277c1204be8cf3da4ff11baa7897
Author: Edward Betts <edward at 4angle.com>
Date: Mon Mar 21 17:11:58 2016 +0000
Import fuzzywuzzy_0.10.0.orig.tar.gz
---
CHANGES.rst | 18 +++++++++++
PKG-INFO | 6 ++--
README | 4 +--
README.rst | 4 +--
debian/.git-dpm | 11 -------
debian/changelog | 67 -----------------------------------------
debian/compat | 1 -
debian/control | 58 -----------------------------------
debian/copyright | 52 --------------------------------
debian/rules | 11 -------
debian/source/format | 1 -
debian/tests/control | 5 ---
debian/tests/python-fuzzywuzzy | 2 --
debian/tests/python3-fuzzywuzzy | 2 --
debian/watch | 2 --
fuzzywuzzy.egg-info/PKG-INFO | 6 ++--
fuzzywuzzy.egg-info/pbr.json | 2 +-
fuzzywuzzy/__init__.py | 2 +-
fuzzywuzzy/fuzz.py | 4 ++-
fuzzywuzzy/string_processing.py | 16 ++++------
fuzzywuzzy/utils.py | 6 ++--
test_fuzzywuzzy.py | 10 +++---
22 files changed, 45 insertions(+), 245 deletions(-)
diff --git a/CHANGES.rst b/CHANGES.rst
index 447dcd3..d95eb31 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,6 +1,24 @@
Changelog
=========
+0.10.0 (2016-03-13)
+-------------------
+
+- Handle None inputs same as empty string (Issue #94) [Nick Miller]
+
+0.9.0 (2016-03-07)
+------------------
+
+- Pull down all keys when updating local copy. [Jose Diaz-Gonzalez]
+
+0.8.2 (2016-02-26)
+------------------
+
+- Remove the warning for "slow" sequence matcher on PyPy. [Julian
+ Berman]
+
+ where it's preferable to use the pure-python implementation.
+
0.8.1 (2016-01-25)
------------------
diff --git a/PKG-INFO b/PKG-INFO
index b90c625..21a33fc 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: fuzzywuzzy
-Version: 0.8.1
+Version: 0.10.0
Summary: Fuzzy string matching in python
Home-page: https://github.com/seatgeek/fuzzywuzzy
Author: Adam Cohen
@@ -54,13 +54,13 @@ Description: |Build Status|
.. code:: bash
- pip install git+git://github.com/seatgeek/fuzzywuzzy.git@0.8.1#egg=fuzzywuzzy
+ pip install git+git://github.com/seatgeek/fuzzywuzzy.git@0.10.0#egg=fuzzywuzzy
Adding to your ``requirements.txt`` file (run ``pip install -r requirements.txt`` afterwards)
.. code:: bash
- git+ssh://git@github.com/seatgeek/fuzzywuzzy.git@0.8.1#egg=fuzzywuzzy
+ git+ssh://git@github.com/seatgeek/fuzzywuzzy.git@0.10.0#egg=fuzzywuzzy
Manually via GIT
diff --git a/README b/README
index 80a7203..0356270 100644
--- a/README
+++ b/README
@@ -26,13 +26,13 @@ Using PIP via Github
.. code:: bash
- pip install git+git://github.com/seatgeek/fuzzywuzzy.git@0.8.1#egg=fuzzywuzzy
+ pip install git+git://github.com/seatgeek/fuzzywuzzy.git@0.10.0#egg=fuzzywuzzy
Adding to your ``requirements.txt`` file (run ``pip install -r requirements.txt`` afterwards)
.. code:: bash
- git+ssh://git@github.com/seatgeek/fuzzywuzzy.git@0.8.1#egg=fuzzywuzzy
+ git+ssh://git@github.com/seatgeek/fuzzywuzzy.git@0.10.0#egg=fuzzywuzzy
Manually via GIT
diff --git a/README.rst b/README.rst
index 80a7203..0356270 100644
--- a/README.rst
+++ b/README.rst
@@ -26,13 +26,13 @@ Using PIP via Github
.. code:: bash
- pip install git+git://github.com/seatgeek/fuzzywuzzy.git@0.8.1#egg=fuzzywuzzy
+ pip install git+git://github.com/seatgeek/fuzzywuzzy.git@0.10.0#egg=fuzzywuzzy
Adding to your ``requirements.txt`` file (run ``pip install -r requirements.txt`` afterwards)
.. code:: bash
- git+ssh://git@github.com/seatgeek/fuzzywuzzy.git@0.8.1#egg=fuzzywuzzy
+ git+ssh://git@github.com/seatgeek/fuzzywuzzy.git@0.10.0#egg=fuzzywuzzy
Manually via GIT
diff --git a/debian/.git-dpm b/debian/.git-dpm
deleted file mode 100644
index 13e8885..0000000
--- a/debian/.git-dpm
+++ /dev/null
@@ -1,11 +0,0 @@
-# see git-dpm(1) from git-dpm package
-b13361e2f400185059752e3417d61e9df8c32c4b
-b13361e2f400185059752e3417d61e9df8c32c4b
-b13361e2f400185059752e3417d61e9df8c32c4b
-b13361e2f400185059752e3417d61e9df8c32c4b
-fuzzywuzzy_0.8.1.orig.tar.gz
-63be9d56b2079ad27d21f24954d44e58fcde310d
-16739
-debianTag="debian/%e%v"
-patchedTag="patched/%e%v"
-upstreamTag="upstream/%e%u"
diff --git a/debian/changelog b/debian/changelog
deleted file mode 100644
index ac27656..0000000
--- a/debian/changelog
+++ /dev/null
@@ -1,67 +0,0 @@
-fuzzywuzzy (0.8.1-4) unstable; urgency=medium
-
- * debian/tests/control: fix Depends, pep8 module is now in python-pep8
-
- -- Edward Betts <edward at 4angle.com> Fri, 11 Mar 2016 07:10:55 +0000
-
-fuzzywuzzy (0.8.1-3) unstable; urgency=low
-
- * debian/control: update Build-Depends, pep8 module is now in python-pep8
-
- -- Edward Betts <edward at 4angle.com> Thu, 10 Mar 2016 09:24:33 +0000
-
-fuzzywuzzy (0.8.1-2) unstable; urgency=low
-
- * debian/rules: fix invalid Vcs-Git URL
-
- -- Edward Betts <edward at 4angle.com> Tue, 23 Feb 2016 07:15:32 +0000
-
-fuzzywuzzy (0.8.1-1) unstable; urgency=low
-
- * New upstream release.
- * debian/control: remove unneeded versions on Build-Depends
- * debian/control: update Standards-Version (no changes)
- * debian/control: update Vcs-Git field to use https
-
- -- Edward Betts <edward at 4angle.com> Sun, 21 Feb 2016 07:15:00 +0000
-
-fuzzywuzzy (0.8.0-2) unstable; urgency=medium
-
- * debian/tests/control: pep8 packages are required for DEP 8 tests
-
- -- Edward Betts <edward at 4angle.com> Tue, 22 Dec 2015 13:47:32 +0000
-
-fuzzywuzzy (0.8.0-1) unstable; urgency=medium
-
- * New upstream release.
- * Add autopkgtest testsuite.
-
- -- Edward Betts <edward at 4angle.com> Wed, 02 Dec 2015 12:30:33 +0000
-
-fuzzywuzzy (0.7.0-1) unstable; urgency=medium
-
- * New upstream release.
- * Update Vcs-* control headers.
-
- -- Edward Betts <edward at 4angle.com> Mon, 19 Oct 2015 14:00:54 +0100
-
-fuzzywuzzy (0.6.2-1) unstable; urgency=medium
-
- * New upstream release
- * debian/control: add a longer extended description
-
- -- Edward Betts <edward at 4angle.com> Tue, 08 Sep 2015 10:34:12 +0100
-
-fuzzywuzzy (0.6.1-1) unstable; urgency=low
-
- * New upstream release.
- * Move to unstable. This package depends on python-levenshtein >= 0.12.0,
- which recently moved from experimental to unstable.
-
- -- Edward Betts <edward at 4angle.com> Mon, 17 Aug 2015 15:34:39 +0200
-
-fuzzywuzzy (0.5.0-1) experimental; urgency=low
-
- * Initial release. (Closes: #781282)
-
- -- Edward Betts <edward at 4angle.com> Thu, 26 Mar 2015 21:20:50 +0000
diff --git a/debian/compat b/debian/compat
deleted file mode 100644
index ec63514..0000000
--- a/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-9
diff --git a/debian/control b/debian/control
deleted file mode 100644
index d77b755..0000000
--- a/debian/control
+++ /dev/null
@@ -1,58 +0,0 @@
-Source: fuzzywuzzy
-Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
-Uploaders: Edward Betts <edward at 4angle.com>
-Section: python
-Priority: optional
-Build-Depends: debhelper (>= 9),
- dh-python,
- python-pep8,
- python-all,
- python-levenshtein (>= 0.12),
- python-nose,
- python-setuptools,
- python3-all,
- python3-levenshtein (>= 0.12),
- python3-nose,
- python3-pep8,
- python3-setuptools
-Standards-Version: 3.9.7
-Homepage: https://github.com/seatgeek/fuzzywuzzy
-Vcs-Browser: https://anonscm.debian.org/cgit/python-modules/packages/fuzzywuzzy.git
-Vcs-Git: https://anonscm.debian.org/git/python-modules/packages/fuzzywuzzy.git
-
-Package: python-fuzzywuzzy
-Architecture: all
-Depends: python-levenshtein (>= 0.12), ${misc:Depends}, ${python:Depends}
-Provides: ${python:Provides}
-Description: Fuzzy string matching in Python
- Various methods for fuzzy matching of strings in Python, including:
- .
- - String similarity: Gives a measure of string similarity between 0 and 100.
- - Partial string similarity: Inconsistent substrings are a common problem
- when string matching. To get around it, use a "best partial" heuristic
- when two strings are of noticeably different lengths.
- - Token sort: This approach involves tokenizing the string in question,
- sorting the tokens alphabetically, and then joining them back into a
- string.
- - Token sort: A slightly more flexible approach. Tokenize both strings, but
- instead of immediately sorting and comparing, split the tokens into two
- groups: intersection and remainder.
-
-Package: python3-fuzzywuzzy
-Architecture: all
-Depends: python3-levenshtein (>= 0.12), ${misc:Depends}, ${python3:Depends}
-Description: Fuzzy string matching in Python (Python 3 version)
- Various methods for fuzzy matching of strings in Python, including:
- .
- - String similarity: Gives a measure of string similarity between 0 and 100.
- - Partial string similarity: Inconsistent substrings are a common problem
- when string matching. To get around it, use a "best partial" heuristic
- when two strings are of noticeably different lengths.
- - Token sort: This approach involves tokenizing the string in question,
- sorting the tokens alphabetically, and then joining them back into a
- string.
- - Token sort: A slightly more flexible approach. Tokenize both strings, but
- instead of immediately sorting and comparing, split the tokens into two
- groups: intersection and remainder.
- .
- This package contains fuzzywuzzy for Python 3.
diff --git a/debian/copyright b/debian/copyright
deleted file mode 100644
index fffdb89..0000000
--- a/debian/copyright
+++ /dev/null
@@ -1,52 +0,0 @@
-Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
-Upstream-Name: fuzzywuzzy
-Upstream-Contact: Adam Cohen <adam at seatgeek.com>
-Source: https://github.com/seatgeek/fuzzywuzzy
-
-Files: *
-Copyright: Copyright 2014 SeatGeek, Inc.
-License: MIT
- Copyright (c) 2014 SeatGeek, Inc.
- .
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
- .
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
- .
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Files: debian/*
-Copyright: 2015, Edward Betts
-License: GPL-2+
- This program is free software; you can redistribute it
- and/or modify it under the terms of the GNU General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later
- version.
- .
- This program is distributed in the hope that it will be
- useful, but WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- PURPOSE. See the GNU General Public License for more
- details.
- .
- You should have received a copy of the GNU General Public
- License along with this package; if not, write to the Free
- Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- Boston, MA 02110-1301 USA
- .
- On Debian systems, the full text of the GNU General Public
- License version 2 can be found in the file
- `/usr/share/common-licenses/GPL-2'.
diff --git a/debian/rules b/debian/rules
deleted file mode 100755
index 815be2e..0000000
--- a/debian/rules
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/make -f
-
-export PYBUILD_NAME=fuzzywuzzy
-export PYBUILD_TEST_NOSE=1
-export PYBUILD_TEST_ARGS="{dir}/test_fuzzywuzzy.py"
-
-%:
- dh $@ --with python2,python3 --buildsystem=pybuild
-
-override_dh_installchangelogs:
- dh_installchangelogs CHANGES.rst
diff --git a/debian/source/format b/debian/source/format
deleted file mode 100644
index 163aaf8..0000000
--- a/debian/source/format
+++ /dev/null
@@ -1 +0,0 @@
-3.0 (quilt)
diff --git a/debian/tests/control b/debian/tests/control
deleted file mode 100644
index ec9368b..0000000
--- a/debian/tests/control
+++ /dev/null
@@ -1,5 +0,0 @@
-Tests: python-fuzzywuzzy
-Depends: @, python-pep8
-
-Tests: python3-fuzzywuzzy
-Depends: @, python3-pep8
diff --git a/debian/tests/python-fuzzywuzzy b/debian/tests/python-fuzzywuzzy
deleted file mode 100755
index c234bc8..0000000
--- a/debian/tests/python-fuzzywuzzy
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-python test_fuzzywuzzy.py 2>&1
diff --git a/debian/tests/python3-fuzzywuzzy b/debian/tests/python3-fuzzywuzzy
deleted file mode 100755
index 41b7da8..0000000
--- a/debian/tests/python3-fuzzywuzzy
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-python3 test_fuzzywuzzy.py 2>&1
diff --git a/debian/watch b/debian/watch
deleted file mode 100644
index eb0d194..0000000
--- a/debian/watch
+++ /dev/null
@@ -1,2 +0,0 @@
-version=3
-http://pypi.debian.net/fuzzywuzzy/fuzzywuzzy-(.+)\.tar\.gz
diff --git a/fuzzywuzzy.egg-info/PKG-INFO b/fuzzywuzzy.egg-info/PKG-INFO
index b90c625..21a33fc 100644
--- a/fuzzywuzzy.egg-info/PKG-INFO
+++ b/fuzzywuzzy.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: fuzzywuzzy
-Version: 0.8.1
+Version: 0.10.0
Summary: Fuzzy string matching in python
Home-page: https://github.com/seatgeek/fuzzywuzzy
Author: Adam Cohen
@@ -54,13 +54,13 @@ Description: |Build Status|
.. code:: bash
- pip install git+git://github.com/seatgeek/fuzzywuzzy.git@0.8.1#egg=fuzzywuzzy
+ pip install git+git://github.com/seatgeek/fuzzywuzzy.git@0.10.0#egg=fuzzywuzzy
Adding to your ``requirements.txt`` file (run ``pip install -r requirements.txt`` afterwards)
.. code:: bash
- git+ssh://git@github.com/seatgeek/fuzzywuzzy.git@0.8.1#egg=fuzzywuzzy
+ git+ssh://git@github.com/seatgeek/fuzzywuzzy.git@0.10.0#egg=fuzzywuzzy
Manually via GIT
diff --git a/fuzzywuzzy.egg-info/pbr.json b/fuzzywuzzy.egg-info/pbr.json
index c4b2109..c3e7452 100644
--- a/fuzzywuzzy.egg-info/pbr.json
+++ b/fuzzywuzzy.egg-info/pbr.json
@@ -1 +1 @@
-{"is_release": true, "git_version": "8a944fb"}
\ No newline at end of file
+{"is_release": true, "git_version": "6244ce3"}
\ No newline at end of file
diff --git a/fuzzywuzzy/__init__.py b/fuzzywuzzy/__init__.py
index dceb6e4..4462bb4 100644
--- a/fuzzywuzzy/__init__.py
+++ b/fuzzywuzzy/__init__.py
@@ -1,2 +1,2 @@
# -*- coding: utf-8 -*-
-__version__ = '0.8.1'
+__version__ = '0.10.0'
diff --git a/fuzzywuzzy/fuzz.py b/fuzzywuzzy/fuzz.py
index 46ace22..da2bc55 100644
--- a/fuzzywuzzy/fuzz.py
+++ b/fuzzywuzzy/fuzz.py
@@ -25,12 +25,14 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""
from __future__ import unicode_literals
+import platform
import warnings
try:
from .StringMatcher import StringMatcher as SequenceMatcher
except ImportError:
- warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')
+ if platform.python_implementation() != "PyPy":
+ warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')
from difflib import SequenceMatcher
from . import utils
diff --git a/fuzzywuzzy/string_processing.py b/fuzzywuzzy/string_processing.py
index 0fee736..1bfc660 100644
--- a/fuzzywuzzy/string_processing.py
+++ b/fuzzywuzzy/string_processing.py
@@ -3,8 +3,9 @@ import re
import string
import sys
-
PY3 = sys.version_info[0] == 3
+if PY3:
+ string = str
class StringProcessor(object):
@@ -22,13 +23,8 @@ class StringProcessor(object):
This function replaces any sequence of non letters and non
numbers with a single white space.
"""
- return cls.regex.sub(u" ", a_string)
+ return cls.regex.sub(" ", a_string)
- if PY3:
- strip = staticmethod(str.strip)
- to_lower_case = staticmethod(str.lower)
- to_upper_case = staticmethod(str.upper)
- else:
- strip = staticmethod(string.strip)
- to_lower_case = staticmethod(string.lower)
- to_upper_case = staticmethod(string.upper)
+ strip = staticmethod(string.strip)
+ to_lower_case = staticmethod(string.lower)
+ to_upper_case = staticmethod(string.upper)
diff --git a/fuzzywuzzy/utils.py b/fuzzywuzzy/utils.py
index bb0426d..7777426 100644
--- a/fuzzywuzzy/utils.py
+++ b/fuzzywuzzy/utils.py
@@ -18,10 +18,8 @@ def validate_string(s):
def check_for_none(func):
@functools.wraps(func)
def decorator(*args, **kwargs):
- if args[0] is None:
- raise TypeError("s1 is None")
- if args[1] is None:
- raise TypeError("s2 is None")
+ if args[0] is None or args[1] is None:
+ return 0
return func(*args, **kwargs)
return decorator
diff --git a/test_fuzzywuzzy.py b/test_fuzzywuzzy.py
index 93123e6..0db3924 100644
--- a/test_fuzzywuzzy.py
+++ b/test_fuzzywuzzy.py
@@ -277,13 +277,11 @@ class ValidatorTest(unittest.TestCase):
]
decorated_func = utils.check_for_none(self.testFunc)
for i in invalid_input:
- self.assertRaises(TypeError, decorated_func, *i)
+ self.assertEqual(decorated_func(*i), 0)
- try:
- valid_input = ['Some', 'Some']
- decorated_func(*valid_input)
- except ValueError as e:
- self.fail('check_for_none matched non-None input', valid_input, e)
+ valid_input = ('Some', 'Some')
+ actual = decorated_func(*valid_input)
+ self.assertNotEqual(actual, 0)
def testCheckEmptyString(self):
invalid_input = [
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/fuzzywuzzy.git
More information about the Python-modules-commits
mailing list