Re: Dask sourceless javascript passed by me.

2018-06-05 Thread Scott Kitterman



On June 6, 2018 4:42:44 AM UTC, Paul Wise  wrote:
>On Wed, Jun 6, 2018 at 12:30 PM, Diane Trout wrote:
>
>> I was planning on patching the references to the .html files out and
>> removing them in the debian/rules files.
>>
>> But is that enough?
>
>That doesn't fix the orig.tar.gz.
>
>I would suggest talking to upstream about fixing this properly (no
>prebuilt files or embedded code copies in the VCS and tarballs).

And in the meantime repacking the existing tarball to remove the sourceless 
files.

Scott K



Re: Dask sourceless javascript passed by me.

2018-06-05 Thread Paul Wise
On Wed, Jun 6, 2018 at 12:30 PM, Diane Trout wrote:

> I was planning on patching the references to the .html files out and
> removing them in the debian/rules files.
>
> But is that enough?

That doesn't fix the orig.tar.gz.

I would suggest talking to upstream about fixing this properly (no
prebuilt files or embedded code copies in the VCS and tarballs).

-- 
bye,
pabs

https://wiki.debian.org/PaulWise



Dask sourceless javascript passed by me.

2018-06-05 Thread Diane Trout
Hi,

I discovered a mistake I made with packaging dask.

There's two static html files which embed some bokeh generated
javascript plot code that's in dask 0.17.5 and I uploaded that to the
Debian.

There doesn't appear to be source to build the files.

Bokeh is free software (BSD-3-Clause), but depends on a bunch of
javascript libraries so isn't available in Debian.

I should have repacked the archive to remove them, but I'm working on a
-2 release, and there's no new upstream release yet for me to use as a
base for repack.

I was planning on patching the references to the .html files out and
removing them in the debian/rules files.

But is that enough?

Diane


signature.asc
Description: This is a digitally signed message part


Re: numpy boolean subtract, the `-` operator, is deprecated, use the bitwise_xor, the `^` operator, or the logical_xor function instead (Was: Bug#899205: python-cogent: Test suite fails with latest ma

2018-06-05 Thread Stuart Prescott
Hi Andreas,

> ==
> ERROR: test_consistent_gap_degen_handling
> (test_core.test_sequence.ModelSequenceTests) gap degen character should be
> treated consistently
> --
> Traceback (most recent call last):
>   File
>   "/tmp/autopkgtest-
lxc.5a99fnj6/downtmp/autopkgtest_tmp/tests/test_core/test_sequence.py",
>   line 660, in test_consistent_gap_degen_handling
> self.assertEqual(dna.stripBadAndGaps(), raw_ungapped)
>   File "/usr/lib/python2.7/dist-packages/cogent/core/sequence.py", line
>   1251, in stripBadAndGaps
> valid_indices -= self._data == i
> TypeError: numpy boolean subtract, the `-` operator, is deprecated, use
> the bitwise_xor, the `^` operator, or the logical_xor function instead.
> 
> ==

The error message basically describes the solution -- patch attached. Quite 
what the original meaning of "bool - bool" was supposed to be is hard to 
discern (and that is why numpy has deprecated it). You should get upstream 
to look at this carefully.

Note that there is more than one test that fails like this. There also may 
be other places depending on how good their test coverage is.

There are also failing doctests; a patch for them also attached, permitting 
the test to work with both old and new numpy.

These two patches only get the package to compile though. Lintian will then 
tell you about other RC bugs that you need to fix prior to upload.

regards
Stuart


-- 
Stuart Prescotthttp://www.nanonanonano.net/   stu...@nanonanonano.net
Debian Developer   http://www.debian.org/ stu...@debian.org
GPG fingerprint90E2 D2C1 AD14 6A1B 7EBB 891D BBC1 7EBB 1396 F2F7Description: Use xor rather than subtraction on booleans
 Numpy no longer accepts the ambiguous construction of a-b when a and b are bools.
 Normally, this can be replaced with XORs.
Author: Stuart Prescott 
--- a/cogent/core/sequence.py
+++ b/cogent/core/sequence.py
@@ -1248,7 +1248,7 @@
 gap_indices = map(self.Alphabet.index, self.MolType.Gaps)
 valid_indices = self._data < len(self.Alphabet)
 for i in gap_indices:
-valid_indices -= self._data == i
+valid_indices ^= self._data == i
 result = compress(valid_indices, self._data)
 return self.__class__(result, Info=self.Info)
 
--- a/cogent/maths/distance_transform.py
+++ b/cogent/maths/distance_transform.py
@@ -670,9 +670,9 @@
 return zeros((0,0),'d')
 dists = zeros((numrows,numrows),'d')
 for i in range(numrows):
-r1 = datamtx[i] # cache here
+r1 = datamtx[i].astype(dists.dtype) # cache here
 for j in range(i):
-dists[i,j] = dists[j,i] = sum(abs(r1 - datamtx[j]))
+dists[i,j] = dists[j,i] = sum(abs(r1 - datamtx[j].astype(dists.dtype)))
 
 return dists
 

Description: Ensure doctests pass with different numpy versions
 The numpy output format changed with numpy 1.14 and this causes doctests to
 fail if raw numerical output is compared. See
 https://wiki.debian.org/ContinuousIntegration/TriagingTips/numpy-1.14-doctests
Author: Stuart Prescott 
--- a/tests/alltests.py
+++ b/tests/alltests.py
@@ -6,6 +6,14 @@
 import doctest, cogent.util.unit_test as unittest, sys, os
 from cogent.util.misc import app_path
 
+# Whitespace changes between numpy 1.13 and 1.14 will cause the doctests
+# to fail; when doctests are updated to 1.14 format, this can be removed.
+try:# CRUFT
+import numpy as np
+np.set_printoptions(legacy='1.13')
+except TypeError:
+pass
+
 __author__ = "Peter Maxwell and Gavin Huttley"
 __copyright__ = "Copyright 2007-2016, The Cogent Project"
 __credits__ = ["Peter Maxwell", "Gavin Huttley", "Rob Knight",



Re: numpy boolean subtract, the `-` operator, is deprecated, use the bitwise_xor, the `^` operator, or the logical_xor function instead (Was: Bug#899205: python-cogent: Test suite fails with latest ma

2018-06-05 Thread Daniele Nicolodi
On 05/06/2018 01:00, Andreas Tille wrote:

> ==
> ERROR: test_consistent_gap_degen_handling 
> (test_core.test_sequence.ModelSequenceTests)
> gap degen character should be treated consistently
> --
> Traceback (most recent call last):
>   File 
> "/tmp/autopkgtest-lxc.5a99fnj6/downtmp/autopkgtest_tmp/tests/test_core/test_sequence.py",
>  line 660, in test_consistent_gap_degen_handling
> self.assertEqual(dna.stripBadAndGaps(), raw_ungapped)
>   File "/usr/lib/python2.7/dist-packages/cogent/core/sequence.py", line 1251, 
> in stripBadAndGaps
> valid_indices -= self._data == i
> TypeError: numpy boolean subtract, the `-` operator, is deprecated, use the 
> bitwise_xor, the `^` operator, or the logical_xor function instead.
> 
> ==
> 
> 
> I would be happy for some suggested patch how to solve this.  The line
> in question is
> 
>
> https://salsa.debian.org/med-team/python-cogent/blob/master/cogent/core/sequence.py
> 
>Line 1251
> 
> If my feeling is not totally wrong the correct patch would be 
> 
>valid_indices -= (self._data == i)
> 
> since the left value is rather an integer than boolean.
> 
> What do you think?

Without analyzing the code in the fine details, and assuming self._data
is a numpy array or a subclass, I think the name of the variable is
misleading.  Looking at the whole function it seems to be a bool array.
It should be easy to confirm this with pdb or simply inserting a print()
statement in the right place.

def stripBadAndGaps(self):
"""Returns copy of self with bad chars and gaps excised."""
gap_indices = map(self.Alphabet.index, self.MolType.Gaps)
valid_indices = self._data < len(self.Alphabet)
for i in gap_indices:
valid_indices -= self._data == i
result = compress(valid_indices, self._data)
return self.__class__(result, Info=self.Info)

The fix should be to replace the subtraction with:

valid_indices ^= self._data == i

Cheers,
Dan



Re: Broken dbgsym packages for Python 3

2018-06-05 Thread Scott Talbert

On Tue, 5 Jun 2018, Andrey Rahmatullin wrote:


Yes, I'm talking about the automatically generated -dbgsym packages that
contain the /usr/lib/debug/.build-id/... files.

Have you read Scott's email?


Yes, but wouldn't they still be useful for symbolicating core dumps?

Scott



RFS: pcapy/0.11.3-1 [ITA]

2018-06-05 Thread eamanu15
Package: sponsorship-requests
Severity: normal

Dear mentors,

I am looking for a sponsor for my package "pcapy"

* Package name: pcapy
Version : 0.11.3-1
Upstream Author : Core Security 
* URL : https://github.com/CoreSecurity/pcapy
* License : Apache Software License
Section : python

It builds those binary packages:

python-pcapy - Python interface to the libpcap packet capture library

To access further information about this package, please visit the
following URL:

https://mentors.debian.net/package/pcapy


Alternatively, one can download the package with dget using this command:

dget -x
https://mentors.debian.net/debian/pool/main/p/pcapy/pcapy_0.11.3-1.dsc

More information about hello can be obtained from https://www.example.com.

Changes since the last upload:

[ Jakub Wilk ]
* Use canonical URIs for Vcs-* fields.

[ Ondřej Nový ]
* Fixed VCS URL (https)
* d/control: Set Vcs-* to salsa.debian.org
* d/changelog: Remove trailing whitespaces
* Remove debian/pycompat, it's not used by any modern Python helper

[ Emmanuel Arias ]
* new upstream version
* update d/watch to download correctly the last upstream version
* update d/control to add Maintainer the DPMT
* update d/control to add me to Uploaders field (Closes: #895787)
* update debhelper on d/contorl from 5.0.37.2 to 11
* update Standards-Version from 3.9.2 to 4.1.4 on d/control
* add Testsuite: autopkgtest-pkg-python on d/control
* update d/compat from 5 to 11
* add to copyright file the debian files copyright

Regards,
Emmanuel
-- 
Arias Emmanuel
https://www.linkedin.com/in/emmanuel-arias-437a6a8a
http://eamanu.com


numpy boolean subtract, the `-` operator, is deprecated, use the bitwise_xor, the `^` operator, or the logical_xor function instead (Was: Bug#899205: python-cogent: Test suite fails with latest matplo

2018-06-05 Thread Andreas Tille
Control: tags -1 help

Hi,

I have reported the issue upstream but no response so far.  While the
error message contains some hint how to solve the issue I would like
to backup this by some competent advise.


==
ERROR: test_consistent_gap_degen_handling 
(test_core.test_sequence.ModelSequenceTests)
gap degen character should be treated consistently
--
Traceback (most recent call last):
  File 
"/tmp/autopkgtest-lxc.5a99fnj6/downtmp/autopkgtest_tmp/tests/test_core/test_sequence.py",
 line 660, in test_consistent_gap_degen_handling
self.assertEqual(dna.stripBadAndGaps(), raw_ungapped)
  File "/usr/lib/python2.7/dist-packages/cogent/core/sequence.py", line 1251, 
in stripBadAndGaps
valid_indices -= self._data == i
TypeError: numpy boolean subtract, the `-` operator, is deprecated, use the 
bitwise_xor, the `^` operator, or the logical_xor function instead.

==


I would be happy for some suggested patch how to solve this.  The line
in question is

   
https://salsa.debian.org/med-team/python-cogent/blob/master/cogent/core/sequence.py

   Line 1251

If my feeling is not totally wrong the correct patch would be 

   valid_indices -= (self._data == i)

since the left value is rather an integer than boolean.

What do you think?

Kind regards

Andreas.

-- 
http://fam-tille.de