Hello community, here is the log from the commit of package python-alembic for openSUSE:Factory checked in at 2020-10-10 19:05:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-alembic (Old) and /work/SRC/openSUSE:Factory/.python-alembic.new.4249 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-alembic" Sat Oct 10 19:05:32 2020 rev:56 rq:840755 version:1.4.3 Changes: -------- --- /work/SRC/openSUSE:Factory/python-alembic/python-alembic.changes 2020-09-21 17:45:03.593005563 +0200 +++ /work/SRC/openSUSE:Factory/.python-alembic.new.4249/python-alembic.changes 2020-10-10 19:05:50.964530287 +0200 @@ -1,0 +2,6 @@ +Thu Oct 8 16:07:43 UTC 2020 - Matej Cepl <[email protected]> + +- Add pytest_depr_from_parent.patch to fix FTBGS with pytest 6.* + (gh#sqlalchemy/sqlalchemy#5635). + +------------------------------------------------------------------- New: ---- pytest_depr_from_parent.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-alembic.spec ++++++ --- /var/tmp/diff_new_pack.DUNFsx/_old 2020-10-10 19:05:52.472531075 +0200 +++ /var/tmp/diff_new_pack.DUNFsx/_new 2020-10-10 19:05:52.476531076 +0200 @@ -25,6 +25,9 @@ URL: https://github.com/sqlalchemy/alembic Source0: https://files.pythonhosted.org/packages/source/a/alembic/alembic-%{version}.tar.gz Source1: python-alembic-rpmlintrc +# PATCH-FIX-UPSTREAM pytest_depr_from_parent.patch gh#sqlalchemy/sqlalchemy#5635 [email protected] +# pytest >= 3.4.0 requires Class.from_parent call +Patch0: pytest_depr_from_parent.patch BuildRequires: %{python_module Mako} BuildRequires: %{python_module SQLAlchemy >= 1.1.0} BuildRequires: %{python_module mock} @@ -59,6 +62,7 @@ %prep %setup -q -n alembic-%{version} +%autopatch -p1 %build %python_build ++++++ pytest_depr_from_parent.patch ++++++ --- a/alembic/testing/plugin/pytestplugin.py +++ b/alembic/testing/plugin/pytestplugin.py @@ -35,16 +35,17 @@ def pytest_pycollect_makeitem(collector, if inspect.isclass(obj) and plugin_base.want_class(name, obj): # in pytest 5.4.0 - # return [ - # pytest.Class.from_parent(collector, - # name=parametrize_cls.__name__) - # for parametrize_cls in _parametrize_cls(collector.module, obj) - # ] - - return [ - pytest.Class(parametrize_cls.__name__, parent=collector) - for parametrize_cls in _parametrize_cls(collector.module, obj) - ] + if hasattr(pytest.Class, 'from_parent'): + return [ + pytest.Class.from_parent(collector, + name=parametrize_cls.__name__) + for parametrize_cls in _parametrize_cls(collector.module, obj) + ] + else: + return [ + pytest.Class(parametrize_cls.__name__, parent=collector) + for parametrize_cls in _parametrize_cls(collector.module, obj) + ] elif ( inspect.isfunction(obj) and isinstance(collector, pytest.Instance)
