15
0

- Update to 0.20.3:

* Drop Python 3.7 support (end of life 27 Jun 2023).
  * Tag Python 3.11 and 3.12 support.
  * Add caveat about labe escaping/quoting to .node() and .render() API docs.
  * Document that doctest_skip_exe() lines in doctest should be ignored.
- Drop patch python312-syntax-warning.patch, no longer required.
- Ignore conftest files during collection, due to pytest issue.
- Switch pyproject macros.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-graphviz?expand=0&rev=33
This commit is contained in:
2024-05-17 02:49:30 +00:00
committed by Git OBS Bridge
parent 78ade11a16
commit d3d53b0be4
5 changed files with 25 additions and 42 deletions

Binary file not shown.

BIN
graphviz-0.20.3.zip LFS Normal file

Binary file not shown.

View File

@@ -1,3 +1,15 @@
-------------------------------------------------------------------
Fri May 17 02:48:32 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Update to 0.20.3:
* Drop Python 3.7 support (end of life 27 Jun 2023).
* Tag Python 3.11 and 3.12 support.
* Add caveat about labe escaping/quoting to .node() and .render() API docs.
* Document that doctest_skip_exe() lines in doctest should be ignored.
- Drop patch python312-syntax-warning.patch, no longer required.
- Ignore conftest files during collection, due to pytest issue.
- Switch pyproject macros.
-------------------------------------------------------------------
Wed Dec 6 22:22:48 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-graphviz
#
# 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
@@ -18,18 +18,18 @@
%{?sle15_python_module_pythons}
Name: python-graphviz
Version: 0.20.1
Version: 0.20.3
Release: 0
Summary: Python interface for Graphviz
License: MIT
Group: Development/Languages/Python
URL: https://github.com/xflr6/graphviz
Source: https://files.pythonhosted.org/packages/source/g/graphviz/graphviz-%{version}.zip
Patch1: python312-syntax-warning.patch
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest >= 6}
BuildRequires: %{python_module pytest-mock >= 3}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: dos2unix
BuildRequires: fdupes
BuildRequires: graphviz
@@ -65,19 +65,20 @@ sed -i '/^mock_use_standalone_module/d' setup.cfg
dos2unix LICENSE.txt README.rst docs/*.rst
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pytest
# https://github.com/pytest-dev/pytest/issues/12123
%pytest --ignore tests/conftest.py --ignore tests/backend/conftest.py
%files %{python_files}
%license LICENSE.txt
%doc README.rst
%{python_sitelib}/graphviz
%{python_sitelib}/graphviz-%{version}*-info
%{python_sitelib}/graphviz-%{version}.dist-info
%changelog

View File

@@ -1,30 +0,0 @@
From 5ce9fc5de4f2284baa27d7a8d68ab0885d032868 Mon Sep 17 00:00:00 2001
From: Sebastian Bank <sebastian.bank@uni-leipzig.de>
Date: Tue, 24 Oct 2023 20:39:52 +0200
Subject: [PATCH] expect SyntaxWarning in test_deprecated_escape() under Python
3.12
https://docs.python.org/3.12/whatsnew/3.12.html#other-language-changes
---
tests/test_quoting.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Index: graphviz-0.20.1/tests/test_quoting.py
===================================================================
--- graphviz-0.20.1.orig/tests/test_quoting.py
+++ graphviz-0.20.1/tests/test_quoting.py
@@ -1,3 +1,4 @@
+import sys
import warnings
import pytest
@@ -14,7 +15,8 @@ def test_deprecated_escape(recwarn, char
escape = eval(rf'"\{char}"')
assert len(recwarn) == 1
- w = recwarn.pop(DeprecationWarning)
+ w = recwarn.pop(DeprecationWarning if sys.version_info < (3, 12)
+ else SyntaxWarning)
assert str(w.message).startswith('invalid escape sequence')
assert escape == f'\\{char}'