commit python-typepy for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-typepy for openSUSE:Factory checked in at 2021-05-01 00:46:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-typepy (Old) and /work/SRC/openSUSE:Factory/.python-typepy.new.1947 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-typepy" Sat May 1 00:46:55 2021 rev:6 rq:889547 version:1.1.5 Changes: -------- --- /work/SRC/openSUSE:Factory/python-typepy/python-typepy.changes 2020-07-08 19:20:42.324538222 +0200 +++ /work/SRC/openSUSE:Factory/.python-typepy.new.1947/python-typepy.changes 2021-05-01 00:46:59.083375556 +0200 @@ -1,0 +2,18 @@ +Fri Apr 23 11:27:31 UTC 2021 - Matej Cepl <mcepl@suse.com> + +- Update to version 1.1.5: + - Change packaging dependency from mandatory to optional. + +------------------------------------------------------------------- +Sat Mar 6 13:20:09 UTC 2021 - Martin Hauke <mardnh@gmx.de> + +- Update to version 1.1.4 + * Fix bool values conversion +- Update to version 1.1.3 + * Add support for Python 3.10 + * Improve error messages when conversion error happens. + * Drop dependency of deprecated distutils +- Update to version 1.1.2 + * Modify dependencies + +------------------------------------------------------------------- Old: ---- typepy-1.1.1.tar.gz New: ---- typepy-1.1.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-typepy.spec ++++++ --- /var/tmp/diff_new_pack.qLUjpP/_old 2021-05-01 00:46:59.599373257 +0200 +++ /var/tmp/diff_new_pack.qLUjpP/_new 2021-05-01 00:46:59.603373240 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-typepy # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-typepy -Version: 1.1.1 +Version: 1.1.5 Release: 0 Summary: Python library for run time variable type checker License: MIT @@ -33,17 +33,14 @@ BuildRequires: %{python_module pytest-runner} BuildRequires: %{python_module python-dateutil >= 2.8.0} BuildRequires: %{python_module pytz >= 2018.9} -BuildRequires: %{python_module six >= 1.10.0} -BuildRequires: %{python_module termcolor} +BuildRequires: %{python_module tcolorpy} # /SECTION BuildRequires: fdupes Requires: python-mbstrdecoder >= 1.0.0 -Requires: python-setuptools >= 38.3.0 -Requires: python-six >= 1.10.0 Suggests: python-python-dateutil >= 2.8.0 Suggests: python-pytz >= 2018.9 Suggests: python-path.py -Suggests: python-termcolor +Suggests: python-tcolorpy BuildArch: noarch %python_subpackages @@ -69,8 +66,8 @@ %pytest %files %{python_files} -%doc README.rst %license LICENSE +%doc README.rst %{python_sitelib}/typepy* %changelog ++++++ typepy-1.1.1.tar.gz -> typepy-1.1.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/typepy-1.1.1/PKG-INFO new/typepy-1.1.5/PKG-INFO --- old/typepy-1.1.1/PKG-INFO 2020-05-04 04:01:17.000172000 +0200 +++ new/typepy-1.1.5/PKG-INFO 2021-04-11 14:44:49.806168000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: typepy -Version: 1.1.1 +Version: 1.1.5 Summary: typepy is a Python library for variable type checker/validator/converter at a run time. Home-page: https://github.com/thombashi/typepy Author: Tsuyoshi Hombashi @@ -9,6 +9,7 @@ Project-URL: Documentation, https://typepy.rtfd.io/ Project-URL: Source, https://github.com/thombashi/typepy Project-URL: Tracker, https://github.com/thombashi/typepy/issues +Project-URL: Changes, https://github.com/thombashi/typepy/releases Description: .. contents:: **typepy** :backlinks: top :depth: 2 @@ -21,6 +22,10 @@ :target: https://badge.fury.io/py/typepy :alt: PyPI package version + .. image:: https://anaconda.org/conda-forge/typepy/badges/version.svg + :target: https://anaconda.org/conda-forge/typepy + :alt: conda-forge package version + .. image:: https://img.shields.io/pypi/pyversions/typepy.svg :target: https://pypi.org/project/typepy :alt: Supported Python versions @@ -29,22 +34,14 @@ :target: https://pypi.org/project/typepy :alt: Supported Python implementations - .. image:: https://img.shields.io/travis/thombashi/typepy/master.svg?label=Linux/macOS%... - :target: https://travis-ci.org/thombashi/typepy - :alt: Linux/macOS CI status - - .. image:: https://img.shields.io/appveyor/ci/thombashi/typepy/master.svg?label=Windows... - :target: https://ci.appveyor.com/project/thombashi/typepy - :alt: Windows CI status + .. image:: https://github.com/thombashi/typepy/workflows/Tests/badge.svg + :target: https://github.com/thombashi/typepy/actions?query=workflow%3ATests + :alt: Linux/macOS/Windows CI status .. image:: https://coveralls.io/repos/github/thombashi/typepy/badge.svg?branch=master :target: https://coveralls.io/github/thombashi/typepy?branch=master :alt: Test coverage - .. image:: https://img.shields.io/github/stars/thombashi/typepy.svg?style=social&label=Star - :target: https://github.com/thombashi/typepy - :alt: GitHub stars - Features ========== - checking a value type @@ -72,6 +69,48 @@ ``str`` (IP address) `IpAddress <https://typepy.rtfd.io/en/latest/pages/reference/type.html#ip-address-type>`__ ================================================ ======================================================================================================= + Installation + ============ + + Installation: pip + ------------------------------ + :: + + pip install typepy + + Install additional dependency packages with the following command if using ``typepy.DateTime`` class + + :: + + pip install typepy[datetime] + + Installation: conda + ------------------------------ + :: + + conda install -c conda-forge typepy + + Installation: apt + ------------------------------ + :: + + sudo add-apt-repository ppa:thombashi/ppa + sudo apt update + sudo apt install python3-typepy + + + Dependencies + ============ + - Python 3.5+ + - `Python package dependencies (automatically installed) <https://github.com/thombashi/typepy/network/dependencies>`__ + + Optioal dependencies + ---------------------------------- + These packages can be installed via ``pip install typepy[datetime]``: + + - `python-dateutil <https://dateutil.readthedocs.io/en/stable/>`__ + - `pytz <https://pypi.org/project/pytz/>`__ + Usage ======= Type Check Method @@ -158,48 +197,6 @@ More information can be found in the `API reference <https://typepy.rtfd.io/en/latest/pages/reference/index.html>`__. - Installation - ============ - - Install from PyPI - ------------------------------ - :: - - pip install typepy - - Install additional dependency packages with the following command if using ``typepy.DateTime`` class - - :: - - pip install typepy[datetime] - - Install from PPA (for Ubuntu) - ------------------------------ - :: - - sudo add-apt-repository ppa:thombashi/ppa - sudo apt update - sudo apt install python3-typepy - - - Dependencies - ============ - Python 3.5+ - - - `mbstrdecoder <https://github.com/thombashi/mbstrdecoder>`__ - - Optioal dependencies - ---------------------------------- - These packages can be installed via ``pip install typepy[datetime]``: - - - `python-dateutil <https://dateutil.readthedocs.io/en/stable/>`__ - - `pytz <https://pypi.org/project/pytz/>`__ - - Test dependencies - ---------------------------------- - - `pytest <https://docs.pytest.org/en/latest/>`__ - - `tox <https://testrun.org/tox/latest/>`__ - Documentation =============== https://typepy.rtfd.io/ @@ -218,6 +215,7 @@ Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/typepy-1.1.1/README.rst new/typepy-1.1.5/README.rst --- old/typepy-1.1.1/README.rst 2020-03-28 16:09:58.000000000 +0100 +++ new/typepy-1.1.5/README.rst 2021-04-11 14:44:33.000000000 +0200 @@ -10,6 +10,10 @@ :target: https://badge.fury.io/py/typepy :alt: PyPI package version +.. image:: https://anaconda.org/conda-forge/typepy/badges/version.svg + :target: https://anaconda.org/conda-forge/typepy + :alt: conda-forge package version + .. image:: https://img.shields.io/pypi/pyversions/typepy.svg :target: https://pypi.org/project/typepy :alt: Supported Python versions @@ -18,22 +22,14 @@ :target: https://pypi.org/project/typepy :alt: Supported Python implementations -.. image:: https://img.shields.io/travis/thombashi/typepy/master.svg?label=Linux/macOS%... - :target: https://travis-ci.org/thombashi/typepy - :alt: Linux/macOS CI status - -.. image:: https://img.shields.io/appveyor/ci/thombashi/typepy/master.svg?label=Windows... - :target: https://ci.appveyor.com/project/thombashi/typepy - :alt: Windows CI status +.. image:: https://github.com/thombashi/typepy/workflows/Tests/badge.svg + :target: https://github.com/thombashi/typepy/actions?query=workflow%3ATests + :alt: Linux/macOS/Windows CI status .. image:: https://coveralls.io/repos/github/thombashi/typepy/badge.svg?branch=master :target: https://coveralls.io/github/thombashi/typepy?branch=master :alt: Test coverage -.. image:: https://img.shields.io/github/stars/thombashi/typepy.svg?style=social&label=Star - :target: https://github.com/thombashi/typepy - :alt: GitHub stars - Features ========== - checking a value type @@ -61,6 +57,48 @@ ``str`` (IP address) `IpAddress <https://typepy.rtfd.io/en/latest/pages/reference/type.html#ip-address-type>`__ ================================================ ======================================================================================================= +Installation +============ + +Installation: pip +------------------------------ +:: + + pip install typepy + +Install additional dependency packages with the following command if using ``typepy.DateTime`` class + +:: + + pip install typepy[datetime] + +Installation: conda +------------------------------ +:: + + conda install -c conda-forge typepy + +Installation: apt +------------------------------ +:: + + sudo add-apt-repository ppa:thombashi/ppa + sudo apt update + sudo apt install python3-typepy + + +Dependencies +============ +- Python 3.5+ +- `Python package dependencies (automatically installed) <https://github.com/thombashi/typepy/network/dependencies>`__ + +Optioal dependencies +---------------------------------- +These packages can be installed via ``pip install typepy[datetime]``: + +- `python-dateutil <https://dateutil.readthedocs.io/en/stable/>`__ +- `pytz <https://pypi.org/project/pytz/>`__ + Usage ======= Type Check Method @@ -147,48 +185,6 @@ More information can be found in the `API reference <https://typepy.rtfd.io/en/latest/pages/reference/index.html>`__. -Installation -============ - -Install from PyPI ------------------------------- -:: - - pip install typepy - -Install additional dependency packages with the following command if using ``typepy.DateTime`` class - -:: - - pip install typepy[datetime] - -Install from PPA (for Ubuntu) ------------------------------- -:: - - sudo add-apt-repository ppa:thombashi/ppa - sudo apt update - sudo apt install python3-typepy - - -Dependencies -============ -Python 3.5+ - -- `mbstrdecoder <https://github.com/thombashi/mbstrdecoder>`__ - -Optioal dependencies ----------------------------------- -These packages can be installed via ``pip install typepy[datetime]``: - -- `python-dateutil <https://dateutil.readthedocs.io/en/stable/>`__ -- `pytz <https://pypi.org/project/pytz/>`__ - -Test dependencies ----------------------------------- -- `pytest <https://docs.pytest.org/en/latest/>`__ -- `tox <https://testrun.org/tox/latest/>`__ - Documentation =============== https://typepy.rtfd.io/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/typepy-1.1.1/pyproject.toml new/typepy-1.1.5/pyproject.toml --- old/typepy-1.1.1/pyproject.toml 2020-01-12 06:10:00.000000000 +0100 +++ new/typepy-1.1.5/pyproject.toml 2021-04-11 14:44:33.000000000 +0200 @@ -1,3 +1,6 @@ +[build-system] +requires = ["setuptools", "wheel"] + [tool.black] line-length = 100 exclude = ''' @@ -17,7 +20,6 @@ ''' [tool.isort] -dont_skip = "*/**/__init__.py" known_third_party = [ 'dateutil', 'logbook', @@ -25,7 +27,7 @@ 'pytest', 'pytz', 'sphinx_rtd_theme', - 'termcolor', + 'tcolorpy', ] include_trailing_comma = true line_length = 100 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/typepy-1.1.1/requirements/docs_requirements.txt new/typepy-1.1.5/requirements/docs_requirements.txt --- old/typepy-1.1.1/requirements/docs_requirements.txt 2020-02-08 09:02:23.000000000 +0100 +++ new/typepy-1.1.5/requirements/docs_requirements.txt 2021-04-11 14:44:33.000000000 +0200 @@ -1,2 +1,2 @@ sphinx_rtd_theme -Sphinx +Sphinx>=2.4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/typepy-1.1.1/requirements/test_requirements.txt new/typepy-1.1.5/requirements/test_requirements.txt --- old/typepy-1.1.1/requirements/test_requirements.txt 2019-10-13 10:11:22.000000000 +0200 +++ new/typepy-1.1.5/requirements/test_requirements.txt 2021-04-11 14:44:33.000000000 +0200 @@ -1,2 +1,2 @@ -pytest -termcolor +pytest>=6.0.1 +tcolorpy diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/typepy-1.1.1/setup.py new/typepy-1.1.5/setup.py --- old/typepy-1.1.1/setup.py 2020-03-29 16:10:12.000000000 +0200 +++ new/typepy-1.1.5/setup.py 2021-04-11 14:44:33.000000000 +0200 @@ -41,10 +41,10 @@ tests_requires = [line.strip() for line in f if line.strip()] -SETUPTOOLS_REQUIRES = ["setuptools>=38.3.0"] DATETIME_REQUIRES = [ "python-dateutil>=2.8.0,<3.0.0", "pytz>=2018.9", + "packaging", ] setuptools.setup( @@ -65,10 +65,10 @@ "Documentation": "https://{:s}.rtfd.io/".format(MODULE_NAME), "Source": REPOSITORY_URL, "Tracker": "{:s}/issues".format(REPOSITORY_URL), + "Changes": "{:s}/releases".format(REPOSITORY_URL), }, python_requires=">=3.5", - install_requires=SETUPTOOLS_REQUIRES + install_requires, - setup_requires=SETUPTOOLS_REQUIRES, + install_requires=install_requires, extras_require={"datetime": DATETIME_REQUIRES, "test": tests_requires + DATETIME_REQUIRES}, classifiers=[ "Development Status :: 5 - Production/Stable", @@ -82,6 +82,7 @@ "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/typepy-1.1.1/test/checker/test_checker_bool.py new/typepy-1.1.5/test/checker/test_checker_bool.py --- old/typepy-1.1.1/test/checker/test_checker_bool.py 2020-03-28 16:22:04.000000000 +0100 +++ new/typepy-1.1.5/test/checker/test_checker_bool.py 2021-04-11 14:44:33.000000000 +0200 @@ -5,7 +5,7 @@ import itertools import pytest -from termcolor import colored +from tcolorpy import tcolor from typepy import Bool, StrictLevel, Typecode @@ -36,7 +36,7 @@ @pytest.mark.parametrize( ["value", "strip_ansi_escape", "expected"], - [[colored("True", "red"), False, False], [colored("True", "red"), True, True]], + [[tcolor("True", "red"), False, False], [tcolor("True", "red"), True, True]], ) def test_normal_ansi(self, value, strip_ansi_escape, expected): type_checker = class_under_test(value, StrictLevel.MIN, strip_ansi_escape=strip_ansi_escape) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/typepy-1.1.1/test/checker/test_checker_datetime.py new/typepy-1.1.5/test/checker/test_checker_datetime.py --- old/typepy-1.1.1/test/checker/test_checker_datetime.py 2020-03-28 16:22:09.000000000 +0100 +++ new/typepy-1.1.5/test/checker/test_checker_datetime.py 2021-04-11 14:44:33.000000000 +0200 @@ -7,7 +7,7 @@ import pytest from dateutil.tz import tzoffset -from termcolor import colored +from tcolorpy import tcolor from typepy import DateTime, StrictLevel, Typecode @@ -31,7 +31,13 @@ ) + list( itertools.product( - [None, "invalid time string", 9223372036854775807, "100-0004", "���������".encode(),], + [ + None, + "invalid time string", + 9223372036854775807, + "100-0004", + "���������".encode(), + ], [StrictLevel.MIN, StrictLevel.MIN + 1, StrictLevel.MAX], [False], ) @@ -45,7 +51,9 @@ ) + list( itertools.product( - ["2017-03-22T10:00:00+0900", 1485685623, "1485685623"], [StrictLevel.MAX], [False], + ["2017-03-22T10:00:00+0900", 1485685623, "1485685623"], + [StrictLevel.MAX], + [False], ) ), ) @@ -58,8 +66,8 @@ @pytest.mark.parametrize( ["value", "strip_ansi_escape", "expected"], [ - [colored("2017-03-22T10:00:00", "red"), False, False], - [colored("2017-03-22T10:00:00", "red"), True, True], + [tcolor("2017-03-22T10:00:00", "red"), False, False], + [tcolor("2017-03-22T10:00:00", "red"), True, True], ], ) def test_normal_ansi(self, value, strip_ansi_escape, expected): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/typepy-1.1.1/test/checker/test_checker_dictionary.py new/typepy-1.1.5/test/checker/test_checker_dictionary.py --- old/typepy-1.1.1/test/checker/test_checker_dictionary.py 2020-04-15 17:35:14.000000000 +0200 +++ new/typepy-1.1.5/test/checker/test_checker_dictionary.py 2021-04-11 14:44:33.000000000 +0200 @@ -30,7 +30,10 @@ [True], ) ) - + [['{"foo": 10}', StrictLevel.MIN, True], ['{"foo": 10}', StrictLevel.MAX, False],] + + [ + ['{"foo": 10}', StrictLevel.MIN, True], + ['{"foo": 10}', StrictLevel.MAX, False], + ] + list( itertools.product( [1, "a", "���".encode("utf8"), nan, True, None], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/typepy-1.1.1/test/checker/test_checker_integer.py new/typepy-1.1.5/test/checker/test_checker_integer.py --- old/typepy-1.1.1/test/checker/test_checker_integer.py 2020-03-28 16:22:24.000000000 +0100 +++ new/typepy-1.1.5/test/checker/test_checker_integer.py 2021-04-11 14:44:33.000000000 +0200 @@ -7,7 +7,7 @@ from decimal import Decimal import pytest -from termcolor import colored +from tcolorpy import tcolor from typepy import Integer, StrictLevel, Typecode @@ -76,7 +76,7 @@ @pytest.mark.parametrize( ["value", "strip_ansi_escape", "expected"], - [[colored("1", "red"), False, False], [colored("1", "red"), True, True]], + [[tcolor("1", "red"), False, False], [tcolor("1", "red"), True, True]], ) def test_normal_ansi(self, value, strip_ansi_escape, expected): type_checker = class_under_test(value, StrictLevel.MIN, strip_ansi_escape=strip_ansi_escape) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/typepy-1.1.1/test/checker/test_checker_ipaddress.py new/typepy-1.1.5/test/checker/test_checker_ipaddress.py --- old/typepy-1.1.1/test/checker/test_checker_ipaddress.py 2020-03-28 16:22:28.000000000 +0100 +++ new/typepy-1.1.5/test/checker/test_checker_ipaddress.py 2021-04-11 14:44:33.000000000 +0200 @@ -7,7 +7,7 @@ from ipaddress import ip_address import pytest -from termcolor import colored +from tcolorpy import tcolor from typepy import IpAddress, StrictLevel, Typecode @@ -20,7 +20,7 @@ class Test_IpAddress_is_type: @pytest.mark.parametrize( ["value", "strict_level", "expected"], - [[colored("127.0.0.1", "red"), StrictLevel.MIN, True]] + [[tcolor("127.0.0.1", "red"), StrictLevel.MIN, True]] + list( itertools.product( ["", " ", sys.maxsize, str(sys.maxsize), inf, nan, None], @@ -46,7 +46,7 @@ @pytest.mark.parametrize( ["value", "strip_ansi_escape", "expected"], - [[colored("127.0.0.1", "red"), False, False], [colored("127.0.0.1", "red"), True, True]], + [[tcolor("127.0.0.1", "red"), False, False], [tcolor("127.0.0.1", "red"), True, True]], ) def test_normal_ansi(self, value, strip_ansi_escape, expected): type_checker = class_under_test(value, StrictLevel.MIN, strip_ansi_escape=strip_ansi_escape) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/typepy-1.1.1/test/checker/test_checker_realnumber.py new/typepy-1.1.5/test/checker/test_checker_realnumber.py --- old/typepy-1.1.1/test/checker/test_checker_realnumber.py 2020-03-28 16:22:42.000000000 +0100 +++ new/typepy-1.1.5/test/checker/test_checker_realnumber.py 2021-04-11 14:44:33.000000000 +0200 @@ -7,7 +7,7 @@ from decimal import Decimal import pytest -from termcolor import colored +from tcolorpy import tcolor from typepy import RealNumber, StrictLevel, Typecode @@ -89,7 +89,7 @@ @pytest.mark.parametrize( ["value", "strip_ansi_escape", "expected"], - [[colored("1.1", "red"), False, False], [colored("1.1", "red"), True, True]], + [[tcolor("1.1", "red"), False, False], [tcolor("1.1", "red"), True, True]], ) def test_normal_ansi(self, value, strip_ansi_escape, expected): type_checker = class_under_test(value, StrictLevel.MIN, strip_ansi_escape=strip_ansi_escape) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/typepy-1.1.1/test/converter/test_bool.py new/typepy-1.1.5/test/converter/test_bool.py --- old/typepy-1.1.1/test/converter/test_bool.py 2020-03-28 16:22:51.000000000 +0100 +++ new/typepy-1.1.5/test/converter/test_bool.py 2021-04-11 14:44:33.000000000 +0200 @@ -14,47 +14,57 @@ ["method", "strict_level", "value", "expected"], [ ["convert", 0, True, True], + ["convert", 0, False, False], ["convert", 0, "true", True], + ["convert", 0, "FALSE", False], ["convert", 0, 1, True], ["convert", 0, 1.1, "E"], ["convert", 0, None, "E"], ["convert", 1, True, True], ["convert", 1, "true", True], + ["convert", 1, "FALSE", False], ["convert", 1, 1, "E"], ["convert", 1, 1.1, "E"], ["convert", 1, None, "E"], ["convert", 2, True, True], ["convert", 2, "true", "E"], + ["convert", 2, "FALSE", "E"], ["convert", 2, 1, "E"], ["convert", 2, 1.1, "E"], ["convert", 2, None, "E"], ["try_convert", 0, True, True], ["try_convert", 0, "true", True], + ["try_convert", 0, "FALSE", False], ["try_convert", 0, 1, True], ["try_convert", 0, 1.1, None], ["try_convert", 0, None, None], ["try_convert", 1, True, True], ["try_convert", 1, "true", True], + ["try_convert", 1, "FALSE", False], ["try_convert", 1, 1, None], ["try_convert", 1, 1.1, None], ["try_convert", 1, None, None], ["try_convert", 2, True, True], ["try_convert", 2, "true", None], + ["try_convert", 2, "FALSE", None], ["try_convert", 2, 1, None], ["try_convert", 2, 1.1, None], ["try_convert", 2, None, None], ["force_convert", 0, True, True], ["force_convert", 0, "true", True], + ["force_convert", 0, "FALSE", False], ["force_convert", 0, 1, True], ["force_convert", 0, 1.1, "E"], ["force_convert", 0, None, "E"], ["force_convert", 1, True, True], ["force_convert", 1, "true", True], + ["force_convert", 1, "FALSE", False], ["force_convert", 1, 1, True], ["force_convert", 1, 1.1, "E"], ["force_convert", 1, None, "E"], ["force_convert", 2, True, True], ["force_convert", 2, "true", True], + ["force_convert", 2, "FALSE", False], ["force_convert", 2, 1, True], ["force_convert", 2, 1.1, "E"], ["force_convert", 2, None, "E"], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/typepy-1.1.1/test/converter/test_realnumber.py new/typepy-1.1.5/test/converter/test_realnumber.py --- old/typepy-1.1.1/test/converter/test_realnumber.py 2020-03-28 16:22:57.000000000 +0100 +++ new/typepy-1.1.5/test/converter/test_realnumber.py 2021-04-11 14:44:33.000000000 +0200 @@ -130,8 +130,7 @@ ], ) def test_normal(self, method, strict_level, value, expected): - from typepy import StrictLevel - from typepy import Nan + from typepy import Nan, StrictLevel actual = convert_wrapper(typepy.RealNumber(value, strict_level), method) if Nan(expected, strict_level=StrictLevel.MIN).is_type(): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/typepy-1.1.1/tox.ini new/typepy-1.1.5/tox.ini --- old/typepy-1.1.1/tox.ini 2020-04-20 12:28:20.000000000 +0200 +++ new/typepy-1.1.5/tox.ini 2021-04-11 14:44:33.000000000 +0200 @@ -1,6 +1,6 @@ [tox] envlist = - py{35,36,37,38,39} + py{35,36,37,38,39,310} pypy3 build clean @@ -8,7 +8,6 @@ docs lint readme - release [testenv] deps = @@ -27,6 +26,7 @@ python setup.py clean --all [testenv:clean] +skip_install = true deps = cleanpy commands = @@ -35,7 +35,7 @@ [testenv:cov] deps = .[test] - coverage[toml] + coverage[toml]>=5 pytest-cov commands = pytest --cov {posargs:-vv} @@ -49,17 +49,19 @@ [testenv:fmt] basepython = python3.8 +skip_install = true deps = autoflake black - isort[pyproject] + isort>=5 commands = black setup.py test typepy autoflake --in-place --recursive --remove-all-unused-imports --ignore-init-module-imports . - isort --apply --recursive + isort . [testenv:lint] -basepython = python3.7 +basepython = python3.8 +skip_install = true deps = codespell pylama @@ -69,14 +71,9 @@ pylama [testenv:readme] +skip_install = true changedir = docs deps = readmemaker>=1.0.0 commands = python make_readme.py - -[testenv:release] -deps = - releasecmd>=0.3.1,<1 -commands = - python setup.py release --sign {posargs} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/typepy-1.1.1/typepy/__version__.py new/typepy-1.1.5/typepy/__version__.py --- old/typepy-1.1.1/typepy/__version__.py 2020-05-04 04:00:25.000000000 +0200 +++ new/typepy-1.1.5/typepy/__version__.py 2021-04-11 14:44:33.000000000 +0200 @@ -1,6 +1,6 @@ __author__ = "Tsuyoshi Hombashi" __copyright__ = "Copyright 2017, {}".format(__author__) __license__ = "MIT License" -__version__ = "1.1.1" +__version__ = "1.1.5" __maintainer__ = __author__ __email__ = "tsuyoshi.hombashi@gmail.com" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/typepy-1.1.1/typepy/converter/_bool.py new/typepy-1.1.5/typepy/converter/_bool.py --- old/typepy-1.1.1/typepy/converter/_bool.py 2020-03-28 16:24:31.000000000 +0100 +++ new/typepy-1.1.5/typepy/converter/_bool.py 2021-04-11 14:44:33.000000000 +0200 @@ -30,18 +30,17 @@ @staticmethod def __strict_strtobool(value): - from distutils.util import strtobool - if isinstance(value, bool): return value try: - lower_text = value.lower() + lower_text = value.casefold() except AttributeError: raise ValueError("invalid value '{}'".format(str(value))) - binary_value = strtobool(lower_text) - if lower_text not in ["true", "false"]: - raise ValueError("invalid value '{}'".format(str(value))) + if lower_text in ["true"]: + return True + elif lower_text in ["false"]: + return False - return bool(binary_value) + raise ValueError("invalid value '{}'".format(str(value))) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/typepy-1.1.1/typepy/converter/_datetime.py new/typepy-1.1.5/typepy/converter/_datetime.py --- old/typepy-1.1.1/typepy/converter/_datetime.py 2020-03-28 16:24:34.000000000 +0100 +++ new/typepy-1.1.5/typepy/converter/_datetime.py 2021-04-11 14:44:33.000000000 +0200 @@ -3,7 +3,6 @@ """ from datetime import date, datetime -from distutils.version import StrictVersion from .._common import strip_ansi_escape from .._const import DefaultValue, ParamKey @@ -145,13 +144,15 @@ validation is not executed. """ + from packaging.version import InvalidVersion, Version + try: try: - StrictVersion(self._value) + Version(self._value) raise TypeConversionError( "invalid datetime string: version string found {}".format(self._value) ) - except ValueError: + except InvalidVersion: pass except TypeError: raise TypeConversionError("invalid datetime string: type={}".format(type(self._value))) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/typepy-1.1.1/typepy/type/_base.py new/typepy-1.1.5/typepy/type/_base.py --- old/typepy-1.1.1/typepy/type/_base.py 2020-04-15 13:49:42.000000000 +0200 +++ new/typepy-1.1.5/typepy/type/_base.py 2021-04-11 14:44:33.000000000 +0200 @@ -115,7 +115,9 @@ return self.force_convert() raise TypeConversionError( - "failed to convert from {} to {}".format(type(self._data).__name__, self.typename) + "failed to convert {} from {} to {}".format( + self._data, type(self._data).__name__, self.typename + ) ) def force_convert(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/typepy-1.1.1/typepy.egg-info/PKG-INFO new/typepy-1.1.5/typepy.egg-info/PKG-INFO --- old/typepy-1.1.1/typepy.egg-info/PKG-INFO 2020-05-04 04:01:16.000000000 +0200 +++ new/typepy-1.1.5/typepy.egg-info/PKG-INFO 2021-04-11 14:44:49.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: typepy -Version: 1.1.1 +Version: 1.1.5 Summary: typepy is a Python library for variable type checker/validator/converter at a run time. Home-page: https://github.com/thombashi/typepy Author: Tsuyoshi Hombashi @@ -9,6 +9,7 @@ Project-URL: Documentation, https://typepy.rtfd.io/ Project-URL: Source, https://github.com/thombashi/typepy Project-URL: Tracker, https://github.com/thombashi/typepy/issues +Project-URL: Changes, https://github.com/thombashi/typepy/releases Description: .. contents:: **typepy** :backlinks: top :depth: 2 @@ -21,6 +22,10 @@ :target: https://badge.fury.io/py/typepy :alt: PyPI package version + .. image:: https://anaconda.org/conda-forge/typepy/badges/version.svg + :target: https://anaconda.org/conda-forge/typepy + :alt: conda-forge package version + .. image:: https://img.shields.io/pypi/pyversions/typepy.svg :target: https://pypi.org/project/typepy :alt: Supported Python versions @@ -29,22 +34,14 @@ :target: https://pypi.org/project/typepy :alt: Supported Python implementations - .. image:: https://img.shields.io/travis/thombashi/typepy/master.svg?label=Linux/macOS%... - :target: https://travis-ci.org/thombashi/typepy - :alt: Linux/macOS CI status - - .. image:: https://img.shields.io/appveyor/ci/thombashi/typepy/master.svg?label=Windows... - :target: https://ci.appveyor.com/project/thombashi/typepy - :alt: Windows CI status + .. image:: https://github.com/thombashi/typepy/workflows/Tests/badge.svg + :target: https://github.com/thombashi/typepy/actions?query=workflow%3ATests + :alt: Linux/macOS/Windows CI status .. image:: https://coveralls.io/repos/github/thombashi/typepy/badge.svg?branch=master :target: https://coveralls.io/github/thombashi/typepy?branch=master :alt: Test coverage - .. image:: https://img.shields.io/github/stars/thombashi/typepy.svg?style=social&label=Star - :target: https://github.com/thombashi/typepy - :alt: GitHub stars - Features ========== - checking a value type @@ -72,6 +69,48 @@ ``str`` (IP address) `IpAddress <https://typepy.rtfd.io/en/latest/pages/reference/type.html#ip-address-type>`__ ================================================ ======================================================================================================= + Installation + ============ + + Installation: pip + ------------------------------ + :: + + pip install typepy + + Install additional dependency packages with the following command if using ``typepy.DateTime`` class + + :: + + pip install typepy[datetime] + + Installation: conda + ------------------------------ + :: + + conda install -c conda-forge typepy + + Installation: apt + ------------------------------ + :: + + sudo add-apt-repository ppa:thombashi/ppa + sudo apt update + sudo apt install python3-typepy + + + Dependencies + ============ + - Python 3.5+ + - `Python package dependencies (automatically installed) <https://github.com/thombashi/typepy/network/dependencies>`__ + + Optioal dependencies + ---------------------------------- + These packages can be installed via ``pip install typepy[datetime]``: + + - `python-dateutil <https://dateutil.readthedocs.io/en/stable/>`__ + - `pytz <https://pypi.org/project/pytz/>`__ + Usage ======= Type Check Method @@ -158,48 +197,6 @@ More information can be found in the `API reference <https://typepy.rtfd.io/en/latest/pages/reference/index.html>`__. - Installation - ============ - - Install from PyPI - ------------------------------ - :: - - pip install typepy - - Install additional dependency packages with the following command if using ``typepy.DateTime`` class - - :: - - pip install typepy[datetime] - - Install from PPA (for Ubuntu) - ------------------------------ - :: - - sudo add-apt-repository ppa:thombashi/ppa - sudo apt update - sudo apt install python3-typepy - - - Dependencies - ============ - Python 3.5+ - - - `mbstrdecoder <https://github.com/thombashi/mbstrdecoder>`__ - - Optioal dependencies - ---------------------------------- - These packages can be installed via ``pip install typepy[datetime]``: - - - `python-dateutil <https://dateutil.readthedocs.io/en/stable/>`__ - - `pytz <https://pypi.org/project/pytz/>`__ - - Test dependencies - ---------------------------------- - - `pytest <https://docs.pytest.org/en/latest/>`__ - - `tox <https://testrun.org/tox/latest/>`__ - Documentation =============== https://typepy.rtfd.io/ @@ -218,6 +215,7 @@ Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/typepy-1.1.1/typepy.egg-info/requires.txt new/typepy-1.1.5/typepy.egg-info/requires.txt --- old/typepy-1.1.1/typepy.egg-info/requires.txt 2020-05-04 04:01:16.000000000 +0200 +++ new/typepy-1.1.5/typepy.egg-info/requires.txt 2021-04-11 14:44:49.000000000 +0200 @@ -1,12 +1,13 @@ -setuptools>=38.3.0 mbstrdecoder<2,>=1.0.0 [datetime] python-dateutil<3.0.0,>=2.8.0 pytz>=2018.9 +packaging [test] -pytest -termcolor +pytest>=6.0.1 +tcolorpy python-dateutil<3.0.0,>=2.8.0 pytz>=2018.9 +packaging
participants (1)
-
Source-Sync