Hello community,

here is the log from the commit of package python-memory_profiler for 
openSUSE:Leap:15.2 checked in at 2020-03-09 18:08:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-memory_profiler (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.python-memory_profiler.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-memory_profiler"

Mon Mar  9 18:08:47 2020 rev:12 rq:776793 version:0.57.0

Changes:
--------
--- 
/work/SRC/openSUSE:Leap:15.2/python-memory_profiler/python-memory_profiler.changes
  2020-01-15 15:50:34.811499437 +0100
+++ 
/work/SRC/openSUSE:Leap:15.2/.python-memory_profiler.new.26092/python-memory_profiler.changes
       2020-03-09 18:08:47.828975694 +0100
@@ -1,0 +2,24 @@
+Wed Jan 22 15:34:33 UTC 2020 - Martin Sirringhaus <[email protected]>
+
+- Update to 0.57.0:
+  * no upstream changelog available
+
+-------------------------------------------------------------------
+Tue Apr 23 19:10:06 CEST 2019 - Matej Cepl <[email protected]>
+
+- Add revert-5fe38da92673.patch to avoid
+  gh#pythonprofilers/memory_profiler#226 and to make
+  python-spyder-memory-profiler testsuite to pass.
+
+-------------------------------------------------------------------
+Fri Apr  5 12:32:09 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 0.55.0:
+  * no upstream changelog available
+
+-------------------------------------------------------------------
+Tue Dec  4 12:50:21 UTC 2018 - Matej Cepl <[email protected]>
+
+- Remove superfluous devel dependency for noarch package
+
+-------------------------------------------------------------------

Old:
----
  memory_profiler-0.52.0.tar.gz

New:
----
  memory_profiler-0.57.0.tar.gz
  revert-5fe38da92673.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-memory_profiler.spec ++++++
--- /var/tmp/diff_new_pack.3dSJPu/_old  2020-03-09 18:08:48.100976084 +0100
+++ /var/tmp/diff_new_pack.3dSJPu/_new  2020-03-09 18:08:48.104976089 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-memory_profiler
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,28 +12,30 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-memory_profiler
-Version:        0.52.0
+Version:        0.57.0
 Release:        0
 Summary:        A module for monitoring memory usage of a python program
 License:        BSD-3-Clause
 Group:          Development/Languages/Python
-Url:            http://pypi.python.org/pypi/memory_profiler
+URL:            https://github.com/pythonprofilers/memory_profiler
 Source:         
https://files.pythonhosted.org/packages/source/m/memory_profiler/memory_profiler-%{version}.tar.gz
-BuildRequires:  %{python_module devel}
+# PATCH-FIX-UPSTREAM revert-5fe38da92673.patch 
gh#pythonprofilers/memory_profiler#226 [email protected]
+# Revert broken patch, leading to the failure of spyder-memory-profiler
+Patch0:         revert-5fe38da92673.patch
 BuildRequires:  %{python_module setuptools}
+BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
+Requires:       python-psutil
+BuildArch:      noarch
 # SECTION tests
 BuildRequires:  %{python_module psutil}
 # /SECTION
-Requires:       python-psutil
-BuildArch:      noarch
-
 %python_subpackages
 
 %description
@@ -44,24 +46,26 @@
 
 %prep
 %setup -q -n memory_profiler-%{version}
+%autopatch -p1
 
 %build
 %python_build
 
 %install
 %python_install
-%{python_expand chmod -x 
%{buildroot}%{$python_sitelib}/memory_profiler-%version-py%{$python_bin_suffix}.egg-info/*}
+%python_expand %fdupes %{buildroot}%{$python_sitelib}
+%python_expand chmod -x 
%{buildroot}%{$python_sitelib}/memory_profiler-%{version}-py%{$python_bin_suffix}.egg-info/*
 
 %check
-# adapted command from the Makefile which is not included in the tarball :(
+export LANG="en_US.UTF8"
 %python_exec -m memory_profiler test/test_func.py
 %python_exec -m memory_profiler test/test_loop.py
 %python_exec -m memory_profiler test/test_as.py
 %python_exec -m memory_profiler test/test_global.py
 %python_exec -m memory_profiler test/test_precision_command_line.py
 %python_exec -m memory_profiler test/test_gen.py
-# fails no matter what I set as LANG
-%{python_expand $python -m memory_profiler test/test_unicode.py || :}
+# unicode handling only proper in python3
+python3 -m memory_profiler test/test_unicode.py
 %python_exec -m memory_profiler test/test_tracemalloc.py
 %python_exec -m memory_profiler test/test_import.py
 %python_exec -m memory_profiler test/test_memory_usage.py

++++++ memory_profiler-0.52.0.tar.gz -> memory_profiler-0.57.0.tar.gz ++++++
++++ 2132 lines of diff (skipped)

++++++ revert-5fe38da92673.patch ++++++
--- a/memory_profiler.py
+++ b/memory_profiler.py
@@ -597,7 +597,9 @@ class CodeMap(dict):
 
         prev_line_value = self[code].get(prev_lineno, None) if prev_lineno 
else None
         prev_line_memory = prev_line_value[1] if prev_line_value else 0
-        self[code][lineno] = (max(previous_inc, memory-prev_line_memory), 
max(memory, previous_memory))
+        #inc = (memory-prev_line_memory)
+        #print('trace lineno=%(lineno)s prev_lineno=%(prev_lineno)s 
mem=%(memory)s prev_inc=%(previous_inc)s inc=%(inc)s' % locals())
+        self[code][lineno] = (previous_inc + (memory-prev_line_memory), 
max(memory, previous_memory))
 
     def items(self):
         """Iterate on the toplevel code blocks."""
--- a/test/test_tracemalloc.py
+++ b/test/test_tracemalloc.py
@@ -18,6 +18,8 @@ EPSILON = 0.0001
 def test_memory_profiler(test_input, expected):
     mem_prof(test_input)
     inc, dec = parse_mem_prof()
+    assert abs(inc - dec) <= EPSILON, \
+        'inc = {}, dec = {}, err = {}'.format(inc, dec, abs(inc - dec))
     assert abs(inc - expected) <= EPSILON, \
         'inc = {}, size = {}, err = {}'.format(
             inc, expected, abs(inc - expected)

Reply via email to