Hello community,
here is the log from the commit of package python-mbstrdecoder for
openSUSE:Factory checked in at 2020-02-07 15:54:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-mbstrdecoder (Old)
and /work/SRC/openSUSE:Factory/.python-mbstrdecoder.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-mbstrdecoder"
Fri Feb 7 15:54:58 2020 rev:3 rq:770662 version:0.8.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-mbstrdecoder/python-mbstrdecoder.changes
2019-07-24 20:35:42.238572975 +0200
+++
/work/SRC/openSUSE:Factory/.python-mbstrdecoder.new.26092/python-mbstrdecoder.changes
2020-02-07 15:56:31.671577706 +0100
@@ -1,0 +2,9 @@
+Thu Feb 6 16:43:18 UTC 2020 - Martin Hauke <[email protected]>
+
+- Update to version 0.8.3:
+ * Fix encoding detection failure
+ * Modify to get a stable result when repeatedly call
+ * Change chardet dependency from optional to mandatory
+ * Update extras_require
+
+-------------------------------------------------------------------
Old:
----
mbstrdecoder-0.8.1.tar.gz
New:
----
mbstrdecoder-0.8.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-mbstrdecoder.spec ++++++
--- /var/tmp/diff_new_pack.y7Hx0R/_old 2020-02-07 15:56:32.383578069 +0100
+++ /var/tmp/diff_new_pack.y7Hx0R/_new 2020-02-07 15:56:32.383578069 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-mbstrdecoder
#
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-mbstrdecoder
-Version: 0.8.1
+Version: 0.8.3
Release: 0
Summary: Multi-byte character string decoder
License: MIT
++++++ mbstrdecoder-0.8.1.tar.gz -> mbstrdecoder-0.8.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mbstrdecoder-0.8.1/LICENSE
new/mbstrdecoder-0.8.3/LICENSE
--- old/mbstrdecoder-0.8.1/LICENSE 2016-12-10 05:35:27.000000000 +0100
+++ new/mbstrdecoder-0.8.3/LICENSE 2019-12-29 00:54:43.000000000 +0100
@@ -1,21 +1,21 @@
-MIT License
-
-Copyright (c) 2016 Tsuyoshi Hombashi
-
-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.
+MIT License
+
+Copyright (c) 2016 Tsuyoshi Hombashi
+
+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.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mbstrdecoder-0.8.1/PKG-INFO
new/mbstrdecoder-0.8.3/PKG-INFO
--- old/mbstrdecoder-0.8.1/PKG-INFO 2019-05-11 11:14:01.000000000 +0200
+++ new/mbstrdecoder-0.8.3/PKG-INFO 2020-01-04 13:33:03.546205300 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: mbstrdecoder
-Version: 0.8.1
+Version: 0.8.3
Summary: multi-byte character string decoder
Home-page: https://github.com/thombashi/mbstrdecoder
Author: Tsuyoshi Hombashi
@@ -47,12 +47,6 @@
pip install mbstrdecoder
- or install all of the optional dependencies:
-
- ::
-
- pip install mbstrdecoder[all]
-
Install from PPA (for Ubuntu)
------------------------------
::
@@ -68,7 +62,6 @@
:Sample Code:
.. code:: python
- from __future__ import print_function
from mbstrdecoder import MultiByteStrDecoder
encoded_multibyte_text = "マルチバイト文字".encode("utf-8")
@@ -88,10 +81,8 @@
Dependencies
============
- Python 2.7+ or 3.5+
+ Python 2.7+ or 3.5+ or `PyPy <https://pypy.org/>`__
- Optional dependencies
- ----------------------------------
- `chardet <https://github.com/chardet/chardet>`__
Test dependencies
@@ -103,7 +94,7 @@
Keywords: multi-byte character,unicode,decoder
Platform: UNKNOWN
-Classifier: Development Status :: 3 - Alpha
+Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: MIT License
@@ -115,11 +106,11 @@
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Processing
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
Provides-Extra: all
-Provides-Extra: build
+Provides-Extra: dev
Provides-Extra: test
-Provides-Extra: release
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mbstrdecoder-0.8.1/README.rst
new/mbstrdecoder-0.8.3/README.rst
--- old/mbstrdecoder-0.8.1/README.rst 2019-05-02 08:01:42.000000000 +0200
+++ new/mbstrdecoder-0.8.3/README.rst 2020-01-04 13:22:50.000000000 +0100
@@ -37,12 +37,6 @@
pip install mbstrdecoder
-or install all of the optional dependencies:
-
-::
-
- pip install mbstrdecoder[all]
-
Install from PPA (for Ubuntu)
------------------------------
::
@@ -58,7 +52,6 @@
:Sample Code:
.. code:: python
- from __future__ import print_function
from mbstrdecoder import MultiByteStrDecoder
encoded_multibyte_text = "マルチバイト文字".encode("utf-8")
@@ -78,10 +71,8 @@
Dependencies
============
-Python 2.7+ or 3.5+
+Python 2.7+ or 3.5+ or `PyPy <https://pypy.org/>`__
-Optional dependencies
-----------------------------------
- `chardet <https://github.com/chardet/chardet>`__
Test dependencies
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mbstrdecoder-0.8.1/mbstrdecoder/__version__.py
new/mbstrdecoder-0.8.3/mbstrdecoder/__version__.py
--- old/mbstrdecoder-0.8.1/mbstrdecoder/__version__.py 2019-05-11
11:10:14.000000000 +0200
+++ new/mbstrdecoder-0.8.3/mbstrdecoder/__version__.py 2020-01-04
13:32:38.000000000 +0100
@@ -6,6 +6,6 @@
__author__ = "Tsuyoshi Hombashi"
__copyright__ = "Copyright 2016-{}, {}".format(datetime.now().year, __author__)
__license__ = "MIT License"
-__version__ = "0.8.1"
+__version__ = "0.8.3"
__maintainer__ = __author__
__email__ = "[email protected]"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mbstrdecoder-0.8.1/mbstrdecoder/_mbstrdecoder.py
new/mbstrdecoder-0.8.3/mbstrdecoder/_mbstrdecoder.py
--- old/mbstrdecoder-0.8.1/mbstrdecoder/_mbstrdecoder.py 2018-12-30
01:57:54.000000000 +0100
+++ new/mbstrdecoder-0.8.3/mbstrdecoder/_mbstrdecoder.py 2020-01-03
09:28:22.000000000 +0100
@@ -6,6 +6,7 @@
from __future__ import absolute_import, unicode_literals
+import copy
import re
import sys
@@ -186,10 +187,7 @@
@staticmethod
def __detect_encoding_helper(encoded_str):
- try:
- import chardet
- except ImportError:
- return None
+ import chardet
try:
detect = chardet.detect(encoded_str)
@@ -197,15 +195,16 @@
detect = {}
detect_encoding = detect.get("encoding")
+ confidence = detect.get("confidence")
- if detect_encoding != "ascii" and detect.get("confidence") == 1:
+ if detect_encoding not in ["ascii", "utf-8"] and confidence and
confidence > 0.7:
# utf7 tend to be misrecognized as ascii
return detect_encoding
return None
def __get_codec_candidate_list(self, encoded_str):
- codec_candidate_list = self.__CODEC_LIST
+ codec_candidate_list = copy.deepcopy(self.__CODEC_LIST)
detect_encoding = self.__detect_encoding_helper(encoded_str)
if detect_encoding:
@@ -231,9 +230,7 @@
self.__codec = "unicode"
return ""
- codec_candidate_list = self.__get_codec_candidate_list(encoded_str)
-
- for codec in codec_candidate_list:
+ for codec in self.__get_codec_candidate_list(encoded_str):
if not codec:
continue
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mbstrdecoder-0.8.1/mbstrdecoder.egg-info/PKG-INFO
new/mbstrdecoder-0.8.3/mbstrdecoder.egg-info/PKG-INFO
--- old/mbstrdecoder-0.8.1/mbstrdecoder.egg-info/PKG-INFO 2019-05-11
11:14:00.000000000 +0200
+++ new/mbstrdecoder-0.8.3/mbstrdecoder.egg-info/PKG-INFO 2020-01-04
13:33:03.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: mbstrdecoder
-Version: 0.8.1
+Version: 0.8.3
Summary: multi-byte character string decoder
Home-page: https://github.com/thombashi/mbstrdecoder
Author: Tsuyoshi Hombashi
@@ -47,12 +47,6 @@
pip install mbstrdecoder
- or install all of the optional dependencies:
-
- ::
-
- pip install mbstrdecoder[all]
-
Install from PPA (for Ubuntu)
------------------------------
::
@@ -68,7 +62,6 @@
:Sample Code:
.. code:: python
- from __future__ import print_function
from mbstrdecoder import MultiByteStrDecoder
encoded_multibyte_text = "マルチバイト文字".encode("utf-8")
@@ -88,10 +81,8 @@
Dependencies
============
- Python 2.7+ or 3.5+
+ Python 2.7+ or 3.5+ or `PyPy <https://pypy.org/>`__
- Optional dependencies
- ----------------------------------
- `chardet <https://github.com/chardet/chardet>`__
Test dependencies
@@ -103,7 +94,7 @@
Keywords: multi-byte character,unicode,decoder
Platform: UNKNOWN
-Classifier: Development Status :: 3 - Alpha
+Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: MIT License
@@ -115,11 +106,11 @@
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Processing
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
Provides-Extra: all
-Provides-Extra: build
+Provides-Extra: dev
Provides-Extra: test
-Provides-Extra: release
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mbstrdecoder-0.8.1/mbstrdecoder.egg-info/SOURCES.txt
new/mbstrdecoder-0.8.3/mbstrdecoder.egg-info/SOURCES.txt
--- old/mbstrdecoder-0.8.1/mbstrdecoder.egg-info/SOURCES.txt 2019-05-11
11:14:01.000000000 +0200
+++ new/mbstrdecoder-0.8.3/mbstrdecoder.egg-info/SOURCES.txt 2020-01-04
13:33:03.000000000 +0100
@@ -1,6 +1,7 @@
LICENSE
MANIFEST.in
README.rst
+pyproject.toml
setup.cfg
setup.py
tox.ini
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/mbstrdecoder-0.8.1/mbstrdecoder.egg-info/requires.txt
new/mbstrdecoder-0.8.3/mbstrdecoder.egg-info/requires.txt
--- old/mbstrdecoder-0.8.1/mbstrdecoder.egg-info/requires.txt 2019-05-11
11:14:00.000000000 +0200
+++ new/mbstrdecoder-0.8.3/mbstrdecoder.egg-info/requires.txt 2020-01-04
13:33:03.000000000 +0100
@@ -1,16 +1,22 @@
setuptools>=38.3.0
+chardet<4,>=3.0.4
[all]
-chardet<4.0.0,>=3.0.4
-[build]
+[dev]
+releasecmd<1,>=0.1.0
twine
wheel
-
-[release]
-releasecmd<0.1.0,>=0.0.18
+autoflake
+black
+isort
+codespell
+pylama
+Faker>=1.0.2
+pytest
+six
[test]
-Faker<2.0.0,>=1.0.2
+Faker>=1.0.2
pytest
six
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mbstrdecoder-0.8.1/pyproject.toml
new/mbstrdecoder-0.8.3/pyproject.toml
--- old/mbstrdecoder-0.8.1/pyproject.toml 1970-01-01 01:00:00.000000000
+0100
+++ new/mbstrdecoder-0.8.3/pyproject.toml 2020-01-04 07:41:26.000000000
+0100
@@ -0,0 +1,47 @@
+[tool.black]
+line-length = 100
+exclude = '''
+/(
+ \.eggs
+ | \.git
+ | \.mypy_cache
+ | \.tox
+ | \.venv
+ | _build
+ | buck-out
+ | build
+ | dist
+)/
+| docs/conf.py
+'''
+
+[tool.isort]
+dont_skip = "*/**/__init__.py"
+known_third_party = [
+]
+include_trailing_comma = true
+line_length = 100
+lines_after_imports = 2
+multi_line_output = 3
+skip_glob = [
+ '*/.eggs/*',
+ '*/.tox/*',
+]
+
+[tool.coverage.run]
+source = ["mbstrdecoder"]
+branch = true
+
+[tool.coverage.report]
+show_missing = true
+precision = 1
+exclude_lines = [
+ 'except ImportError',
+ 'raise NotImplementedError',
+ 'pass',
+ 'ABCmeta',
+ 'abstractmethod',
+ 'abstractproperty',
+ 'abstractclassmethod',
+ 'warnings.warn',
+]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mbstrdecoder-0.8.1/requirements/requirements.txt
new/mbstrdecoder-0.8.3/requirements/requirements.txt
--- old/mbstrdecoder-0.8.1/requirements/requirements.txt 2018-12-30
01:52:57.000000000 +0100
+++ new/mbstrdecoder-0.8.3/requirements/requirements.txt 2020-01-03
08:37:29.000000000 +0100
@@ -0,0 +1 @@
+chardet>=3.0.4,<4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/mbstrdecoder-0.8.1/requirements/test_requirements.txt
new/mbstrdecoder-0.8.3/requirements/test_requirements.txt
--- old/mbstrdecoder-0.8.1/requirements/test_requirements.txt 2019-05-11
04:15:42.000000000 +0200
+++ new/mbstrdecoder-0.8.3/requirements/test_requirements.txt 2020-01-03
06:05:00.000000000 +0100
@@ -1,3 +1,3 @@
-Faker>=1.0.2,<2.0.0
+Faker>=1.0.2
pytest
six
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mbstrdecoder-0.8.1/setup.py
new/mbstrdecoder-0.8.3/setup.py
--- old/mbstrdecoder-0.8.1/setup.py 2019-05-11 06:49:19.000000000 +0200
+++ new/mbstrdecoder-0.8.3/setup.py 2020-01-04 13:07:16.000000000 +0100
@@ -1,99 +1,96 @@
-# encoding: utf-8
-
-"""
-.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
-"""
-
-from __future__ import unicode_literals
-
-import io
-import os.path
-import sys
-
-import setuptools
-
-
-MODULE_NAME = "mbstrdecoder"
-REPOSITORY_URL = "https://github.com/thombashi/{:s}".format(MODULE_NAME)
-REQUIREMENT_DIR = "requirements"
-ENCODING = "utf8"
-
-pkg_info = {}
-
-
-def need_pytest():
- return set(["pytest", "test", "ptr"]).intersection(sys.argv)
-
-
-def get_release_command_class():
- try:
- from releasecmd import ReleaseCommand
- except ImportError:
- return {}
-
- return {"release": ReleaseCommand}
-
-
-with open(os.path.join(MODULE_NAME, "__version__.py")) as f:
- exec(f.read(), pkg_info)
-
-with io.open("README.rst", encoding=ENCODING) as f:
- long_description = f.read()
-
-with open(os.path.join(REQUIREMENT_DIR, "requirements.txt")) as f:
- install_requires = [line.strip() for line in f if line.strip()]
-
-with open(os.path.join(REQUIREMENT_DIR, "test_requirements.txt")) as f:
- tests_require = [line.strip() for line in f if line.strip()]
-
-SETUPTOOLS_REQUIRES = ["setuptools>=38.3.0"]
-PYTEST_RUNNER_REQUIRES = ["pytest-runner"] if need_pytest() else []
-OPTIONAL_REQUIRES = ["chardet>=3.0.4,<4.0.0"]
-
-setuptools.setup(
- name=MODULE_NAME,
- version=pkg_info["__version__"],
- url=REPOSITORY_URL,
-
- author=pkg_info["__author__"],
- author_email=pkg_info["__email__"],
- description="multi-byte character string decoder",
- include_package_data=True,
- keywords=["multi-byte character", "unicode", "decoder"],
- license=pkg_info["__license__"],
- long_description=long_description,
- packages=setuptools.find_packages(exclude=["test*"]),
- project_urls={
- "Source": REPOSITORY_URL,
- "Tracker": "{:s}/issues".format(REPOSITORY_URL),
- },
-
- python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",
- install_requires=SETUPTOOLS_REQUIRES + install_requires,
- setup_requires=SETUPTOOLS_REQUIRES + PYTEST_RUNNER_REQUIRES,
- tests_require=tests_require + OPTIONAL_REQUIRES,
- extras_require={
- "all": OPTIONAL_REQUIRES,
- "build": ["twine", "wheel"],
- "release": ["releasecmd>=0.0.18,<0.1.0"],
- "test": tests_require,
- },
-
- classifiers=[
- "Development Status :: 3 - Alpha",
- "Intended Audience :: Developers",
- "Intended Audience :: Information Technology",
- "License :: OSI Approved :: MIT License",
- "Operating System :: OS Independent",
- "Programming Language :: Python :: 2",
- "Programming Language :: Python :: 2.7",
- "Programming Language :: Python :: 3",
- "Programming Language :: Python :: 3.5",
- "Programming Language :: Python :: 3.6",
- "Programming Language :: Python :: 3.7",
- "Programming Language :: Python :: 3.8",
- "Topic :: Software Development :: Libraries",
- "Topic :: Software Development :: Libraries :: Python Modules",
- "Topic :: Text Processing",
- ],
- cmdclass=get_release_command_class())
+# encoding: utf-8
+
+"""
+.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
+"""
+
+from __future__ import unicode_literals
+
+import io
+import os.path
+import sys
+
+import setuptools
+
+
+MODULE_NAME = "mbstrdecoder"
+REPOSITORY_URL = "https://github.com/thombashi/{:s}".format(MODULE_NAME)
+REQUIREMENT_DIR = "requirements"
+ENCODING = "utf8"
+
+pkg_info = {}
+
+
+def need_pytest():
+ return set(["pytest", "test", "ptr"]).intersection(sys.argv)
+
+
+def get_release_command_class():
+ try:
+ from releasecmd import ReleaseCommand
+ except ImportError:
+ return {}
+
+ return {"release": ReleaseCommand}
+
+
+with open(os.path.join(MODULE_NAME, "__version__.py")) as f:
+ exec(f.read(), pkg_info)
+
+with io.open("README.rst", encoding=ENCODING) as f:
+ long_description = f.read()
+
+with open(os.path.join(REQUIREMENT_DIR, "requirements.txt")) as f:
+ install_requires = [line.strip() for line in f if line.strip()]
+
+with open(os.path.join(REQUIREMENT_DIR, "test_requirements.txt")) as f:
+ tests_require = [line.strip() for line in f if line.strip()]
+
+SETUPTOOLS_REQUIRES = ["setuptools>=38.3.0"]
+PYTEST_RUNNER_REQUIRES = ["pytest-runner"] if need_pytest() else []
+
+setuptools.setup(
+ name=MODULE_NAME,
+ version=pkg_info["__version__"],
+ url=REPOSITORY_URL,
+ author=pkg_info["__author__"],
+ author_email=pkg_info["__email__"],
+ description="multi-byte character string decoder",
+ include_package_data=True,
+ keywords=["multi-byte character", "unicode", "decoder"],
+ license=pkg_info["__license__"],
+ long_description=long_description,
+ packages=setuptools.find_packages(exclude=["test*"]),
+ project_urls={"Source": REPOSITORY_URL, "Tracker":
"{:s}/issues".format(REPOSITORY_URL),},
+ python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",
+ install_requires=SETUPTOOLS_REQUIRES + install_requires,
+ setup_requires=SETUPTOOLS_REQUIRES + PYTEST_RUNNER_REQUIRES,
+ tests_require=tests_require,
+ extras_require={
+ "all": [], # TODO: remove in the future release
+ "dev": ["releasecmd>=0.1.0,<1", "twine", "wheel"]
+ + ["autoflake", "black", "isort"]
+ + ["codespell", "pylama"]
+ + tests_require,
+ "test": tests_require,
+ },
+ classifiers=[
+ "Development Status :: 4 - Beta",
+ "Intended Audience :: Developers",
+ "Intended Audience :: Information Technology",
+ "License :: OSI Approved :: MIT License",
+ "Operating System :: OS Independent",
+ "Programming Language :: Python :: 2",
+ "Programming Language :: Python :: 2.7",
+ "Programming Language :: Python :: 3",
+ "Programming Language :: Python :: 3.5",
+ "Programming Language :: Python :: 3.6",
+ "Programming Language :: Python :: 3.7",
+ "Programming Language :: Python :: 3.8",
+ "Programming Language :: Python :: Implementation :: PyPy",
+ "Topic :: Software Development :: Libraries",
+ "Topic :: Software Development :: Libraries :: Python Modules",
+ "Topic :: Text Processing",
+ ],
+ cmdclass=get_release_command_class(),
+)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mbstrdecoder-0.8.1/test/test_binary_ext_checker.py
new/mbstrdecoder-0.8.3/test/test_binary_ext_checker.py
--- old/mbstrdecoder-0.8.1/test/test_binary_ext_checker.py 2019-04-29
09:41:21.000000000 +0200
+++ new/mbstrdecoder-0.8.3/test/test_binary_ext_checker.py 2019-12-29
16:21:56.000000000 +0100
@@ -9,6 +9,7 @@
from os.path import splitext
import pytest
+
from mbstrdecoder._binary_ext_checker import binary_exts, is_binary_ext_path
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mbstrdecoder-0.8.1/test/test_func.py
new/mbstrdecoder-0.8.3/test/test_func.py
--- old/mbstrdecoder-0.8.1/test/test_func.py 2018-09-21 16:30:36.000000000
+0200
+++ new/mbstrdecoder-0.8.3/test/test_func.py 2019-12-29 16:16:17.000000000
+0100
@@ -11,6 +11,7 @@
from textwrap import dedent
import pytest
+
from mbstrdecoder._func import detect_file_encoding, to_codec_name
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mbstrdecoder-0.8.1/test/test_mbstrdecoder.py
new/mbstrdecoder-0.8.3/test/test_mbstrdecoder.py
--- old/mbstrdecoder-0.8.1/test/test_mbstrdecoder.py 2018-08-04
18:22:16.000000000 +0200
+++ new/mbstrdecoder-0.8.3/test/test_mbstrdecoder.py 2020-01-03
09:25:02.000000000 +0100
@@ -1,80 +1,82 @@
-# encoding: utf-8
-
-"""
-.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
-"""
-
-from __future__ import unicode_literals
-
-import pytest
-import six
-from mbstrdecoder import MultiByteStrDecoder
-
-
-nan = float("nan")
-inf = float("inf")
-
-
-class Test_to_MultiByteStrDecoder_repr:
- @pytest.mark.parametrize(["value", "expected"], [["吾輩は猫である",
"codec=unicode, unicode=吾輩は猫である"]])
- def test_normal(self, value, expected):
- decoder = MultiByteStrDecoder(value)
-
- assert six.text_type(decoder) == expected
-
-
-class Test_to_MultiByteStrDecoder_unicode:
- @pytest.mark.parametrize(["value", "expected"], [[b"", ""], [b"abcd",
"abcd"]])
- def test_normal_unicode_str(self, value, expected):
- decoder = MultiByteStrDecoder(value)
- assert decoder.unicode_str == expected
-
- @pytest.mark.parametrize(
- ["value", "encode", "expected"],
- [["", "utf8", "unicode"], ["abcdefgh", "ascii", "ascii"], ["吾輩は猫である",
"utf8", "utf_8"]],
- )
- def test_normal_codec(self, value, encode, expected):
- decoder = MultiByteStrDecoder(value.encode(encode))
- assert decoder.codec == expected
- assert decoder.unicode_str == value
-
- @pytest.mark.parametrize(
- ["value", "encode", "expected", "codec_candidate_list"],
- [
- ["abcdefgh", "ascii", "ascii", ["utf_32_le", "utf_32"]],
- ["吾輩は猫である", "utf8", "utf_8", ["utf_32_le", "ascii"]],
- ["吾輩は猫である", "utf8", "utf_8", None],
- ["吾輩は猫である", "utf8", "utf_8", []],
- ],
- )
- def test_normal_codec_candidate(self, value, encode, expected,
codec_candidate_list):
- decoder = MultiByteStrDecoder(value.encode(encode),
codec_candidate_list)
- assert decoder.codec == expected
- assert decoder.unicode_str == value
-
- @pytest.mark.parametrize(
- ["value", "codec"],
- [
- ["いろはにほへと", "utf_7"],
- [
-
"RKBTqn1G9HIZ9onY9mCklj3+8ye7WBmu0xKMqp3ORT3pMgR5m73VXAR/5YrTZTGernMYLCPYdwIMewFY+6xOZmWwCrXjfw3sO2dYLubh9EIMrc/XEvAhMFd969G2yQkyFTNf9M8Ag94QCuBk51yQLSbxgmxJTqEw6bdC4gNTI44=",
- "ascii",
- ],
- ["マルチバイト文字", "utf_8"],
- ["ABC", "utf_8"],
- ["吾輩は猫である", "utf_16"],
- ],
- )
- def test_normal_encoding(self, value, codec):
- decoder = MultiByteStrDecoder(value.encode(codec))
-
- assert decoder.codec == codec
- assert decoder.unicode_str == value
-
- @pytest.mark.parametrize(
- ["value", "expected"],
- [[None, ValueError], [True, ValueError], [[], ValueError], [1,
ValueError]],
- )
- def test_exception(self, value, expected):
- with pytest.raises(expected):
- MultiByteStrDecoder(value)
+# encoding: utf-8
+
+"""
+.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
+"""
+
+from __future__ import unicode_literals
+
+import pytest
+import six
+
+from mbstrdecoder import MultiByteStrDecoder
+
+
+nan = float("nan")
+inf = float("inf")
+
+
+class Test_to_MultiByteStrDecoder_repr:
+ @pytest.mark.parametrize(["value", "expected"], [["吾輩は猫である",
"codec=unicode, unicode=吾輩は猫である"]])
+ def test_normal(self, value, expected):
+ decoder = MultiByteStrDecoder(value)
+
+ assert six.text_type(decoder) == expected
+
+
+class Test_to_MultiByteStrDecoder_unicode:
+ @pytest.mark.parametrize(["value", "expected"], [[b"", ""], [b"abcd",
"abcd"]])
+ def test_normal_unicode_str(self, value, expected):
+ decoder = MultiByteStrDecoder(value)
+ assert decoder.unicode_str == expected
+
+ @pytest.mark.parametrize(
+ ["value", "encode", "expected"],
+ [["", "utf8", "unicode"], ["abcdefgh", "ascii", "ascii"], ["吾輩は猫である",
"utf8", "utf_8"]],
+ )
+ def test_normal_codec(self, value, encode, expected):
+ decoder = MultiByteStrDecoder(value.encode(encode))
+ assert decoder.codec == expected
+ assert decoder.unicode_str == value
+
+ @pytest.mark.parametrize(
+ ["value", "encode", "expected", "codec_candidate_list"],
+ [
+ ["abcdefgh", "ascii", "ascii", ["utf_32_le", "utf_32"]],
+ ["吾輩は猫である", "utf8", "utf_8", ["utf_32_le", "ascii"]],
+ ["吾輩は猫である", "utf8", "utf_8", None],
+ ["吾輩は猫である", "utf8", "utf_8", []],
+ ["Bob’s Burgers", "windows-1252", "windows_1252", []],
+ ],
+ )
+ def test_normal_codec_candidate(self, value, encode, expected,
codec_candidate_list):
+ decoder = MultiByteStrDecoder(value.encode(encode),
codec_candidate_list)
+ assert decoder.codec == expected
+ assert decoder.unicode_str == value
+
+ @pytest.mark.parametrize(
+ ["value", "codec"],
+ [
+ ["いろはにほへと", "utf_7"],
+ [
+
"RKBTqn1G9HIZ9onY9mCklj3+8ye7WBmu0xKMqp3ORT3pMgR5m73VXAR/5YrTZTGernMYLCPYdwIMewFY+6xOZmWwCrXjfw3sO2dYLubh9EIMrc/XEvAhMFd969G2yQkyFTNf9M8Ag94QCuBk51yQLSbxgmxJTqEw6bdC4gNTI44=",
+ "ascii",
+ ],
+ ["マルチバイト文字", "utf_8"],
+ ["ABC", "utf_8"],
+ ["吾輩は猫である", "utf_16"],
+ ],
+ )
+ def test_normal_encoding(self, value, codec):
+ decoder = MultiByteStrDecoder(value.encode(codec))
+
+ assert decoder.codec == codec
+ assert decoder.unicode_str == value
+
+ @pytest.mark.parametrize(
+ ["value", "expected"],
+ [[None, ValueError], [True, ValueError], [[], ValueError], [1,
ValueError]],
+ )
+ def test_exception(self, value, expected):
+ with pytest.raises(expected):
+ MultiByteStrDecoder(value)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mbstrdecoder-0.8.1/tox.ini
new/mbstrdecoder-0.8.3/tox.ini
--- old/mbstrdecoder-0.8.1/tox.ini 2019-05-11 08:27:19.000000000 +0200
+++ new/mbstrdecoder-0.8.3/tox.ini 2020-01-04 13:16:01.000000000 +0100
@@ -1,9 +1,19 @@
[tox]
-envlist = py{27,35,36,37,38},cov
-
+envlist = py{27,35,36,37,38},pypy3,cov
+
[testenv]
deps =
- pytest
+ .[test]
commands =
python setup.py test
+
+[testenv:cov]
+autoupgrade_pip = true
+deps =
+ .[test]
+ coverage[toml]
+ coveralls
+ pytest-cov
+commands =
+ python setup.py test --addopts "-vv --cov"