From bbc7d7b8840a9f9da91cee634882de8a6ea9f6358d16bc96d0ccc1b7310e0837 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 1 Oct 2024 12:14:41 +0000 Subject: [PATCH 1/4] - Update to 1.1 * Python 3.11 and 3.12 support * Require pywin32 on Windows * Update bottle.py to 0.12.25 * Handle sizing of numpy.str and numpy.str_ * Fix sizing of multiple objects with references to each other OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Pympler?expand=0&rev=23 --- .gitattributes | 23 ++++++++ .gitignore | 1 + Pympler-1.0.1.tar.gz | 3 ++ _constraints | 10 ++++ pympler-1.1.tar.gz | 3 ++ pympler-flaky-tests.patch | 17 ++++++ python-Pympler.changes | 108 ++++++++++++++++++++++++++++++++++++++ python-Pympler.spec | 80 ++++++++++++++++++++++++++++ 8 files changed, 245 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 Pympler-1.0.1.tar.gz create mode 100644 _constraints create mode 100644 pympler-1.1.tar.gz create mode 100644 pympler-flaky-tests.patch create mode 100644 python-Pympler.changes create mode 100644 python-Pympler.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/Pympler-1.0.1.tar.gz b/Pympler-1.0.1.tar.gz new file mode 100644 index 0000000..4fcece4 --- /dev/null +++ b/Pympler-1.0.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:993f1a3599ca3f4fcd7160c7545ad06310c9e12f70174ae7ae8d4e25f6c5d3fa +size 676983 diff --git a/_constraints b/_constraints new file mode 100644 index 0000000..44a2e03 --- /dev/null +++ b/_constraints @@ -0,0 +1,10 @@ + + + + 6 + + + 12 + + + diff --git a/pympler-1.1.tar.gz b/pympler-1.1.tar.gz new file mode 100644 index 0000000..a4097ac --- /dev/null +++ b/pympler-1.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1eaa867cb8992c218430f1708fdaccda53df064144d1c5656b1e6f1ee6000424 +size 179954 diff --git a/pympler-flaky-tests.patch b/pympler-flaky-tests.patch new file mode 100644 index 0000000..68693b9 --- /dev/null +++ b/pympler-flaky-tests.patch @@ -0,0 +1,17 @@ +--- + test/asizeof/test_asizeof.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/test/asizeof/test_asizeof.py ++++ b/test/asizeof/test_asizeof.py +@@ -193,8 +193,8 @@ class TypesTest(unittest.TestCase): + s = asizeof.asizeof(all=True, code=True) + c = gc.collect() + # NumPy (and/or other, recent) modules causes some +- # objects to be uncollectable, typically 8 or less +- self.assertTrue(c < 9, '%s ref cycles' % (c,)) ++ # objects to be uncollectable, typically 30 or less ++ self.assertTrue(c < 30, '%s ref cycles' % (c,)) + gc.enable() + + def test_closure(self): diff --git a/python-Pympler.changes b/python-Pympler.changes new file mode 100644 index 0000000..b51287f --- /dev/null +++ b/python-Pympler.changes @@ -0,0 +1,108 @@ +------------------------------------------------------------------- +Tue Oct 1 08:36:51 UTC 2024 - John Paul Adrian Glaubitz + +- Update to 1.1 + * Python 3.11 and 3.12 support + * Require pywin32 on Windows + * Update bottle.py to 0.12.25 + * Handle sizing of numpy.str and numpy.str_ + * Fix sizing of multiple objects with references to each other + +------------------------------------------------------------------- +Fri Apr 21 12:21:15 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Thu Oct 27 23:11:41 UTC 2022 - Matej Cepl + +- Add _constraints + +------------------------------------------------------------------- +Thu Oct 27 22:51:11 UTC 2022 - Matej Cepl + +- Clean up SPEC file. + +------------------------------------------------------------------- +Thu Oct 27 12:15:13 UTC 2022 - Matej Cepl + +- Remove no-inspect-getargspec.patch, because we unbundle + bottle.py (gh#pympler/pympler#148). + +------------------------------------------------------------------- +Wed Oct 26 21:16:00 UTC 2022 - Matej Cepl + +- Reorganize skipping of failing tests. + +------------------------------------------------------------------- +Wed Oct 26 12:37:21 UTC 2022 - Matej Cepl + +- Add no-inspect-getargspec.patch porting out deprecated + (and in 3.11 removed) method inspect.getargspec + (gh#pympler/pympler#148). + +------------------------------------------------------------------- +Wed Jun 8 08:24:18 UTC 2022 - Matej Cepl + +- Add BR for python-dbm to make build working on 15.*. + +------------------------------------------------------------------- +Tue Jun 7 17:59:15 UTC 2022 - Marcus Rueckert + +- Update to 1.0.1: + - The resource module is only available on Unix, the mmap module + is also available on Windows. + +------------------------------------------------------------------- +Wed Dec 22 00:18:12 UTC 2021 - Steve Kowalik + +- Update to 1.0: + * Added + + Python 3.10 support + + Added type annotations to various Pympler modules which are checked via + Mypy + * Removed + + Python 2.7 and 3.5 support + * Fixed + + Fix summarizing objects at higher verbosity levels -- By Colin Watson + + Fix tree widget import for Python 3.5 and higher -- By Felix Jung (#77) + + Fix compatibility issues with numpy 1.19 and later -- By Jean + Brouwers (#121) + + Fix object filtering by size in muppy -- By Kris Jurka + + Fix documentation typos -- By Tim Gates +- Use pytest to run the test suite. + +------------------------------------------------------------------- +Sat Feb 27 06:35:24 UTC 2021 - John Vandenberg + +- Update to v0.9 + * Added Python 3.9 support + * Added compatibility with Django 3.x + * Removed Python 3.4 support + * Include size of data when sizing Numpy slices + * Fix KeyError when sizing dicts in certain scenarios + +------------------------------------------------------------------- +Mon Nov 25 00:39:27 UTC 2019 - Steve Kowalik + +- Update to 0.8: + Added + * Python 3.8 support + * Compatibility with Django Debug Toolbar 2.x + Removed + * Python 3.3 support + * Compatibility with Django Debug Toolbar 1.x + Fixed + * Include dicts which aren't tracked by garbage collector in summary diff + * Fix formatting of Python 3 class names in summary diff + +------------------------------------------------------------------- +Tue Aug 13 07:39:43 UTC 2019 - Tomáš Chvátal + +- Add patch to fix flaky tests: + * pympler-flaky-tests.patch + +------------------------------------------------------------------- +Mon Aug 12 11:41:52 UTC 2019 - Tomáš Chvátal + +- Initial commit, used by attrs diff --git a/python-Pympler.spec b/python-Pympler.spec new file mode 100644 index 0000000..f49ba9f --- /dev/null +++ b/python-Pympler.spec @@ -0,0 +1,80 @@ +# +# spec file for package python-Pympler +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define skip_python2 1 +%{?sle15_python_module_pythons} +Name: python-Pympler +Version: 1.1 +Release: 0 +Summary: A tool to analyze the memory behavior of Python objects +License: Apache-2.0 +URL: https://github.com/pympler/pympler +Source: https://files.pythonhosted.org/packages/source/p/pympler/pympler-%{version}.tar.gz +# PATCH-FIX-UPSTREAM pympler-flaky-tests.patch gh#pympler/pympler#90 mcepl@suse.com +# More cycles needed with more recent versions of Python +Patch0: pympler-flaky-tests.patch +BuildRequires: %{python_module bottle} +BuildRequires: %{python_module dbm} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildArch: noarch +Requires: python-tk +%python_subpackages + +%description +Pympler is a development tool to measure, monitor and analyze the +memory behavior of Python objects in a running Python application. + +By pympling a Python application, detailed insight in the size and +the lifetime of Python objects can be obtained. Undesirable or +unexpected runtime behavior like memory bloat and other "pymples" +can easily be identified. + +%prep +%autosetup -p1 -n pympler-%{version} + +# Remove bundled bottle (gh#pympler/pympler#148) +rm pympler/util/bottle.py + +# Remove unnecessary shebang +sed -i '1{\@^#!%{_bindir}/env python@d}' pympler/asizeof.py + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +# gh#pympler/pympler#134 +skiptests="test_repr_function" +# gh#pympler/pympler#148 +skiptests+=" or test_findgarbage or test_prune or test_get_tree" +%pytest -k "not ($skiptests)" + +%files %{python_files} +%license LICENSE +%doc README.md +%{python_sitelib}/pympler +%{python_sitelib}/Pympler-%{version}*-info + +%changelog From c48b7990753e8a17c37ef0ea9c718a1c764fecdee6e564de937aada5d53384eb Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 10 Oct 2024 15:36:02 +0000 Subject: [PATCH 2/4] - spec modernization - Use pytest to run the test suite. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Pympler?expand=0&rev=24 --- python-Pympler.changes | 7 ++++++- python-Pympler.spec | 14 +++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/python-Pympler.changes b/python-Pympler.changes index b51287f..dc2d461 100644 --- a/python-Pympler.changes +++ b/python-Pympler.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Oct 10 15:35:53 UTC 2024 - Dirk Müller + +- spec modernization + ------------------------------------------------------------------- Tue Oct 1 08:36:51 UTC 2024 - John Paul Adrian Glaubitz @@ -70,7 +75,7 @@ Wed Dec 22 00:18:12 UTC 2021 - Steve Kowalik Brouwers (#121) + Fix object filtering by size in muppy -- By Kris Jurka + Fix documentation typos -- By Tim Gates -- Use pytest to run the test suite. +- Use pytest to run the test suite. ------------------------------------------------------------------- Sat Feb 27 06:35:24 UTC 2021 - John Vandenberg diff --git a/python-Pympler.spec b/python-Pympler.spec index f49ba9f..7493e59 100644 --- a/python-Pympler.spec +++ b/python-Pympler.spec @@ -1,7 +1,7 @@ # # spec file for package python-Pympler # -# 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 @@ -16,8 +16,6 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} -%define skip_python2 1 %{?sle15_python_module_pythons} Name: python-Pympler Version: 1.1 @@ -31,12 +29,14 @@ Source: https://files.pythonhosted.org/packages/source/p/pympler/pympler Patch0: pympler-flaky-tests.patch BuildRequires: %{python_module bottle} BuildRequires: %{python_module dbm} +BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros -BuildArch: noarch Requires: python-tk +BuildArch: noarch %python_subpackages %description @@ -58,10 +58,10 @@ rm pympler/util/bottle.py sed -i '1{\@^#!%{_bindir}/env python@d}' pympler/asizeof.py %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check @@ -75,6 +75,6 @@ skiptests+=" or test_findgarbage or test_prune or test_get_tree" %license LICENSE %doc README.md %{python_sitelib}/pympler -%{python_sitelib}/Pympler-%{version}*-info +%{python_sitelib}/Pympler-%{version}.dist-info %changelog From eb4d794899a81dbd6a8cf1bcbc93d904afa2577af85570fb142beef50e747489 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 24 Oct 2024 10:17:34 +0000 Subject: [PATCH 3/4] - skip tests that are going to fail with python 3.13 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Pympler?expand=0&rev=25 --- python-Pympler.changes | 5 +++++ python-Pympler.spec | 3 +++ 2 files changed, 8 insertions(+) diff --git a/python-Pympler.changes b/python-Pympler.changes index dc2d461..3f8c9d6 100644 --- a/python-Pympler.changes +++ b/python-Pympler.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Oct 24 10:17:21 UTC 2024 - Dirk Müller + +- skip tests that are going to fail with python 3.13 + ------------------------------------------------------------------- Thu Oct 10 15:35:53 UTC 2024 - Dirk Müller diff --git a/python-Pympler.spec b/python-Pympler.spec index 7493e59..c656ee0 100644 --- a/python-Pympler.spec +++ b/python-Pympler.spec @@ -69,6 +69,9 @@ sed -i '1{\@^#!%{_bindir}/env python@d}' pympler/asizeof.py skiptests="test_repr_function" # gh#pympler/pympler#148 skiptests+=" or test_findgarbage or test_prune or test_get_tree" +skiptests+=" or test_findgarbage or test_prune or test_get_tree" +# gh#pympler/pympler#163 +skiptests+=" or test_edges_new or test_edges_old or test_split or test_traceback" %pytest -k "not ($skiptests)" %files %{python_files} From d9f3703c2cedf7b17de6045a8df09a6cf954579cd76841a80eed2dcb79516466 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 29 Oct 2024 22:09:04 +0000 Subject: [PATCH 4/4] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Pympler?expand=0&rev=26 --- python-Pympler.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-Pympler.spec b/python-Pympler.spec index c656ee0..f8e39fd 100644 --- a/python-Pympler.spec +++ b/python-Pympler.spec @@ -66,7 +66,7 @@ sed -i '1{\@^#!%{_bindir}/env python@d}' pympler/asizeof.py %check # gh#pympler/pympler#134 -skiptests="test_repr_function" +skiptests="test_repr_function or test_leng" # gh#pympler/pympler#148 skiptests+=" or test_findgarbage or test_prune or test_get_tree" skiptests+=" or test_findgarbage or test_prune or test_get_tree"