Accepting request 1196146 from devel:languages:python
- Switch to autosetup and pyproject macros. - Add patch support-pytest-8.patch: * Use correct setup/teardown method names. OBS-URL: https://build.opensuse.org/request/show/1196146 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-graphene?expand=0&rev=12
This commit is contained in:
commit
48a0735070
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 27 04:18:34 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Switch to autosetup and pyproject macros.
|
||||
- Add patch support-pytest-8.patch:
|
||||
* Use correct setup/teardown method names.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 17 01:58:11 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-graphene
|
||||
#
|
||||
# Copyright (c) 2023 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
|
||||
@ -19,15 +19,18 @@
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-graphene
|
||||
Version: 3.3.0
|
||||
%define onedotversion 3.3
|
||||
Release: 0
|
||||
Summary: GraphQL Framework for Python
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/graphql-python/graphene
|
||||
Source: https://github.com/graphql-python/graphene/archive/v%{version}.tar.gz#/graphene-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM gh#graphql-python/graphene#1540
|
||||
Patch0: support-pytest-8.patch
|
||||
BuildRequires: %{python_module aniso8601 >= 8}
|
||||
BuildRequires: %{python_module graphql-core >= 3.1}
|
||||
BuildRequires: %{python_module graphql-relay >= 3.1}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module promise}
|
||||
BuildRequires: %{python_module pytest-asyncio}
|
||||
BuildRequires: %{python_module pytest-benchmark}
|
||||
@ -35,6 +38,7 @@ BuildRequires: %{python_module pytest-mock}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module pytz}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-aniso8601 >= 8
|
||||
@ -47,13 +51,13 @@ BuildArch: noarch
|
||||
Graphene is a Python library for building GraphQL schemas/types.
|
||||
|
||||
%prep
|
||||
%setup -q -n graphene-%{version}
|
||||
%autosetup -p1 -n graphene-%{version}
|
||||
|
||||
%build
|
||||
%python_build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
@ -64,6 +68,7 @@ Graphene is a Python library for building GraphQL schemas/types.
|
||||
%files %{python_files}
|
||||
%doc README.rst
|
||||
%license LICENSE
|
||||
%{python_sitelib}/*graphene*/
|
||||
%{python_sitelib}/graphene
|
||||
%{python_sitelib}/graphene-%{onedotversion}.dist-info
|
||||
|
||||
%changelog
|
||||
|
57
support-pytest-8.patch
Normal file
57
support-pytest-8.patch
Normal file
@ -0,0 +1,57 @@
|
||||
From 15a0bf21ba5fe62de48a3a5be8058848e68ebe74 Mon Sep 17 00:00:00 2001
|
||||
From: Carsten Schoenert <c.schoenert@t-online.de>
|
||||
Date: Sun, 17 Mar 2024 10:03:48 +0100
|
||||
Subject: [PATCH] pytest: Don't use nose like syntax
|
||||
|
||||
The tests in test_custom_global_id.py use the old nose specific method
|
||||
'setup(self)' which isn't supported anymore in Pytest 8+. The tests fail
|
||||
with this error message without modification.
|
||||
|
||||
E pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
|
||||
E graphene/relay/tests/test_custom_global_id.py::TestIncompleteCustomGlobalID::test_must_define_resolve_global_id is using nose-specific method: `setup(self)`
|
||||
E To remove this warning, rename it to `setup_method(self)`
|
||||
E See docs: https://docs.pytest.org/en/stable/deprecations.html#support-for-tests-written-for-nose
|
||||
---
|
||||
graphene/relay/tests/test_custom_global_id.py | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/graphene/relay/tests/test_custom_global_id.py b/graphene/relay/tests/test_custom_global_id.py
|
||||
index c1bf0fb4b..8f7991409 100644
|
||||
--- a/graphene/relay/tests/test_custom_global_id.py
|
||||
+++ b/graphene/relay/tests/test_custom_global_id.py
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
class TestUUIDGlobalID:
|
||||
- def setup(self):
|
||||
+ def setup_method(self):
|
||||
self.user_list = [
|
||||
{"id": uuid4(), "name": "First"},
|
||||
{"id": uuid4(), "name": "Second"},
|
||||
@@ -77,7 +77,7 @@ def test_get_by_id(self):
|
||||
|
||||
|
||||
class TestSimpleGlobalID:
|
||||
- def setup(self):
|
||||
+ def setup_method(self):
|
||||
self.user_list = [
|
||||
{"id": "my global primary key in clear 1", "name": "First"},
|
||||
{"id": "my global primary key in clear 2", "name": "Second"},
|
||||
@@ -140,7 +140,7 @@ def test_get_by_id(self):
|
||||
|
||||
|
||||
class TestCustomGlobalID:
|
||||
- def setup(self):
|
||||
+ def setup_method(self):
|
||||
self.user_list = [
|
||||
{"id": 1, "name": "First"},
|
||||
{"id": 2, "name": "Second"},
|
||||
@@ -219,7 +219,7 @@ def test_get_by_id(self):
|
||||
|
||||
|
||||
class TestIncompleteCustomGlobalID:
|
||||
- def setup(self):
|
||||
+ def setup_method(self):
|
||||
self.user_list = [
|
||||
{"id": 1, "name": "First"},
|
||||
{"id": 2, "name": "Second"},
|
Loading…
x
Reference in New Issue
Block a user