Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-parver for openSUSE:Factory checked in at 2021-01-27 18:56:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-parver (Old) and /work/SRC/openSUSE:Factory/.python-parver.new.28504 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-parver" Wed Jan 27 18:56:59 2021 rev:3 rq:865913 version:0.3.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-parver/python-parver.changes 2020-03-08 22:22:44.680025899 +0100 +++ /work/SRC/openSUSE:Factory/.python-parver.new.28504/python-parver.changes 2021-01-27 18:57:00.576319639 +0100 @@ -1,0 +2,9 @@ +Fri Jan 22 09:28:08 UTC 2021 - Mark??ta Machov?? <mmach...@suse.com> + +- update to 0.3.1 + * Grammar is parsed when first used to improve import time. + * The minimum attrs version is now 19.2. + * Errors raised for keyword-only argument errors on Python 3 did + not have the right error message. + +------------------------------------------------------------------- Old: ---- parver-0.3.0.tar.gz New: ---- parver-0.3.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-parver.spec ++++++ --- /var/tmp/diff_new_pack.mARShd/_old 2021-01-27 18:57:01.184320580 +0100 +++ /var/tmp/diff_new_pack.mARShd/_new 2021-01-27 18:57:01.184320580 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-parver # -# 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 @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-parver -Version: 0.3.0 +Version: 0.3.1 Release: 0 Summary: Module to parse and manipulate version numbers License: MIT @@ -26,21 +26,20 @@ URL: https://github.com/RazerM/parver Source: https://files.pythonhosted.org/packages/source/p/parver/parver-%{version}.tar.gz BuildRequires: %{python_module setuptools} +BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: python-Arpeggio >= 1.7 +Requires: python-attrs >= 19.2 +Requires: python-six >= 1.13 +BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module Arpeggio >= 1.7} -BuildRequires: %{python_module attrs >= 17.4.0} +BuildRequires: %{python_module attrs >= 19.2} BuildRequires: %{python_module hypothesis >= 3.56} BuildRequires: %{python_module pretend >= 1.0} BuildRequires: %{python_module pytest} BuildRequires: %{python_module six >= 1.13} # /SECTION -BuildRequires: fdupes -Requires: python-Arpeggio >= 1.7 -Requires: python-attrs >= 17.4.0 -Requires: python-six >= 1.13 -BuildArch: noarch - %python_subpackages %description @@ -57,10 +56,7 @@ %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%{python_expand # -export PYTHONPATH=%{buildroot}%{$python_sitelib} -$python -m pytest -} +%pytest -q %files %{python_files} %license LICENSE ++++++ parver-0.3.0.tar.gz -> parver-0.3.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parver-0.3.0/CHANGELOG.md new/parver-0.3.1/CHANGELOG.md --- old/parver-0.3.0/CHANGELOG.md 2020-02-20 23:58:20.000000000 +0100 +++ new/parver-0.3.1/CHANGELOG.md 2020-09-28 22:11:31.000000000 +0200 @@ -3,6 +3,15 @@ ## [Unreleased][unreleased] N/A +## [0.3.1][] - 2020-09-28 +### Added +- Grammar is parsed when first used to improve import time. + +### Fixed +- attrs deprecation warning. The minimum attrs version is now 19.2 +- Errors raised for keyword-only argument errors on Python 3 did not have the + right error message. + ## [0.3][] - 2020-02-20 ### Added - `Version.truncate` method to remove trailing zeros from the release segment. @@ -78,7 +87,8 @@ First release. -[unreleased]: https://github.com/RazerM/parver/compare/0.3...HEAD +[unreleased]: https://github.com/RazerM/parver/compare/0.3.1...HEAD +[0.3.1]: https://github.com/RazerM/parver/compare/0.3...0.3.1 [0.3]: https://github.com/RazerM/parver/compare/0.2.1...0.3 [0.2.1]: https://github.com/RazerM/parver/compare/0.2...0.2.1 [0.2]: https://github.com/RazerM/parver/compare/0.1.1...0.2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parver-0.3.0/PKG-INFO new/parver-0.3.1/PKG-INFO --- old/parver-0.3.0/PKG-INFO 2020-02-21 00:00:03.260557200 +0100 +++ new/parver-0.3.1/PKG-INFO 2020-09-28 22:11:41.319848000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: parver -Version: 0.3.0 +Version: 0.3.1 Summary: Parse and manipulate version numbers. Home-page: https://github.com/RazerM/parver Author: Frazer McLean @@ -15,9 +15,9 @@ :target: https://parver.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status - .. image:: https://travis-ci.org/RazerM/parver.svg?branch=master - :target: https://travis-ci.org/RazerM/parver - :alt: Automated test status + .. image:: https://github.com/RazerM/parver/workflows/CI/badge.svg?branch=master + :target: https://github.com/RazerM/parver/actions?workflow=CI + :alt: CI Status .. image:: https://codecov.io/gh/RazerM/parver/branch/master/graph/badge.svg :target: https://codecov.io/gh/RazerM/parver @@ -67,5 +67,5 @@ Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.* Description-Content-Type: text/x-rst Provides-Extra: test -Provides-Extra: pep8test Provides-Extra: docstest +Provides-Extra: pep8test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parver-0.3.0/README.rst new/parver-0.3.1/README.rst --- old/parver-0.3.0/README.rst 2018-06-19 23:18:46.000000000 +0200 +++ new/parver-0.3.1/README.rst 2020-09-28 22:11:31.000000000 +0200 @@ -6,9 +6,9 @@ :target: https://parver.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status -.. image:: https://travis-ci.org/RazerM/parver.svg?branch=master - :target: https://travis-ci.org/RazerM/parver - :alt: Automated test status +.. image:: https://github.com/RazerM/parver/workflows/CI/badge.svg?branch=master + :target: https://github.com/RazerM/parver/actions?workflow=CI + :alt: CI Status .. image:: https://codecov.io/gh/RazerM/parver/branch/master/graph/badge.svg :target: https://codecov.io/gh/RazerM/parver Binary files old/parver-0.3.0/docs/__pycache__/conf.cpython-36.pyc and new/parver-0.3.1/docs/__pycache__/conf.cpython-36.pyc differ Binary files old/parver-0.3.0/docs/__pycache__/parverdoc.cpython-36.pyc and new/parver-0.3.1/docs/__pycache__/parverdoc.cpython-36.pyc differ Binary files old/parver-0.3.0/docs/__pycache__/parverdoc.cpython-38.pyc and new/parver-0.3.1/docs/__pycache__/parverdoc.cpython-38.pyc differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parver-0.3.0/docs/installation.rst new/parver-0.3.1/docs/installation.rst --- old/parver-0.3.0/docs/installation.rst 2018-05-12 01:24:57.000000000 +0200 +++ new/parver-0.3.1/docs/installation.rst 2020-09-28 22:11:31.000000000 +0200 @@ -17,13 +17,13 @@ .. code-block:: sh $ git clone https://github.com/RazerM/parver.git - Cloning into 'pg_grant'... + Cloning into 'parver'... Check out a `release tag`_ .. parsed-literal:: - $ cd pg_grant + $ cd parver $ git checkout |version| .. _`release tag`: https://github.com/RazerM/parver/releases diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parver-0.3.0/setup.cfg new/parver-0.3.1/setup.cfg --- old/parver-0.3.0/setup.cfg 2020-02-21 00:00:03.260958200 +0100 +++ new/parver-0.3.1/setup.cfg 2020-09-28 22:11:41.319848000 +0200 @@ -1,10 +1,6 @@ [bdist_wheel] universal = true -[isort] -known_first_party = parver -multi_line_output = 4 - [egg_info] tag_build = tag_date = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parver-0.3.0/setup.py new/parver-0.3.1/setup.py --- old/parver-0.3.0/setup.py 2020-02-20 20:37:32.000000000 +0100 +++ new/parver-0.3.1/setup.py 2020-09-28 22:11:31.000000000 +0200 @@ -50,7 +50,7 @@ package_dir={'': 'src'}, install_requires=[ 'arpeggio ~= 1.7', - 'attrs >= 17.4.0', + 'attrs >= 19.2', 'six ~= 1.13', ], extras_require=extras_require, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parver-0.3.0/src/parver/_about.py new/parver-0.3.1/src/parver/_about.py --- old/parver-0.3.0/src/parver/_about.py 2020-02-20 23:57:03.000000000 +0100 +++ new/parver-0.3.1/src/parver/_about.py 2020-09-28 22:11:31.000000000 +0200 @@ -1,7 +1,7 @@ # coding: utf-8 # This file is imported from __init__.py and exec'd from setup.py -__version__ = '0.3.0' +__version__ = '0.3.1' __description__ = 'Parse and manipulate version numbers.' __license__ = 'MIT' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parver-0.3.0/src/parver/_helpers.py new/parver-0.3.1/src/parver/_helpers.py --- old/parver-0.3.0/src/parver/_helpers.py 2020-02-20 20:38:11.000000000 +0100 +++ new/parver-0.3.1/src/parver/_helpers.py 2020-09-28 22:11:31.000000000 +0200 @@ -165,7 +165,7 @@ # handle any leftovers if not leftovers and kws: msg = "got an unexpected keyword argument '%s'" - raise TypeError(msg % (kws.keys()[0])) + raise TypeError(msg % (next(iter(kws.keys())))) return [kws] + kwonly diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parver-0.3.0/src/parver/_parse.py new/parver-0.3.1/src/parver/_parse.py --- old/parver-0.3.0/src/parver/_parse.py 2020-02-20 22:45:19.000000000 +0100 +++ new/parver-0.3.1/src/parver/_parse.py 2020-09-28 22:11:31.000000000 +0200 @@ -1,6 +1,8 @@ # coding: utf-8 from __future__ import absolute_import, division, print_function +from threading import Lock + import attr import six from arpeggio import NoMatch, PTNodeVisitor, Terminal, visit_parse_tree @@ -47,9 +49,8 @@ alpha = r'[0-9]*[a-z][a-z0-9]*' ''' -_strict_parser = ParserPEG(canonical, root_rule_name='version', skipws=False) -_permissive_parser = ParserPEG( - permissive, root_rule_name='version', skipws=False, ignore_case=True) +_strict_parser = _permissive_parser = None +_parser_create_lock = Lock() @attr.s @@ -195,8 +196,37 @@ """Raised when parsing an invalid version number.""" +def _get_parser(strict): + """Ensure the module-level peg parser is created and return it.""" + global _strict_parser, _permissive_parser + + # Each branch below only acquires the lock if the global is unset. + + if strict: + if _strict_parser is None: + with _parser_create_lock: + if _strict_parser is None: + _strict_parser = ParserPEG( + canonical, root_rule_name='version', skipws=False + ) + + return _strict_parser + else: + if _permissive_parser is None: + with _parser_create_lock: + if _permissive_parser is None: + _permissive_parser = ParserPEG( + permissive, + root_rule_name='version', + skipws=False, + ignore_case=True, + ) + + return _permissive_parser + + def parse(version, strict=False): - parser = _strict_parser if strict else _permissive_parser + parser = _get_parser(strict) try: tree = parser.parse(version.strip()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parver-0.3.0/src/parver/_rules.py new/parver-0.3.1/src/parver/_rules.py --- old/parver-0.3.0/src/parver/_rules.py 2020-02-20 22:32:38.000000000 +0100 +++ new/parver-0.3.1/src/parver/_rules.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,74 +0,0 @@ -# coding: utf-8 -from __future__ import absolute_import, division, print_function - -from arpeggio import EOF, Optional -from arpeggio import RegExMatch as _ -from arpeggio import ZeroOrMore - - -def alpha(): - return _(r'[0-9]*[a-z][a-z0-9]*') - - -def int_(): - return _(r'0|[1-9][0-9]*') - - -def dot(): - return '.' - - -def sep(): - return dot - - -def local_part(): - return [alpha, int_] - - -def local(): - return '+', local_part, ZeroOrMore(sep, local_part) - - -def dev(): - return sep, 'dev', int_ - - -def post_tag(): - return 'post' - - -def pre_post_num(): - return int_ - - -def post(): - return sep, post_tag, pre_post_num - - -def pre_tag(): - return ['a', 'b', 'rc'] - - -def pre(): - return pre_tag, pre_post_num - - -def release(): - return int_, ZeroOrMore(dot, int_) - - -def epoch(): - return int_, '!' - - -def version(): - return ( - Optional(epoch), - release, - Optional(pre), - Optional(post), - Optional(dev), - Optional(local), - EOF, - ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parver-0.3.0/src/parver/_version.py new/parver-0.3.1/src/parver/_version.py --- old/parver-0.3.0/src/parver/_version.py 2020-02-20 23:12:48.000000000 +0100 +++ new/parver-0.3.1/src/parver/_version.py 2020-09-28 22:11:31.000000000 +0200 @@ -89,9 +89,7 @@ is_seq(inst, attr, value) if not allow_empty and not value: - raise ValueError( - "'{name}' cannot be empty".format(name=attr.name, value=value) - ) + raise ValueError("'{name}' cannot be empty".format(name=attr.name)) for i, item in enumerate(value): try: @@ -113,7 +111,7 @@ return validate -@attr.s(frozen=True, repr=False, cmp=False) +@attr.s(frozen=True, repr=False, eq=False) class Version(object): """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parver-0.3.0/src/parver.egg-info/PKG-INFO new/parver-0.3.1/src/parver.egg-info/PKG-INFO --- old/parver-0.3.0/src/parver.egg-info/PKG-INFO 2020-02-21 00:00:03.000000000 +0100 +++ new/parver-0.3.1/src/parver.egg-info/PKG-INFO 2020-09-28 22:11:40.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: parver -Version: 0.3.0 +Version: 0.3.1 Summary: Parse and manipulate version numbers. Home-page: https://github.com/RazerM/parver Author: Frazer McLean @@ -15,9 +15,9 @@ :target: https://parver.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status - .. image:: https://travis-ci.org/RazerM/parver.svg?branch=master - :target: https://travis-ci.org/RazerM/parver - :alt: Automated test status + .. image:: https://github.com/RazerM/parver/workflows/CI/badge.svg?branch=master + :target: https://github.com/RazerM/parver/actions?workflow=CI + :alt: CI Status .. image:: https://codecov.io/gh/RazerM/parver/branch/master/graph/badge.svg :target: https://codecov.io/gh/RazerM/parver @@ -67,5 +67,5 @@ Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.* Description-Content-Type: text/x-rst Provides-Extra: test -Provides-Extra: pep8test Provides-Extra: docstest +Provides-Extra: pep8test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parver-0.3.0/src/parver.egg-info/SOURCES.txt new/parver-0.3.1/src/parver.egg-info/SOURCES.txt --- old/parver-0.3.0/src/parver.egg-info/SOURCES.txt 2020-02-21 00:00:03.000000000 +0100 +++ new/parver-0.3.1/src/parver.egg-info/SOURCES.txt 2020-09-28 22:11:41.000000000 +0200 @@ -12,14 +12,10 @@ docs/installation.rst docs/parverdoc.py docs/usage.rst -docs/__pycache__/conf.cpython-36.pyc -docs/__pycache__/parverdoc.cpython-36.pyc -docs/__pycache__/parverdoc.cpython-38.pyc src/parver/__init__.py src/parver/_about.py src/parver/_helpers.py src/parver/_parse.py -src/parver/_rules.py src/parver/_segments.py src/parver/_version.py src/parver.egg-info/PKG-INFO diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parver-0.3.0/src/parver.egg-info/requires.txt new/parver-0.3.1/src/parver.egg-info/requires.txt --- old/parver-0.3.0/src/parver.egg-info/requires.txt 2020-02-21 00:00:03.000000000 +0100 +++ new/parver-0.3.1/src/parver.egg-info/requires.txt 2020-09-28 22:11:40.000000000 +0200 @@ -1,5 +1,5 @@ arpeggio~=1.7 -attrs>=17.4.0 +attrs>=19.2 six~=1.13 [docstest] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parver-0.3.0/tests/test_helpers.py new/parver-0.3.1/tests/test_helpers.py --- old/parver-0.3.0/tests/test_helpers.py 2019-02-06 02:36:47.000000000 +0100 +++ new/parver-0.3.1/tests/test_helpers.py 2020-09-28 22:11:31.000000000 +0200 @@ -1,6 +1,8 @@ # coding: utf-8 from __future__ import absolute_import, division, print_function +from collections import OrderedDict + import pytest from parver._helpers import force_tuple, kwonly_args @@ -30,15 +32,29 @@ return a, b, kwargs +def fn3(**kwargs): + kwonly_args(kwargs, ('a', 'b')) + + +def fn4(**kwargs): + kwonly_args(kwargs, ('a', 'b', 'c')) + + +def fn5(**kwargs): + kwargs, b, c = kwonly_args(kwargs, ('b',), OrderedDict([('c', 5)])) + return b, c + + @pytest.mark.parametrize('fn, args, kwargs, result', [ (fn1, (1,), dict(b=2), (1, 2, 5)), (fn1, (1,), dict(b=2, c=3), (1, 2, 3)), - (fn1, (), dict(b=2), TypeError), - (fn1, (1, 2), dict(), TypeError), (fn1, (1,), dict(c=2), TypeError), (fn1, (1,), dict(b=2, d=4), TypeError), (fn2, (1,), dict(b=2), (1, 2, {})), (fn2, (1,), dict(b=2, c=3), (1, 2, dict(c=3))), + (fn3, (), dict(), TypeError), + (fn4, (), dict(), TypeError), + (fn5, (), dict(b=4), (4, 5)), ]) def test_kwonly_args(fn, args, kwargs, result): """Based on the snippet by Eric Snow @@ -52,7 +68,7 @@ isexception = False if isexception: - with pytest.raises(result): + with pytest.raises(result, match='keyword'): fn(*args, **kwargs) else: assert fn(*args, **kwargs) == result diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parver-0.3.0/tests/test_parse.py new/parver-0.3.1/tests/test_parse.py --- old/parver-0.3.0/tests/test_parse.py 2019-03-30 20:21:04.000000000 +0100 +++ new/parver-0.3.1/tests/test_parse.py 2020-09-28 22:11:31.000000000 +0200 @@ -2,7 +2,7 @@ from __future__ import absolute_import, division, print_function import pytest -from hypothesis import assume, given +from hypothesis import HealthCheck, assume, given, settings from parver import ParseError, Version @@ -10,16 +10,19 @@ @given(whitespace, version_string(), whitespace) +@settings(suppress_health_check=[HealthCheck.too_slow]) def test_parse_hypothesis(prefix, version, suffix): Version.parse(prefix + version + suffix) @given(whitespace, version_string(strict=True), whitespace) +@settings(suppress_health_check=[HealthCheck.too_slow]) def test_parse_strict_hypothesis(prefix, version, suffix): Version.parse(prefix + version + suffix, strict=True) @given(version_string(strict=False)) +@settings(suppress_health_check=[HealthCheck.too_slow]) def test_parse_strict_error(version): v = Version.parse(version) @@ -34,6 +37,7 @@ @given(version_string()) +@settings(suppress_health_check=[HealthCheck.too_slow]) def test_roundtrip(version): assert str(Version.parse(version)) == version diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parver-0.3.0/tests/test_version.py new/parver-0.3.1/tests/test_version.py --- old/parver-0.3.0/tests/test_version.py 2020-02-20 23:34:29.000000000 +0100 +++ new/parver-0.3.1/tests/test_version.py 2020-09-28 22:11:31.000000000 +0200 @@ -2,7 +2,7 @@ from __future__ import absolute_import, division, print_function import pytest -from hypothesis import given +from hypothesis import HealthCheck, given, settings from parver import Version @@ -322,6 +322,7 @@ @given(version_strategy()) +@settings(suppress_health_check=[HealthCheck.too_slow]) def test_replace_roundtrip(version): """All the logic inside replace() is in converting the attributes to the form expected by __init__, so this function tests most of that. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parver-0.3.0/tox.ini new/parver-0.3.1/tox.ini --- old/parver-0.3.0/tox.ini 2020-02-20 23:34:19.000000000 +0100 +++ new/parver-0.3.1/tox.ini 2020-09-28 22:11:31.000000000 +0200 @@ -45,3 +45,11 @@ [pytest] addopts = -r s + +[gh-actions] +python = + 2.7: py27, pep8 + 3.5: py35 + 3.6: py36 + 3.7: py37 + 3.8: py38, py3pep8, docs