From 253fbada52000250b90d62ad8019fbe481310161 Mon Sep 17 00:00:00 2001 From: Dominik 'Rathann' Mierzejewski Date: May 02 2020 22:09:22 +0000 Subject: fix build with Python 3.9 (#1791963) --- diff --git a/bfc2f957831c96a39acedba25fb0da99c5a37805.diff b/bfc2f957831c96a39acedba25fb0da99c5a37805.diff new file mode 100644 index 0000000..1b250ac --- /dev/null +++ b/bfc2f957831c96a39acedba25fb0da99c5a37805.diff @@ -0,0 +1,13 @@ +diff --git a/pympler/classtracker.py b/pympler/classtracker.py +index f11a10a..2e3f19a 100644 +--- a/pympler/classtracker.py ++++ b/pympler/classtracker.py +@@ -511,7 +511,7 @@ def stop_periodic_snapshots(self): + function waits for the thread to terminate which can take some time + depending on the configured interval. + """ +- if self._periodic_thread and self._periodic_thread.isAlive(): ++ if self._periodic_thread and self._periodic_thread.is_alive(): + self._periodic_thread.stop = True + self._periodic_thread.join() + self._periodic_thread = None diff --git a/python-Pympler.spec b/python-Pympler.spec index 71ee1e4..6f60b32 100644 --- a/python-Pympler.spec +++ b/python-Pympler.spec @@ -16,7 +16,7 @@ the lifetime of selected Python objects. Name: python-%{pname} Version: 0.8 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Measure, monitor and analyze the memory behavior of Python objects License: ASL 2.0 and BSD and MIT # bundled stuff @@ -25,6 +25,8 @@ License: ASL 2.0 and BSD and MIT # pympler/templates/jquery.flot*.min.js: MIT URL: http://pythonhosted.org/Pympler/ Source0: https://pypi.python.org/packages/source/P/%{pname}/%{pname}-%{version}.tar.gz +# https://github.com/pympler/pympler/issues/104 +Patch0: https://github.com/pympler/pympler/commit/bfc2f957831c96a39acedba25fb0da99c5a37805.diff # drop python shebang from asizeof.py Patch2: %{name}-no-shebang.patch BuildArch: noarch @@ -59,6 +61,7 @@ Enhances: python3-django-debug-toolbar %setup -q -n %{pname}-%{version} rm pympler/util/bottle.py chmod -x pympler/asizeof.py +%patch0 -p1 %patch2 -p1 -b .no-shebang %build @@ -77,6 +80,9 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} setup.py test %{python3_sitelib}/pympler %changelog +* Sat May 02 2020 Dominik Mierzejewski 0.8-3 +- fix build with Python 3.9 (#1791963) + * Thu Jan 30 2020 Fedora Release Engineering - 0.8-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild