From 24db23a5363c2f078e392efb9444a0a994bbe4b879576cc4e2ecbe69c5be28eb Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sun, 1 Sep 2024 19:15:23 +0000 Subject: [PATCH] - add python313.patch: * skip known testfailure with 3.13 :func:`long_typename`, :func:`safe_repr`, :func:`short_repr`, OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-objgraph?expand=0&rev=19 --- python-objgraph.changes | 8 +++++++- python-objgraph.spec | 14 ++++++++++---- python313.patch | 12 ++++++++++++ 3 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 python313.patch diff --git a/python-objgraph.changes b/python-objgraph.changes index 0549a6d..b858a39 100644 --- a/python-objgraph.changes +++ b/python-objgraph.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Sep 1 19:14:13 UTC 2024 - Dirk Müller + +- add python313.patch: + * skip known testfailure with 3.13 + ------------------------------------------------------------------- Sat Mar 16 08:32:06 UTC 2024 - Dirk Müller @@ -103,7 +109,7 @@ Wed Apr 19 16:16:46 UTC 2017 - toddrme2178@gmail.com (via the new ``output`` argument) as an alternative to a filename. * Made internal helper methods private. This includes :func:`find_chain`, :func:`show_graph`, :func:`obj_node_id`, :func:`obj_label`, :func:`quote`, - :func:`long_typename`, :func:`safe_repr`, :func:`short_repr`, + :func:`long_typename`, :func:`safe_repr`, :func:`short_repr`, :func:`gradient`, :func:`edge_label`, and :func:`_program_in_path`. * Correctly determine the name of old-style classes in :func:`count`, :func:`by_type`, and graph drawing functions. diff --git a/python-objgraph.spec b/python-objgraph.spec index 180ea09..4db3e66 100644 --- a/python-objgraph.spec +++ b/python-objgraph.spec @@ -25,8 +25,12 @@ License: MIT Group: Development/Languages/Python URL: http://mg.pov.lt/objgraph/ Source: https://files.pythonhosted.org/packages/source/o/objgraph/objgraph-%{version}.tar.gz +# see https://github.com/mgedmin/objgraph/issues/80 +Patch1: python313.patch BuildRequires: %{python_module graphviz} +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: graphviz-gd BuildRequires: graphviz-gnome @@ -44,13 +48,13 @@ graphviz is needed if pretty graphs are desired. xdot can be used for interactive use. %prep -%setup -q -n objgraph-%{version} +%autosetup -p1 -n objgraph-%{version} %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check @@ -59,6 +63,8 @@ xdot can be used for interactive use. %files %{python_files} %doc README.rst CHANGES.rst HACKING.rst %license LICENSE -%{python_sitelib}/* +%{python_sitelib}/objgraph.py +%pycache_only %{python_sitelib}/__pycache__/objgraph* +%{python_sitelib}/objgraph-%{version}.dist-info %changelog diff --git a/python313.patch b/python313.patch new file mode 100644 index 0000000..d69754d --- /dev/null +++ b/python313.patch @@ -0,0 +1,12 @@ +Index: objgraph-3.6.1/tests.py +=================================================================== +--- objgraph-3.6.1.orig/tests.py ++++ objgraph-3.6.1/tests.py +@@ -465,6 +465,7 @@ class StringRepresentationTest(GarbageCo + objgraph._gradient((0.1, 0.2, 0.3), + (0.2, 0.3, 0.4), 0, 0)) + ++ @skipIf(sys.version_info[1] > 12, "Python 3.13 fails with error here (gh#mgedmin/objgraph#80)") + def test_edge_label_frame_locals(self): + frame = sys._getframe() + self.assertEqual(' [label="f_locals",weight=10]',