Bug#850288: python-scipy: bug in scipy._lib._threadsafety.py, decorator function name wrong

2019-03-07 Thread Drew Parsons
Package: python-scipy
Followup-For: Bug #850288

As far as I can read the code, it is correct to use decorate on a
function rather than decorator. The source says it is obsolete
behaviour to use decorator() with a function.

Can you explain why you think it needs to be done?

Note you've given the arguments in the reverse order. The signature for
decorator is decorator(caller, _func=None), not decorator(func, caller).

Drew



Bug#850288: python-scipy: bug in scipy._lib._threadsafety.py, decorator function name wrong

2017-01-05 Thread lkcl
Package: python-scipy
Version: 0.18.1-2
Severity: important
Tags: upstream


ReentrancyLock class, decorate function has to be modified to:

def decorate(self, func):
def caller(func, *a, **kw):
with self:
return func(*a, **kw)
return scipy._lib.decorator.decorator(func, caller)



-- System Information:
Debian Release: 7.4
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.7.8lkcl (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python-scipy depends on:
ii  libblas3 [libblas.so.3]   1.2.20110419-7
ii  libc6 2.23-4
ii  libgcc1   1:6.2.1-5
ii  libgfortran3  6.2.1-5
ii  liblapack3 [liblapack.so.3]   3.5.0-2
ii  libquadmath0  6.2.1-5
ii  libstdc++66.2.1-5
ii  python2.7.13-1
ii  python-decorator  3.4.0-2
ii  python-numpy [python-numpy-abi9]  1:1.12.0~b1-1
pn  python:any

Versions of packages python-scipy recommends:
ii  g++ [c++-compiler]  4:5.3.1-3
ii  g++-4.8 [c++-compiler]  4.8.4-1
ii  g++-5 [c++-compiler]5.4.1-4
ii  g++-6 [c++-compiler]6.2.1-5
ii  python-dev  2.7.13-1
ii  python-imaging  2.3.0-2

Versions of packages python-scipy suggests:
pn  python-scipy-doc  

-- no debconf information