6 Commits

Author SHA256 Message Date
3cea3b721d Accepting request 1290938 from devel:languages:python:pytest
- Add patch support-pytest-8.4.patch:
  * test cases can no longer call yield.

OBS-URL: https://build.opensuse.org/request/show/1290938
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-py?expand=0&rev=45
2025-07-08 13:28:00 +00:00
9299143571 - Add patch support-pytest-8.4.patch:
* test cases can no longer call yield.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-py?expand=0&rev=40
2025-07-07 04:55:36 +00:00
25d6b6eb6d Accepting request 1275088 from devel:languages:python:pytest
- Switch to pyproject macros.

OBS-URL: https://build.opensuse.org/request/show/1275088
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-py?expand=0&rev=44
2025-05-07 17:15:41 +00:00
313427f16a - Switch to pyproject macros.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-py?expand=0&rev=38
2025-05-07 07:01:22 +00:00
f72325767c Accepting request 1207774 from devel:languages:python:pytest
- Skip a recalcitrant test for Python 3.13's benefit.

OBS-URL: https://build.opensuse.org/request/show/1207774
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-py?expand=0&rev=43
2024-10-14 11:06:28 +00:00
6206921fca - Skip a recalcitrant test for Python 3.13's benefit.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-py?expand=0&rev=36
2024-10-14 05:25:51 +00:00
3 changed files with 40 additions and 7 deletions

View File

@@ -1,3 +1,19 @@
-------------------------------------------------------------------
Mon Jul 7 04:55:19 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch support-pytest-8.4.patch:
* test cases can no longer call yield.
-------------------------------------------------------------------
Wed May 7 06:46:56 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Switch to pyproject macros.
-------------------------------------------------------------------
Mon Oct 14 05:25:17 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Skip a recalcitrant test for Python 3.13's benefit.
-------------------------------------------------------------------
Tue Jul 25 14:23:03 UTC 2023 - Markéta Machová <mmachova@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file
# spec file for package python-py
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -31,17 +31,20 @@ Version: 1.11.0
Release: 0
Summary: Library with cross-python path, ini-parsing, io, code, log facilities
License: MIT
Group: Development/Languages/Python
URL: https://github.com/pytest-dev/py
Source: https://files.pythonhosted.org/packages/source/p/py/py-%{version}.tar.gz
# https://github.com/pytest-dev/py/pull/222
Patch0: pr_222.patch
# CVE-2022-42969 Remove all traces of svn
Patch1: remove-svn-remants.patch
# PATCH-FIX-OPENSUSE Support pytest 8.4+ changes
Patch2: support-pytest-8.4.patch
BuildRequires: %{python_module apipkg}
BuildRequires: %{python_module iniconfig}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
Requires: python-apipkg
Requires: python-iniconfig
BuildRequires: fdupes
@@ -82,11 +85,11 @@ rm conftest.py svntestbase.py test_svnauth.py test_svnurl.py test_svnwc.py
popd
%build
%python_build
%pyproject_wheel
%install
%if !%{with test}
%python_install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
@@ -97,7 +100,8 @@ export LANG=en_US.UTF-8
# https://github.com/pytest-dev/py/issues/209
# another failing tests with pytest 7.4: https://github.com/pytest-dev/pytest/commit/cc23ec91d042ee15145b890aea04e96f6e831101 https://github.com/pytest-dev/pytest/commit/0a20452f78a2f5401cf0fc05dad04c8aeee170d7
# ...but the failure comes from py.core, which was integrated to pytest long ago and will probably be dropped soon: https://github.com/pytest-dev/py/issues/288
%pytest -k 'not (test_getdimensions or test_format_excinfo or test_excinfo_repr or test_excinfo_str or test_syntaxerror_rerepresentation or test_len or test_power or test_comments or test_repr_traceback or test_traceback_getcrashentry)'
# and failing tests with Python 3.13.
%pytest -k 'not (test_getdimensions or test_format_excinfo or test_excinfo_repr or test_excinfo_str or test_syntaxerror_rerepresentation or test_len or test_power or test_comments or test_repr_traceback or test_traceback_getcrashentry or test_capturing_and_logging_fundamentals)'
%endif
%if !%{with test}
@@ -105,7 +109,7 @@ export LANG=en_US.UTF-8
%doc README.rst
%license LICENSE
%{python_sitelib}/py
%{python_sitelib}/py-%{version}*-info
%{python_sitelib}/py-%{version}.dist-info
%endif
%changelog

13
support-pytest-8.4.patch Normal file
View File

@@ -0,0 +1,13 @@
Index: py-1.11.0/testing/code/test_source.py
===================================================================
--- py-1.11.0.orig/testing/code/test_source.py
+++ py-1.11.0/testing/code/test_source.py
@@ -294,7 +294,7 @@ class TestSourceParsingAndCompiling:
for comp in py.code.compile, py.code.Source.compile:
for name in '', None, 'my':
- yield check, comp, name
+ check(comp, name)
def test_offsetless_synerr(self):
py.test.raises(SyntaxError, py.code.compile, "lambda a,a: 0", mode='eval')