Hello community,
here is the log from the commit of package python-memory_profiler for
openSUSE:Factory checked in at 2019-04-24 13:57:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-memory_profiler (Old)
and /work/SRC/openSUSE:Factory/.python-memory_profiler.new.5536 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-memory_profiler"
Wed Apr 24 13:57:38 2019 rev:5 rq:697268 version:0.55.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-memory_profiler/python-memory_profiler.changes
2019-04-08 20:53:26.822564434 +0200
+++
/work/SRC/openSUSE:Factory/.python-memory_profiler.new.5536/python-memory_profiler.changes
2019-04-24 13:57:39.439978351 +0200
@@ -1,0 +2,7 @@
+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.
+
+-------------------------------------------------------------------
New:
----
revert-5fe38da92673.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-memory_profiler.spec ++++++
--- /var/tmp/diff_new_pack.nWn0P6/_old 2019-04-24 13:57:40.247977845 +0200
+++ /var/tmp/diff_new_pack.nWn0P6/_new 2019-04-24 13:57:40.247977845 +0200
@@ -25,6 +25,9 @@
Group: Development/Languages/Python
URL: https://github.com/pythonprofilers/memory_profiler
Source:
https://files.pythonhosted.org/packages/source/m/memory_profiler/memory_profiler-%{version}.tar.gz
+# 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
@@ -43,6 +46,7 @@
%prep
%setup -q -n memory_profiler-%{version}
+%autopatch -p1
%build
%python_build
++++++ 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)