Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-rply for openSUSE:Factory checked in at 2023-01-23 18:32:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-rply (Old) and /work/SRC/openSUSE:Factory/.python-rply.new.32243 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-rply" Mon Jan 23 18:32:47 2023 rev:6 rq:1060383 version:0.7.8 Changes: -------- --- /work/SRC/openSUSE:Factory/python-rply/python-rply.changes 2022-10-08 01:26:31.294408081 +0200 +++ /work/SRC/openSUSE:Factory/.python-rply.new.32243/python-rply.changes 2023-01-23 18:32:56.412465681 +0100 @@ -1,0 +2,7 @@ +Sat Jan 21 18:59:12 UTC 2023 - Ben Greiner <[email protected]> + +- Fix test suite: pytest no longer comes with py + * Add rply-pr116-pytest.patch gh#alex/rply#116 +- PEP517 build + +------------------------------------------------------------------- New: ---- rply-pr116-pytest.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-rply.spec ++++++ --- /var/tmp/diff_new_pack.Zu3L9Z/_old 2023-01-23 18:32:57.088470359 +0100 +++ /var/tmp/diff_new_pack.Zu3L9Z/_new 2023-01-23 18:32:57.092470387 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-rply # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,7 +16,6 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-rply Version: 0.7.8 Release: 0 @@ -26,7 +25,11 @@ URL: https://github.com/alex/rply # https://github.com/alex/rply/issues/90 Source: https://github.com/alex/rply/archive/v%{version}.tar.gz +# PATCH-FIX-UPSTREAM rply-pr116-pytest.patch gh#alex/rply#116 +Patch0: rply-pr116-pytest.patch +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-appdirs @@ -43,13 +46,13 @@ public API, and with RPython support. %prep -%setup -q -n rply-%{version} +%autosetup -p1 -n rply-%{version} %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check @@ -58,6 +61,7 @@ %files %{python_files} %license LICENSE %doc README.rst -%{python_sitelib}/* +%{python_sitelib}/rply +%{python_sitelib}/rply-%{version}.dist-info %changelog ++++++ rply-pr116-pytest.patch ++++++ >From a15a815d1237fe220bcc42932eeb0387da5939af Mon Sep 17 00:00:00 2001 From: Ben Greiner <[email protected]> Date: Sat, 21 Jan 2023 20:03:36 +0100 Subject: [PATCH 1/5] py is deprecated --- tests/test_ztranslation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_ztranslation.py b/tests/test_ztranslation.py index b4baf69..3a33ce0 100644 --- a/tests/test_ztranslation.py +++ b/tests/test_ztranslation.py @@ -1,11 +1,11 @@ import re -import py +import pytest try: from rpython.rtyper.test.test_llinterp import interpret except ImportError: - pytestmark = py.test.mark.skip("Needs RPython to be on the PYTHONPATH") + pytestmark = pytest.mark.skip("Needs RPython to be on the PYTHONPATH") from rply import LexerGenerator, ParserGenerator, Token from rply.errors import ParserGeneratorWarning >From c04b00c65144bfb4556616377475a9c1986fd49c Mon Sep 17 00:00:00 2001 From: Ben Greiner <[email protected]> Date: Sat, 21 Jan 2023 20:04:29 +0100 Subject: [PATCH 2/5] Update tox.ini --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 13155c8..fd45235 100644 --- a/tox.ini +++ b/tox.ini @@ -6,7 +6,7 @@ deps = pytest # just running tox with PYTHONPATH=pypy tox fails, see # https://bitbucket.org/hpk42/tox/issue/146/setting-pythonpath-causes-tox-to-crash setenv = PYTHONPATH={env:PYPY_LOCATION} -commands = py.test +commands = pytest [testenv:docs] deps = sphinx >From 8caf19f547082dc340c2891d7f6368081b74d212 Mon Sep 17 00:00:00 2001 From: Ben Greiner <[email protected]> Date: Sat, 21 Jan 2023 20:07:57 +0100 Subject: [PATCH 3/5] Update test_utils.py --- tests/test_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_utils.py b/tests/test_utils.py index 19e674f..9c2ab79 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -1,6 +1,6 @@ from operator import itemgetter -import py +import pytest from rply.utils import IdentityDict @@ -20,7 +20,7 @@ def test_delitem(self): x = [] d[x] = "hello" del d[x] - with py.test.raises(KeyError): + with pytest.raises(KeyError): d[x] def test_len(self): >From 756be0670400e1dbf4a4eb5d12ced63c7cf48ecc Mon Sep 17 00:00:00 2001 From: Ben Greiner <[email protected]> Date: Sat, 21 Jan 2023 20:09:12 +0100 Subject: [PATCH 4/5] Update test_parsergenerator.py --- tests/test_parsergenerator.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test_parsergenerator.py b/tests/test_parsergenerator.py index 0316399..62e4825 100644 --- a/tests/test_parsergenerator.py +++ b/tests/test_parsergenerator.py @@ -1,6 +1,6 @@ import uuid -import py +import pytest from rply import ParserGenerator, Token from rply.errors import ParserGeneratorError @@ -11,7 +11,7 @@ class TestParserGenerator(BaseTests): def test_production_syntax_error(self): pg = ParserGenerator([]) - with py.test.raises(ParserGeneratorError): + with pytest.raises(ParserGeneratorError): pg.production("main VALUE") def test_production_terminal_overlap(self): @@ -21,7 +21,7 @@ def test_production_terminal_overlap(self): def x(p): pass - with py.test.raises(ParserGeneratorError): + with pytest.raises(ParserGeneratorError): pg.build() def test_duplicate_precedence(self): @@ -29,7 +29,7 @@ def test_duplicate_precedence(self): ("left", ["term", "term"]) ]) - with py.test.raises(ParserGeneratorError): + with pytest.raises(ParserGeneratorError): pg.build() def test_invalid_associativity(self): @@ -37,7 +37,7 @@ def test_invalid_associativity(self): ("to-the-left", ["term"]), ]) - with py.test.raises(ParserGeneratorError): + with pytest.raises(ParserGeneratorError): pg.build() def test_nonexistent_precedence(self): @@ -47,7 +47,7 @@ def test_nonexistent_precedence(self): def main(p): pass - with py.test.raises(ParserGeneratorError): + with pytest.raises(ParserGeneratorError): pg.build() def test_error_symbol(self): >From cf76ce0c47928dc9778f44a0cd2a23a6b959798c Mon Sep 17 00:00:00 2001 From: Ben Greiner <[email protected]> Date: Sat, 21 Jan 2023 20:10:12 +0100 Subject: [PATCH 5/5] Update test_parser.py --- tests/test_parser.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_parser.py b/tests/test_parser.py index 6cdf68f..51b7647 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -1,6 +1,6 @@ import operator -import py +import pytest from rply import ParserGenerator, ParsingError, Token from rply.errors import ParserGeneratorWarning @@ -157,7 +157,7 @@ def main(p): parser = pg.build() - with py.test.raises(ParsingError) as exc_info: + with pytest.raises(ParsingError) as exc_info: parser.parse(iter([ Token("VALUE", "hello"), Token("VALUE", "world", SourcePosition(5, 10, 2)), @@ -181,7 +181,7 @@ def error_handler(token): token = Token("VALUE", "world") - with py.test.raises(ValueError) as exc_info: + with pytest.raises(ValueError) as exc_info: parser.parse(iter([ Token("VALUE", "hello"), token @@ -236,7 +236,7 @@ def error(state, token): state = ParserState() token = Token("VALUE", "") - with py.test.raises(ValueError) as exc_info: + with pytest.raises(ValueError) as exc_info: parser.parse(iter([token]), state=state) assert exc_info.value.args[0] is state
