1
0

- use pyproject_wheel to build

- skip broken tests with python 3.12
- Update to 3.4.1:
  * This is just a minor bugfix release to fix CI.
- 3.4.0:
  * Mirror the message priority in the headers (eba336b)
- 3.3.0:
  * Add support for asyncio-based callbacks in the consumer. As a
    consequence, the Twisted reactor used by the CLI is now asyncio.
    (#282)

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fedora-messaging?expand=0&rev=17
This commit is contained in:
Daniel Garcia 2024-03-04 14:51:50 +00:00 committed by Git OBS Bridge
parent 86d924c7dc
commit 8e1cfcfd1d
4 changed files with 46 additions and 17 deletions

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:29102b55a18ca90df4d2af45092a6949ce3e2726ce7d57f37ec9d26eaf7d7606
size 146926

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f77828c5b54726bdd02ceb3ec5b2d92540903a77d2f5fa2a2f843913cc863b2e
size 152504

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Mon Mar 4 14:50:05 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
- use pyproject_wheel to build
- skip broken tests with python 3.12
- Update to 3.4.1:
* This is just a minor bugfix release to fix CI.
- 3.4.0:
* Mirror the message priority in the headers (eba336b)
- 3.3.0:
* Add support for asyncio-based callbacks in the consumer. As a
consequence, the Twisted reactor used by the CLI is now asyncio.
(#282)
-------------------------------------------------------------------
Thu Dec 15 09:16:19 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package python-fedora-messaging
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -17,13 +17,15 @@
Name: python-fedora-messaging
Version: 3.2.0
Version: 3.4.1
Release: 0
Summary: Python tools for Fedora's messaging infrastructure
License: GPL-2.0-or-later
URL: https://github.com/fedora-infra/fedora-messaging
Source: https://files.pythonhosted.org/packages/source/f/fedora_messaging/fedora_messaging-%{version}.tar.gz
Source: https://github.com/fedora-infra/fedora-messaging/archive/refs/tags/v%{version}.tar.gz#/fedora-messaging-%{version}.tar.gz
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-Twisted
@ -35,7 +37,8 @@ Requires: python-pika >= 1.0.1
Requires: python-pyOpenSSL
Requires: python-pytz
Requires: python-service_identity
Requires: python-toml
Requires: python-setuptools
Requires: python-tomli
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module Sphinx}
@ -47,29 +50,31 @@ BuildRequires: %{python_module crochet}
BuildRequires: %{python_module jsonschema}
BuildRequires: %{python_module pika >= 1.0.1}
BuildRequires: %{python_module pyOpenSSL}
BuildRequires: %{python_module pytest-mock}
BuildRequires: %{python_module pytest-twisted}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module pytz}
BuildRequires: %{python_module service_identity}
BuildRequires: %{python_module toml}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module tomli}
BuildRequires: %{python_module towncrier}
BuildRequires: %{python_module treq}
# /SECTION
Requires(post): update-alternatives
Requires(postun):update-alternatives
Requires(postun): update-alternatives
%python_subpackages
%description
A set of Python tools for using Fedora's messaging infrastructure.
%prep
%setup -q -n fedora_messaging-%{version}
%autosetup -p1 -n fedora-messaging-%{version}
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/fedora-messaging
%{python_expand rm -r %{buildroot}%{$python_sitelib}/fedora_messaging/tests/
%fdupes %{buildroot}%{$python_sitelib}
@ -85,11 +90,21 @@ A set of Python tools for using Fedora's messaging infrastructure.
export PATH=$PATH:%{buildroot}%{_bindir}
export PYTHONDONTWRITEBYTECODE=1
export LANG=en_US.UTF-8
# https://github.com/fedora-infra/fedora-messaging/issues/255
sed -i 's:. Perhaps you forgot a comma?::' fedora_messaging/tests/unit/test_cli.py
# test_consume_unexpected_crash or test_consume_successful_halt are intermittent
# and only relevant for improved handling of an unexpected failure/halt
%pytest -k 'not (test_consume_unexpected_crash or test_consume_successful_halt)'
# to avoid import collision
pushd fedora_messaging
# Tests that fails on python 3.12 because unittest.mock
donttest="test_bindings_dict"
donttest+=" or test_bindings_list_of_dict"
donttest+=" or test_defaults"
donttest+=" or test_with_queues"
donttest+=" or test_wrap_bindings"
donttest+=" or test_app_name"
donttest+=" or test_callable_getattr_failure"
donttest+=" or test_cli_callable_import_failure_cli_opt"
donttest+=" or test_cli_callable_wrong_format"
donttest+=" or test_missing_cli_and_conf_callable"
%pytest -k "not ($donttest)" tests/unit
popd
%files %{python_files}
%doc README.rst