Skip to content

Commit

Permalink
Update python-cornice to version 6.0.1 / rev 3 via SR 1145145
Browse files Browse the repository at this point in the history
  • Loading branch information
sebix authored and bmwiedemann committed Feb 8, 2024
1 parent 082f044 commit 981cc29
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 2 deletions.
Binary file modified packages/p/python-cornice/.files
Binary file not shown.
9 changes: 9 additions & 0 deletions packages/p/python-cornice/.rev
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,13 @@
<comment>Automatic submission by obs-autosubmit</comment>
<requestid>946496</requestid>
</revision>
<revision rev="3" vrev="2">
<srcmd5>a99599c406b0b929a42843edd2b9c1cc</srcmd5>
<version>6.0.1</version>
<time>1707415431</time>
<user>anag+factory</user>
<comment>- Add fix-python-312-test.patch from https://github.com/Cornices/cornice/commit/61e209d9bc946563bd7dc645a8a65f14d94246f1.patch to fix Python 3.12 build, see https://github.com/Cornices/cornice/issues/581
</comment>
<requestid>1145145</requestid>
</revision>
</revisionlist>
28 changes: 28 additions & 0 deletions packages/p/python-cornice/fix-python-312-test.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
From 61e209d9bc946563bd7dc645a8a65f14d94246f1 Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <[email protected]>
Date: Thu, 13 Jul 2023 10:48:10 -0400
Subject: [PATCH] Use TestCase.assertTrue() instead of TestCase.assert_()

The assert_() method is deprecated and will be removed in Python 3.12.
---
tests/test_resource.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/test_resource.py b/tests/test_resource.py
index 7fb544d6..ceb9ee70 100644
--- a/tests/test_resource.py
+++ b/tests/test_resource.py
@@ -183,11 +183,11 @@ def test_context_factory(self):
def test_explicit_collection_service_name(self):
route_url = testing.DummyRequest().route_url
# service must exist
- self.assert_(route_url('collection_user_service'))
+ self.assertTrue(route_url('collection_user_service'))

def test_explicit_service_name(self):
route_url = testing.DummyRequest().route_url
- self.assert_(route_url('user_service', id=42)) # service must exist
+ self.assertTrue(route_url('user_service', id=42)) # service must exist

@mock.patch('cornice.resource.Service')
def test_factory_is_autowired(self, mocked_service):
5 changes: 5 additions & 0 deletions packages/p/python-cornice/python-cornice.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 8 11:27:22 UTC 2024 - Sebastian Wagner <[email protected]>

- Add fix-python-312-test.patch from https://github.com/Cornices/cornice/commit/61e209d9bc946563bd7dc645a8a65f14d94246f1.patch to fix Python 3.12 build, see https://github.com/Cornices/cornice/issues/581

-------------------------------------------------------------------
Fri Jan 7 18:56:53 UTC 2022 - Sebastian Wagner <[email protected]>

Expand Down
7 changes: 5 additions & 2 deletions packages/p/python-cornice/python-cornice.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# spec file for package python-cornice
#
# 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
Expand All @@ -26,9 +26,11 @@ URL: https://cornice.readthedocs.io/
# use github URL for docs and tests
Source: https://github.com/Cornices/cornice/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
#Source: https://files.pythonhosted.org/packages/source/c/cornice/cornice-%%{version}.tar.gz
BuildRequires: python-rpm-macros
# PATCH-FIX-UPSTREAM fix-python-312-test.patch -- from https://github.com/Cornices/cornice/commit/61e209d9bc946563bd7dc645a8a65f14d94246f1 see https://github.com/Cornices/cornice/issues/581
Patch0: https://github.com/Cornices/cornice/commit/61e209d9bc946563bd7dc645a8a65f14d94246f1.patch#/fix-python-312-test.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# SECTION tests
BuildRequires: %{python_module Sphinx}
BuildRequires: %{python_module WebTest}
Expand All @@ -50,6 +52,7 @@ Provides helpers to build & document Web Services with Pyramid.

%prep
%setup -q -n cornice-%{version}
%patch 0 -p1
chmod -x docs/source/tutorial.rst

%build
Expand Down

0 comments on commit 981cc29

Please sign in to comment.