Hello community,
here is the log from the commit of package python-mbstrdecoder for
openSUSE:Leap:15.2 checked in at 2020-04-14 14:22:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-mbstrdecoder (Old)
and /work/SRC/openSUSE:Leap:15.2/.python-mbstrdecoder.new.3248 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-mbstrdecoder"
Tue Apr 14 14:22:30 2020 rev:2 rq:793650 version:1.0.0
Changes:
--------
---
/work/SRC/openSUSE:Leap:15.2/python-mbstrdecoder/python-mbstrdecoder.changes
2020-02-22 18:50:02.944431966 +0100
+++
/work/SRC/openSUSE:Leap:15.2/.python-mbstrdecoder.new.3248/python-mbstrdecoder.changes
2020-04-14 14:24:15.465421224 +0200
@@ -1,0 +2,14 @@
+Sun Apr 5 07:52:27 UTC 2020 - Martin Hauke <[email protected]>
+
+- Update to version 1.0.0
+ * no upstream changelog found
+- Drop support for python2
+- Adjust dependencies
+
+-------------------------------------------------------------------
+Wed Apr 1 09:07:21 UTC 2020 - [email protected]
+
+- version update to 0.8.4
+ * no upstream changelog found
+
+-------------------------------------------------------------------
Old:
----
mbstrdecoder-0.8.3.tar.gz
New:
----
mbstrdecoder-1.0.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-mbstrdecoder.spec ++++++
--- /var/tmp/diff_new_pack.GMXHSr/_old 2020-04-14 14:24:15.745421432 +0200
+++ /var/tmp/diff_new_pack.GMXHSr/_new 2020-04-14 14:24:15.745421432 +0200
@@ -17,22 +17,23 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%define skip_python2 1
Name: python-mbstrdecoder
-Version: 0.8.3
+Version: 1.0.0
Release: 0
Summary: Multi-byte character string decoder
License: MIT
Group: Development/Languages/Python
URL: https://github.com/thombashi/mbstrdecoder
Source:
https://files.pythonhosted.org/packages/source/m/mbstrdecoder/mbstrdecoder-%{version}.tar.gz
+BuildRequires: %{python_module Faker >= 1.0.2}
BuildRequires: %{python_module chardet >= 3.0.4}
BuildRequires: %{python_module pytest-runner}
BuildRequires: %{python_module setuptools}
-BuildRequires: %{python_module six}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
+Requires: python-Faker >= 1.0.2
Requires: python-chardet >= 3.0.4
-Requires: python-six
BuildArch: noarch
%python_subpackages
@@ -41,14 +42,6 @@
%prep
%setup -q -n mbstrdecoder-%{version}
-# De-vendor six
-rm mbstrdecoder/_six.py
-sed -i 's/\._six/six/' mbstrdecoder/_mbstrdecoder.py
-
-find . -type f | xargs chmod -x
-
-echo > requirements/test_requirements.txt
-
# Remove build alias
sed -i '/build =/d' setup.cfg
@@ -60,7 +53,7 @@
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
-%python_exec setup.py test
+%pytest
%files %{python_files}
%license LICENSE
++++++ mbstrdecoder-0.8.3.tar.gz -> mbstrdecoder-1.0.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mbstrdecoder-0.8.3/MANIFEST.in
new/mbstrdecoder-1.0.0/MANIFEST.in
--- old/mbstrdecoder-0.8.3/MANIFEST.in 2019-12-29 00:54:43.000000000 +0100
+++ new/mbstrdecoder-1.0.0/MANIFEST.in 2020-04-04 05:14:55.000000000 +0200
@@ -2,6 +2,7 @@
include README.rst
include setup.cfg
include tox.ini
+include */py.typed
recursive-include requirements *
recursive-include test *
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mbstrdecoder-0.8.3/PKG-INFO
new/mbstrdecoder-1.0.0/PKG-INFO
--- old/mbstrdecoder-0.8.3/PKG-INFO 2020-01-04 13:33:03.546205300 +0100
+++ new/mbstrdecoder-1.0.0/PKG-INFO 2020-04-04 10:59:13.013850200 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: mbstrdecoder
-Version: 0.8.3
+Version: 1.0.0
Summary: multi-byte character string decoder
Home-page: https://github.com/thombashi/mbstrdecoder
Author: Tsuyoshi Hombashi
@@ -26,6 +26,10 @@
:target: https://pypi.org/project/mbstrdecoder
:alt: Supported Python versions
+ .. image:: https://img.shields.io/pypi/implementation/mbstrdecoder.svg
+ :target: https://pypi.org/project/mbstrdecoder
+ :alt: Supported Python implementations
+
.. image::
https://img.shields.io/travis/thombashi/mbstrdecoder/master.svg?label=Linux/macOS%20CI
:target: https://travis-ci.org/thombashi/mbstrdecoder
:alt: Linux/macOS CI status
@@ -81,36 +85,34 @@
Dependencies
============
- Python 2.7+ or 3.5+ or `PyPy <https://pypy.org/>`__
+ Python 3.5+
- `chardet <https://github.com/chardet/chardet>`__
Test dependencies
----------------------------------
- `pytest <https://pypi.org/project/pytest>`__
- - `pytest-runner <https://github.com/pytest-dev/pytest-runner>`__
- `six <https://pypi.org/project/six/>`__
- `tox <https://pypi.org/project/tox>`__
Keywords: multi-byte character,unicode,decoder
Platform: UNKNOWN
-Classifier: Development Status :: 4 - Beta
+Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
+Classifier: Programming Language :: Python :: Implementation :: CPython
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: dev
+Requires-Python: >=3.5
+Description-Content-Type: text/x-rst
Provides-Extra: test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mbstrdecoder-0.8.3/README.rst
new/mbstrdecoder-1.0.0/README.rst
--- old/mbstrdecoder-0.8.3/README.rst 2020-01-04 13:22:50.000000000 +0100
+++ new/mbstrdecoder-1.0.0/README.rst 2020-04-04 03:33:43.000000000 +0200
@@ -16,6 +16,10 @@
:target: https://pypi.org/project/mbstrdecoder
:alt: Supported Python versions
+.. image:: https://img.shields.io/pypi/implementation/mbstrdecoder.svg
+ :target: https://pypi.org/project/mbstrdecoder
+ :alt: Supported Python implementations
+
.. image::
https://img.shields.io/travis/thombashi/mbstrdecoder/master.svg?label=Linux/macOS%20CI
:target: https://travis-ci.org/thombashi/mbstrdecoder
:alt: Linux/macOS CI status
@@ -71,13 +75,12 @@
Dependencies
============
-Python 2.7+ or 3.5+ or `PyPy <https://pypy.org/>`__
+Python 3.5+
- `chardet <https://github.com/chardet/chardet>`__
Test dependencies
----------------------------------
- `pytest <https://pypi.org/project/pytest>`__
-- `pytest-runner <https://github.com/pytest-dev/pytest-runner>`__
- `six <https://pypi.org/project/six/>`__
- `tox <https://pypi.org/project/tox>`__
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mbstrdecoder-0.8.3/mbstrdecoder/__init__.py
new/mbstrdecoder-1.0.0/mbstrdecoder/__init__.py
--- old/mbstrdecoder-0.8.3/mbstrdecoder/__init__.py 2020-01-03
08:20:40.000000000 +0100
+++ new/mbstrdecoder-1.0.0/mbstrdecoder/__init__.py 2020-04-04
03:30:54.000000000 +0200
@@ -1,11 +1,7 @@
-# encoding: utf-8
-
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
-from __future__ import absolute_import
-
from .__version__ import __author__, __copyright__, __email__, __license__,
__version__
from ._func import detect_file_encoding
from ._mbstrdecoder import MultiByteStrDecoder
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mbstrdecoder-0.8.3/mbstrdecoder/__version__.py
new/mbstrdecoder-1.0.0/mbstrdecoder/__version__.py
--- old/mbstrdecoder-0.8.3/mbstrdecoder/__version__.py 2020-01-04
13:32:38.000000000 +0100
+++ new/mbstrdecoder-1.0.0/mbstrdecoder/__version__.py 2020-04-04
05:20:24.000000000 +0200
@@ -1,11 +1,6 @@
-# encoding: utf-8
-
-from datetime import datetime
-
-
__author__ = "Tsuyoshi Hombashi"
-__copyright__ = "Copyright 2016-{}, {}".format(datetime.now().year, __author__)
+__copyright__ = "Copyright 2016, {}".format(__author__)
__license__ = "MIT License"
-__version__ = "0.8.3"
+__version__ = "1.0.0"
__maintainer__ = __author__
__email__ = "[email protected]"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/mbstrdecoder-0.8.3/mbstrdecoder/_binary_ext_checker.py
new/mbstrdecoder-1.0.0/mbstrdecoder/_binary_ext_checker.py
--- old/mbstrdecoder-0.8.3/mbstrdecoder/_binary_ext_checker.py 2019-12-29
16:21:56.000000000 +0100
+++ new/mbstrdecoder-1.0.0/mbstrdecoder/_binary_ext_checker.py 2020-04-04
05:03:45.000000000 +0200
@@ -1,11 +1,7 @@
-# encoding: utf-8
-
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
-from __future__ import absolute_import, unicode_literals
-
import os.path
@@ -264,5 +260,5 @@
)
-def is_binary_ext_path(filepath):
+def is_binary_ext_path(filepath) -> bool:
return os.path.splitext(filepath)[1].lstrip(".") in binary_exts
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mbstrdecoder-0.8.3/mbstrdecoder/_func.py
new/mbstrdecoder-1.0.0/mbstrdecoder/_func.py
--- old/mbstrdecoder-0.8.3/mbstrdecoder/_func.py 2019-12-29
00:54:43.000000000 +0100
+++ new/mbstrdecoder-1.0.0/mbstrdecoder/_func.py 2020-04-04
05:03:46.000000000 +0200
@@ -1,19 +1,16 @@
-# encoding: utf-8
-
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
-from __future__ import absolute_import, unicode_literals
-
import os
import stat
from errno import EBADF, ENOENT, ENOTDIR
+from typing import Optional, Union
from ._binary_ext_checker import is_binary_ext_path
-def is_fifo(file_path):
+def is_fifo(file_path: Union[int, bytes, str]) -> bool:
try:
return stat.S_ISFIFO(os.stat(file_path).st_mode)
except OSError as e:
@@ -25,14 +22,14 @@
return False
-def to_codec_name(name):
+def to_codec_name(name: str) -> Optional[str]:
if not name:
return None
return name.lower().replace("-", "_")
-def detect_file_encoding(file_path):
+def detect_file_encoding(file_path) -> Optional[str]:
from chardet.universaldetector import UniversalDetector
if not os.path.isfile(file_path) or is_binary_ext_path(file_path) or
is_fifo(file_path):
@@ -51,7 +48,7 @@
detector.feed(binary)
if detector.done:
break
- except IOError:
+ except OSError:
return None
finally:
detector.close()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mbstrdecoder-0.8.3/mbstrdecoder/_mbstrdecoder.py
new/mbstrdecoder-1.0.0/mbstrdecoder/_mbstrdecoder.py
--- old/mbstrdecoder-0.8.3/mbstrdecoder/_mbstrdecoder.py 2020-01-03
09:28:22.000000000 +0100
+++ new/mbstrdecoder-1.0.0/mbstrdecoder/_mbstrdecoder.py 2020-04-04
05:12:27.000000000 +0200
@@ -1,26 +1,25 @@
-# encoding: utf-8
-
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
-from __future__ import absolute_import, unicode_literals
-
import copy
import re
-import sys
+from typing import List, Optional, Sequence
from ._func import to_codec_name
-from ._six import PY3, b, binary_type, string_types
-class MultiByteStrDecoder(object):
+def b(s: str) -> bytes:
+ return s.encode("latin-1")
+
+
+class MultiByteStrDecoder:
"""
Reference:
https://docs.python.org/3/library/codecs.html
"""
- __CODEC_LIST = [
+ __CODECS = [
"utf_7",
"utf_8",
"utf_8_sig",
@@ -132,41 +131,38 @@
__RE_UTF7 = re.compile(b("[+].*?[-]"))
@property
- def unicode_str(self):
+ def unicode_str(self) -> str:
return self.__unicode_str
@property
- def codec(self):
+ def codec(self) -> Optional[str]:
return self.__codec
- def __init__(self, value, codec_candidate_list=None):
+ def __init__(self, value, codec_candidates: Sequence[str] = None) -> None:
self.__encoded_str = value
- self.__codec = None
- if codec_candidate_list is None:
- self.__codec_candidate_list = []
+ self.__codec = None # type: Optional[str]
+ if codec_candidates is None:
+ self.__codec_candidate_list = [] # type: List[str]
else:
- self.__codec_candidate_list = codec_candidate_list
+ self.__codec_candidate_list = list(codec_candidates)
self.__validate_str()
self.__unicode_str = self.__to_unicode()
- def __repr__(self):
+ def __repr__(self) -> str:
return "codec={:s}, unicode={:s}".format(self.codec, self.unicode_str)
- def __validate_str(self):
- if isinstance(self.__encoded_str, (string_types, binary_type)):
+ def __validate_str(self) -> None:
+ if isinstance(self.__encoded_str, (str, bytes)):
return
raise ValueError("value must be a string:
actual={}".format(type(self.__encoded_str)))
- def __is_buffer(self):
- if sys.version_info.major <= 2:
- return isinstance(self.__encoded_str, buffer)
-
+ def __is_buffer(self) -> bool:
return isinstance(self.__encoded_str, memoryview)
- def __is_multibyte_utf7(self, encoded_str):
+ def __is_multibyte_utf7(self, encoded_str) -> bool:
if self.__codec != "utf_7":
return False
@@ -179,14 +175,14 @@
return utf7_symbol_count == len(self.__RE_UTF7.findall(encoded_str))
- def __get_encoded_str(self):
+ def __get_encoded_str(self) -> str:
if self.__is_buffer():
return str(self.__encoded_str)
return self.__encoded_str
@staticmethod
- def __detect_encoding_helper(encoded_str):
+ def __detect_encoding_helper(encoded_str) -> Optional[str]:
import chardet
try:
@@ -203,8 +199,8 @@
return None
- def __get_codec_candidate_list(self, encoded_str):
- codec_candidate_list = copy.deepcopy(self.__CODEC_LIST)
+ def __get_codec_candidate_list(self, encoded_str) -> List[str]:
+ codec_candidate_list = copy.deepcopy(self.__CODECS)
detect_encoding = self.__detect_encoding_helper(encoded_str)
if detect_encoding:
@@ -246,7 +242,7 @@
self.__codec = "unicode"
return encoded_str
except AttributeError:
- if PY3 and isinstance(encoded_str, string_types):
+ if isinstance(encoded_str, str):
# already a unicode string (python 3)
self.__codec = "unicode"
@@ -286,7 +282,7 @@
return decoded_str
- def __process_utf7(self, encoded_str, decoded_str):
+ def __process_utf7(self, encoded_str, decoded_str) -> str:
if not encoded_str:
self.__codec = "unicode"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mbstrdecoder-0.8.3/mbstrdecoder/_six.py
new/mbstrdecoder-1.0.0/mbstrdecoder/_six.py
--- old/mbstrdecoder-0.8.3/mbstrdecoder/_six.py 2019-12-29 16:21:56.000000000
+0100
+++ new/mbstrdecoder-1.0.0/mbstrdecoder/_six.py 1970-01-01 01:00:00.000000000
+0100
@@ -1,33 +0,0 @@
-"""
-Code from six:
- https://github.com/benjaminp/six/blob/master/LICENSE
-"""
-
-from __future__ import absolute_import
-
-import sys
-
-
-PY3 = sys.version_info[0] == 3
-
-
-if PY3:
- string_types = (str,)
- text_type = str
- binary_type = bytes
-else:
- string_types = (basestring,)
- text_type = unicode
- binary_type = str
-
-
-if PY3:
-
- def b(s):
- return s.encode("latin-1")
-
-
-else:
-
- def b(s):
- return s
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mbstrdecoder-0.8.3/mbstrdecoder.egg-info/PKG-INFO
new/mbstrdecoder-1.0.0/mbstrdecoder.egg-info/PKG-INFO
--- old/mbstrdecoder-0.8.3/mbstrdecoder.egg-info/PKG-INFO 2020-01-04
13:33:03.000000000 +0100
+++ new/mbstrdecoder-1.0.0/mbstrdecoder.egg-info/PKG-INFO 2020-04-04
10:59:12.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: mbstrdecoder
-Version: 0.8.3
+Version: 1.0.0
Summary: multi-byte character string decoder
Home-page: https://github.com/thombashi/mbstrdecoder
Author: Tsuyoshi Hombashi
@@ -26,6 +26,10 @@
:target: https://pypi.org/project/mbstrdecoder
:alt: Supported Python versions
+ .. image:: https://img.shields.io/pypi/implementation/mbstrdecoder.svg
+ :target: https://pypi.org/project/mbstrdecoder
+ :alt: Supported Python implementations
+
.. image::
https://img.shields.io/travis/thombashi/mbstrdecoder/master.svg?label=Linux/macOS%20CI
:target: https://travis-ci.org/thombashi/mbstrdecoder
:alt: Linux/macOS CI status
@@ -81,36 +85,34 @@
Dependencies
============
- Python 2.7+ or 3.5+ or `PyPy <https://pypy.org/>`__
+ Python 3.5+
- `chardet <https://github.com/chardet/chardet>`__
Test dependencies
----------------------------------
- `pytest <https://pypi.org/project/pytest>`__
- - `pytest-runner <https://github.com/pytest-dev/pytest-runner>`__
- `six <https://pypi.org/project/six/>`__
- `tox <https://pypi.org/project/tox>`__
Keywords: multi-byte character,unicode,decoder
Platform: UNKNOWN
-Classifier: Development Status :: 4 - Beta
+Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
+Classifier: Programming Language :: Python :: Implementation :: CPython
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: dev
+Requires-Python: >=3.5
+Description-Content-Type: text/x-rst
Provides-Extra: test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mbstrdecoder-0.8.3/mbstrdecoder.egg-info/SOURCES.txt
new/mbstrdecoder-1.0.0/mbstrdecoder.egg-info/SOURCES.txt
--- old/mbstrdecoder-0.8.3/mbstrdecoder.egg-info/SOURCES.txt 2020-01-04
13:33:03.000000000 +0100
+++ new/mbstrdecoder-1.0.0/mbstrdecoder.egg-info/SOURCES.txt 2020-04-04
10:59:12.000000000 +0200
@@ -2,7 +2,6 @@
MANIFEST.in
README.rst
pyproject.toml
-setup.cfg
setup.py
tox.ini
mbstrdecoder/__init__.py
@@ -10,7 +9,7 @@
mbstrdecoder/_binary_ext_checker.py
mbstrdecoder/_func.py
mbstrdecoder/_mbstrdecoder.py
-mbstrdecoder/_six.py
+mbstrdecoder/py.typed
mbstrdecoder.egg-info/PKG-INFO
mbstrdecoder.egg-info/SOURCES.txt
mbstrdecoder.egg-info/dependency_links.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/mbstrdecoder-0.8.3/mbstrdecoder.egg-info/requires.txt
new/mbstrdecoder-1.0.0/mbstrdecoder.egg-info/requires.txt
--- old/mbstrdecoder-0.8.3/mbstrdecoder.egg-info/requires.txt 2020-01-04
13:33:03.000000000 +0100
+++ new/mbstrdecoder-1.0.0/mbstrdecoder.egg-info/requires.txt 2020-04-04
10:59:12.000000000 +0200
@@ -1,22 +1,5 @@
-setuptools>=38.3.0
chardet<4,>=3.0.4
-[all]
-
-[dev]
-releasecmd<1,>=0.1.0
-twine
-wheel
-autoflake
-black
-isort
-codespell
-pylama
-Faker>=1.0.2
-pytest
-six
-
[test]
Faker>=1.0.2
pytest
-six
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mbstrdecoder-0.8.3/pyproject.toml
new/mbstrdecoder-1.0.0/pyproject.toml
--- old/mbstrdecoder-0.8.3/pyproject.toml 2020-01-04 07:41:26.000000000
+0100
+++ new/mbstrdecoder-1.0.0/pyproject.toml 2020-04-04 01:56:34.000000000
+0200
@@ -7,6 +7,7 @@
| \.mypy_cache
| \.tox
| \.venv
+ | \.pytype
| _build
| buck-out
| build
@@ -18,6 +19,7 @@
[tool.isort]
dont_skip = "*/**/__init__.py"
known_third_party = [
+ 'pytest',
]
include_trailing_comma = true
line_length = 100
@@ -25,6 +27,7 @@
multi_line_output = 3
skip_glob = [
'*/.eggs/*',
+ '*/.pytype/*',
'*/.tox/*',
]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/mbstrdecoder-0.8.3/requirements/test_requirements.txt
new/mbstrdecoder-1.0.0/requirements/test_requirements.txt
--- old/mbstrdecoder-0.8.3/requirements/test_requirements.txt 2020-01-03
06:05:00.000000000 +0100
+++ new/mbstrdecoder-1.0.0/requirements/test_requirements.txt 2020-04-04
03:31:20.000000000 +0200
@@ -1,3 +1,2 @@
Faker>=1.0.2
pytest
-six
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mbstrdecoder-0.8.3/setup.cfg
new/mbstrdecoder-1.0.0/setup.cfg
--- old/mbstrdecoder-0.8.3/setup.cfg 2020-01-04 13:33:03.546205300 +0100
+++ new/mbstrdecoder-1.0.0/setup.cfg 2020-04-04 10:59:13.017850200 +0200
@@ -1,9 +1,3 @@
-[aliases]
-test = pytest
-
-[bdist_wheel]
-universal = 1
-
[egg_info]
tag_build =
tag_date = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mbstrdecoder-0.8.3/setup.py
new/mbstrdecoder-1.0.0/setup.py
--- old/mbstrdecoder-0.8.3/setup.py 2020-01-04 13:07:16.000000000 +0100
+++ new/mbstrdecoder-1.0.0/setup.py 2020-04-04 05:20:48.000000000 +0200
@@ -1,14 +1,9 @@
-# encoding: utf-8
-
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
-from __future__ import unicode_literals
-
-import io
import os.path
-import sys
+from typing import Dict
import setuptools
@@ -18,14 +13,10 @@
REQUIREMENT_DIR = "requirements"
ENCODING = "utf8"
-pkg_info = {}
-
+pkg_info = {} # type: Dict[str, str]
-def need_pytest():
- return set(["pytest", "test", "ptr"]).intersection(sys.argv)
-
-def get_release_command_class():
+def get_release_command_class() -> Dict[str, setuptools.Command]:
try:
from releasecmd import ReleaseCommand
except ImportError:
@@ -37,7 +28,7 @@
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:
+with open("README.rst", encoding=ENCODING) as f:
long_description = f.read()
with open(os.path.join(REQUIREMENT_DIR, "requirements.txt")) as f:
@@ -46,9 +37,6 @@
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__"],
@@ -60,33 +48,27 @@
keywords=["multi-byte character", "unicode", "decoder"],
license=pkg_info["__license__"],
long_description=long_description,
+ long_description_content_type="text/x-rst",
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,
+ package_data={MODULE_NAME: ["py.typed"]},
+ project_urls={"Source": REPOSITORY_URL, "Tracker":
"{:s}/issues".format(REPOSITORY_URL)},
+ python_requires=">=3.5",
+ install_requires=install_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,
- },
+ extras_require={"test": tests_require},
classifiers=[
- "Development Status :: 4 - Beta",
+ "Development Status :: 5 - Production/Stable",
"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 :: 3.9",
+ "Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mbstrdecoder-0.8.3/test/test_binary_ext_checker.py
new/mbstrdecoder-1.0.0/test/test_binary_ext_checker.py
--- old/mbstrdecoder-0.8.3/test/test_binary_ext_checker.py 2019-12-29
16:21:56.000000000 +0100
+++ new/mbstrdecoder-1.0.0/test/test_binary_ext_checker.py 2020-04-04
03:27:45.000000000 +0200
@@ -1,11 +1,7 @@
-# encoding: utf-8
-
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
-from __future__ import unicode_literals
-
from os.path import splitext
import pytest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mbstrdecoder-0.8.3/test/test_func.py
new/mbstrdecoder-1.0.0/test/test_func.py
--- old/mbstrdecoder-0.8.3/test/test_func.py 2019-12-29 16:16:17.000000000
+0100
+++ new/mbstrdecoder-1.0.0/test/test_func.py 2020-04-04 03:27:50.000000000
+0200
@@ -1,13 +1,9 @@
-# encoding: utf-8
-
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
-from __future__ import unicode_literals
-
import os
-import platform # noqa: W0611
+import platform
from textwrap import dedent
import pytest
@@ -23,7 +19,7 @@
assert to_codec_name(value) == expected
-class Test_detect_file_encoding(object):
+class Test_detect_file_encoding:
@pytest.mark.parametrize(["value", "expected"], [["utf8", "utf_8"],
["utf16", "utf_16"]])
def test_normal(self, tmpdir, value, expected):
data = dedent(
@@ -42,7 +38,7 @@
assert detect_file_encoding(str(p_csv)) == expected
- @pytest.mark.skipif("platform.system() == 'Windows'")
+ @pytest.mark.skipif(platform.system() == "Windows", reason="platform
dependent tests")
def test_normal_fifo(self, tmpdir):
fifo = tmpdir.join("test_fifo")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mbstrdecoder-0.8.3/test/test_mbstrdecoder.py
new/mbstrdecoder-1.0.0/test/test_mbstrdecoder.py
--- old/mbstrdecoder-0.8.3/test/test_mbstrdecoder.py 2020-01-03
09:25:02.000000000 +0100
+++ new/mbstrdecoder-1.0.0/test/test_mbstrdecoder.py 2020-04-04
04:17:26.000000000 +0200
@@ -1,13 +1,8 @@
-# encoding: utf-8
-
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
-from __future__ import unicode_literals
-
import pytest
-import six
from mbstrdecoder import MultiByteStrDecoder
@@ -21,7 +16,7 @@
def test_normal(self, value, expected):
decoder = MultiByteStrDecoder(value)
- assert six.text_type(decoder) == expected
+ assert str(decoder) == expected
class Test_to_MultiByteStrDecoder_unicode:
@@ -40,7 +35,7 @@
assert decoder.unicode_str == value
@pytest.mark.parametrize(
- ["value", "encode", "expected", "codec_candidate_list"],
+ ["value", "encode", "expected", "codec_candidates"],
[
["abcdefgh", "ascii", "ascii", ["utf_32_le", "utf_32"]],
["吾輩は猫である", "utf8", "utf_8", ["utf_32_le", "ascii"]],
@@ -49,8 +44,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)
+ def test_normal_codec_candidate(self, value, encode, expected,
codec_candidates):
+ decoder = MultiByteStrDecoder(value.encode(encode), codec_candidates)
assert decoder.codec == expected
assert decoder.unicode_str == value
@@ -59,7 +54,7 @@
[
["いろはにほへと", "utf_7"],
[
-
"RKBTqn1G9HIZ9onY9mCklj3+8ye7WBmu0xKMqp3ORT3pMgR5m73VXAR/5YrTZTGernMYLCPYdwIMewFY+6xOZmWwCrXjfw3sO2dYLubh9EIMrc/XEvAhMFd969G2yQkyFTNf9M8Ag94QCuBk51yQLSbxgmxJTqEw6bdC4gNTI44=",
+
"RKBTqn1G9HIZ9onY9mCklj3+8ye7WBmu0xKMqp3ORT3pMgR5m73VXAR/5YrTZTGernMYLCPYdwIMewFY+6xOZmWwCrXjfw3sO2dYLubh9EIMrc/XEvAhMFd969G2yQkyFTNf9M8Ag94QCuBk51yQLSbxgmxJTqEw6bdC4gNTI44=",
# noqa
"ascii",
],
["マルチバイト文字", "utf_8"],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mbstrdecoder-0.8.3/tox.ini
new/mbstrdecoder-1.0.0/tox.ini
--- old/mbstrdecoder-0.8.3/tox.ini 2020-01-04 13:16:01.000000000 +0100
+++ new/mbstrdecoder-1.0.0/tox.ini 2020-04-04 03:30:40.000000000 +0200
@@ -1,19 +1,68 @@
[tox]
-envlist = py{27,35,36,37,38},pypy3,cov
+envlist =
+ py{35,36,37,38,39}
+ pypy3
+ clean
+ cov
+ fmt
+ lint
+ release
[testenv]
deps =
.[test]
+commands =
+ pytest {posargs:-vv}
+[testenv:build]
+basepython = python3.8
+deps =
+ twine
+ wheel
commands =
- python setup.py test
+ python setup.py sdist bdist_wheel
+ twine check dist/*
+ python setup.py clean --all
+
+[testenv:clean]
+deps =
+ cleanpy
+commands =
+ cleanpy --all --exclude-envs .
[testenv:cov]
-autoupgrade_pip = true
deps =
.[test]
coverage[toml]
- coveralls
pytest-cov
commands =
- python setup.py test --addopts "-vv --cov"
+ pytest --cov {posargs:-vv}
+
+[testenv:fmt]
+basepython = python3.8
+deps =
+ autoflake
+ black
+ isort[pyproject]
+commands =
+ autoflake --in-place --recursive --remove-all-unused-imports
--ignore-init-module-imports .
+ isort --apply --recursive
+ black setup.py test mbstrdecoder
+
+[testenv:lint]
+basepython = python3.7
+deps =
+ codespell
+ mypy>=0.761
+ pylama
+commands =
+ python setup.py check
+ -codespell mbstrdecoder examples test -q 2 --check-filenames
--ignore-words-list followings
+ -mypy mbstrdecoder setup.py --ignore-missing-imports --show-error-context
--show-error-codes --python-version 3.5
+ pylama
+
+[testenv:release]
+deps =
+ releasecmd>=0.3.1,<1
+commands =
+ python setup.py release --sign {posargs}