Accepting request 1198176 from devel:languages:python

- add python313.patch:
  * skip known testfailure with 3.13
- modernize spec file

    :func:`long_typename`, :func:`safe_repr`, :func:`short_repr`,

OBS-URL: https://build.opensuse.org/request/show/1198176
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-objgraph?expand=0&rev=9
This commit is contained in:
Dominique Leuenberger 2024-09-03 11:37:32 +00:00 committed by Git OBS Bridge
commit 528264bc7a
3 changed files with 30 additions and 5 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Sun Sep 1 19:14:13 UTC 2024 - Dirk Müller <dmueller@suse.com>
- add python313.patch:
* skip known testfailure with 3.13
- modernize spec file
------------------------------------------------------------------- -------------------------------------------------------------------
Sat Mar 16 08:32:06 UTC 2024 - Dirk Müller <dmueller@suse.com> Sat Mar 16 08:32:06 UTC 2024 - Dirk Müller <dmueller@suse.com>

View File

@ -25,8 +25,12 @@ License: MIT
Group: Development/Languages/Python Group: Development/Languages/Python
URL: http://mg.pov.lt/objgraph/ URL: http://mg.pov.lt/objgraph/
Source: https://files.pythonhosted.org/packages/source/o/objgraph/objgraph-%{version}.tar.gz 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 graphviz}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: graphviz-gd BuildRequires: graphviz-gd
BuildRequires: graphviz-gnome BuildRequires: graphviz-gnome
@ -44,13 +48,13 @@ graphviz is needed if pretty graphs are desired.
xdot can be used for interactive use. xdot can be used for interactive use.
%prep %prep
%setup -q -n objgraph-%{version} %autosetup -p1 -n objgraph-%{version}
%build %build
%python_build %pyproject_wheel
%install %install
%python_install %pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
%check %check
@ -59,6 +63,8 @@ xdot can be used for interactive use.
%files %{python_files} %files %{python_files}
%doc README.rst CHANGES.rst HACKING.rst %doc README.rst CHANGES.rst HACKING.rst
%license LICENSE %license LICENSE
%{python_sitelib}/* %{python_sitelib}/objgraph.py
%pycache_only %{python_sitelib}/__pycache__/objgraph*
%{python_sitelib}/objgraph-%{version}.dist-info
%changelog %changelog

12
python313.patch Normal file
View File

@ -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]',