Sync from SUSE:SLFO:Main python-Pympler revision 26bd98a85b3274030ef91c46f1303572

This commit is contained in:
Adrian Schröter 2024-05-03 19:56:25 +02:00
commit 29bc5b8746
6 changed files with 231 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -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

BIN
Pympler-1.0.1.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

10
_constraints Normal file
View File

@ -0,0 +1,10 @@
<constraints>
<hardware>
<physicalmemory>
<size unit="G">6</size>
</physicalmemory>
<disk>
<size unit="G">12</size>
</disk>
</hardware>
</constraints>

17
pympler-flaky-tests.patch Normal file
View File

@ -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):

98
python-Pympler.changes Normal file
View File

@ -0,0 +1,98 @@
-------------------------------------------------------------------
Fri Apr 21 12:21:15 UTC 2023 - Dirk Müller <dmueller@suse.com>
- add sle15_python_module_pythons (jsc#PED-68)
-------------------------------------------------------------------
Thu Oct 27 23:11:41 UTC 2022 - Matej Cepl <mcepl@suse.com>
- Add _constraints
-------------------------------------------------------------------
Thu Oct 27 22:51:11 UTC 2022 - Matej Cepl <mcepl@suse.com>
- Clean up SPEC file.
-------------------------------------------------------------------
Thu Oct 27 12:15:13 UTC 2022 - Matej Cepl <mcepl@suse.com>
- Remove no-inspect-getargspec.patch, because we unbundle
bottle.py (gh#pympler/pympler#148).
-------------------------------------------------------------------
Wed Oct 26 21:16:00 UTC 2022 - Matej Cepl <mcepl@suse.com>
- Reorganize skipping of failing tests.
-------------------------------------------------------------------
Wed Oct 26 12:37:21 UTC 2022 - Matej Cepl <mcepl@suse.com>
- 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 <mcepl@suse.com>
- Add BR for python-dbm to make build working on 15.*.
-------------------------------------------------------------------
Tue Jun 7 17:59:15 UTC 2022 - Marcus Rueckert <mrueckert@suse.de>
- 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 <steven.kowalik@suse.com>
- 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 <jayvdb@gmail.com>
- 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 <steven.kowalik@suse.com>
- 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 <tchvatal@suse.com>
- Add patch to fix flaky tests:
* pympler-flaky-tests.patch
-------------------------------------------------------------------
Mon Aug 12 11:41:52 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Initial commit, used by attrs

80
python-Pympler.spec Normal file
View File

@ -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.0.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