Bug#938501: Please port smalt to Python3 (Was: Bug#938501: smalt: Python2 removal in sid/bullseye) [EXT]
Dear all, I have finished the Python3 conversion based off of Andreas's work: https://salsa.debian.org/med-team/smalt/blob/master/debian/patches/2to3.patch Andreas: feel free to sponsor the upload, or to give me upload permissions: dcut dm --uid 724D609337113C710550D7473C26763F6C67E6E2 --allow smalt Cheers,
Bug#938501: Please port smalt to Python3 (Was: Bug#938501: smalt: Python2 removal in sid/bullseye) [EXT]
On Wed, Oct 09, 2019 at 08:47:14AM +, Hannes Ponstingl wrote: > Hi Zemin, James, Andreas, > > Python was used for the test code (and internally there was a python > interface to some of the C code). > I will update that to python 3 - not a problem, just bear with me. That's perfectly correct and it might be that just the test suite fails while smalt is perfectly fine since untouched. I tried to port these tests to Python3 with the following patch: https://salsa.debian.org/med-team/smalt/blob/master/debian/patches/2to3.patch This leads to: make check-TESTS make[4]: Entering directory '/build/smalt-0.7.6/test' PASS: splitReads_test.py PASS: results_split_test.py PASS: ouform_cigar_test.py mappings don't match for read 'SIM_0_MAL11_001337747_10_F_75m/1' FAIL: sample_test.py PASS: cigar_test.py Discrepancy: cigar:A:60 SIM_0_MAL11_001337747_10_F_75m/1 1 75 + MAL11 1337747 1337821 + 75 M 75 cigar:A:60 SIM_0_MAL11_001337747_10_F_75m/1 1 75 + MAL11 1337747 1337821 + 75 M 75 cigA1.mapq=60 > MAPQ_THRESH=6 and cigB1.mapq=60 > MAPQ_THRESH=6 FAIL: mthread_test.py PASS: ioform_test.py PASS: xali_test.py Traceback (most recent call last): File "./bam_cigar_test.py", line 254, in isOK = testSAMfilesAreIdentical(sambamnam, samoufilnam) File "./bam_cigar_test.py", line 149, in testSAMfilesAreIdentical linA = infilA.readline() File "/usr/lib/python3.7/codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 366: invalid start byte FAIL: bam_cigar_test.py = 3 of 9 tests failed Please report to h...@sanger.ac.uk = Since we would really like to use the complete test suite I'd love to get this fixed. Can you help out here? Kind regards Andreas. -- http://fam-tille.de
Bug#938501: Please port smalt to Python3 (Was: Bug#938501: smalt: Python2 removal in sid/bullseye) [EXT]
Thanks Andreas. Hannes has moved to other teams a few years ago. In my memory, Python was not used in the main SMALT code. However, it might be used in some testing cases. I don't know if Hannes has the time to fix it. Best regards, Zemin On Tue, 8 Oct 2019, Andreas Tille wrote: Hi James, thanks for forwarding. I agree that its probably a small issue in the Python3 code. Hope Zemin will be able to fix it soon. @Zemin: Please feel free to ask for help from our Python team in case you might run into any trouble. Kind regards Andreas. On Tue, Oct 08, 2019 at 05:24:47PM +0100, James Bonfield wrote: Hi all, Hannes is still around, but has moved jobs. I'm including Zemin Ning in this reply whose team Hannes was in when he wrote Smalt. I don't know the extent of the issue having not used Smalt myself, but the main tool itself is C so I doubt the python bit is a major component. Regardless, it's not something I'm involved with personally. James On Tue, Oct 08, 2019 at 05:33:42PM +0200, Andreas Tille wrote: Hi again, I just took James Bonfield in CC since I'm unsure whether my mail might have reached someone who is currently working at sanger.ac.uk. Just to stretch the importance of the issue have a look at the Python2 EOL clock: https://urldefense.proofpoint.com/v2/url?u=https-3A__pythonclock.org_=DwIBAg=D7ByGjS34AllFgecYw0iC6Zq7qlm8uclZFI0SqQnqBo=wodoR_G062E4YLZ-xu5t6g=XK--XBUkRyktzXOkgsZpq_yu16VL7H7Y75QlpOEnwGc=1ojoaFsu0HVyuhxGkiUBSnPjQJLSXJQyv1jrE-FfnMw= In short: Please be so kind and verify the patch linked below and fix the remaining issues with your deeper knowledge of the code. Thanks a lot Andreas. On Thu, Sep 05, 2019 at 03:39:35PM +0200, Andreas Tille wrote: Control: tags -1 upsteam Control: forwarded -1 Hannes Ponstingl Hi Hannes, as you can read below Debian will remove Python2 since it is EOL. I tried to port your test scripts using the 2to3 tool. The result of the automatic conversion can be found here: https://urldefense.proofpoint.com/v2/url?u=https-3A__salsa.debian.org_med-2Dteam_smalt_blob_master_debian_patches_2to3.patch=DwIBAg=D7ByGjS34AllFgecYw0iC6Zq7qlm8uclZFI0SqQnqBo=wodoR_G062E4YLZ-xu5t6g=XK--XBUkRyktzXOkgsZpq_yu16VL7H7Y75QlpOEnwGc=j7oR-RSaMB5DM2SvBCK63XeKcftyATF9QB_A56HxSCs= Unfortunately there are some remaining issues in the test suite which are probably not very hard to fix. I wonder whether you might want to have a look at these and could prepare an official Python3 release of your nice tool. Here is the output of the test suite: PASS: splitReads_test.py PASS: results_split_test.py PASS: ouform_cigar_test.py Traceback (most recent call last): File "./sample_test.py", line 154, in compare_mapping(oufilnam1, oufilnam3) File "./sample_test.py", line 108, in compare_mapping if cmp(cig1.qnam, cig2.qnam): NameError: name 'cmp' is not defined FAIL: sample_test.py PASS: cigar_test.py Discrepancy: cigar:A:60 SIM_0_MAL11_001337747_10_F_75m/1 1 75 + MAL11 1337747 1337821 + 75 M 75 cigar:A:60 SIM_0_MAL11_001337747_10_F_75m/1 1 75 + MAL11 1337747 1337821 + 75 M 75 FAIL: mthread_test.py Traceback (most recent call last): File "./ioform_test.py", line 45, in samnam = df.unpack(READ_PREFIX + ".sam") File "/build/smalt-0.7.6/test/testdata.py", line 71, in unpack oufil.write(lin) TypeError: write() argument must be str, not bytes FAIL: ioform_test.py PASS: xali_test.py Traceback (most recent call last): File "./bam_cigar_test.py", line 254, in isOK = testSAMfilesAreIdentical(sambamnam, samoufilnam) File "./bam_cigar_test.py", line 149, in testSAMfilesAreIdentical linA = infilA.readline() File "/usr/lib/python3.7/codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 260: invalid start byte FAIL: bam_cigar_test.py = 4 of 9 tests failed Please report to h...@sanger.ac.uk = Kind regards Andreas. On Fri, Aug 30, 2019 at 07:52:50AM +, Matthias Klose wrote: Package: src:smalt Version: 0.7.6-8 Severity: normal Tags: sid bullseye User: debian-pyt...@lists.debian.org Usertags: py2removal Python2 becomes end-of-live upstream, and Debian aims to remove Python2 from the distribution, as discussed in https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.debian.org_debian-2Dpython_2019_07_msg00080.html=DwIBAg=D7ByGjS34AllFgecYw0iC6Zq7qlm8uclZFI0SqQnqBo=wodoR_G062E4YLZ-xu5t6g=XK--XBUkRyktzXOkgsZpq_yu16VL7H7Y75QlpOEnwGc=Xgujf6sRlZuNDRpgPdw-HM2EVf1K2YRkzazDPAt9sK4= Your package either build-depends, depends on Python2, or uses Python2 in the autopkg tests. Please stop using Python2, and fix this issue by one of the following actions. - Convert your Package to Python3. This is the preferred option. In case you are providing a Python module foo, please consider dropping the python-foo
Bug#938501: Please port smalt to Python3 (Was: Bug#938501: smalt: Python2 removal in sid/bullseye) [EXT]
Hi Zemin, James, Andreas, Python was used for the test code (and internally there was a python interface to some of the C code). I will update that to python 3 - not a problem, just bear with me. Best, Hannes On 09/10/2019, 09:38, "Zemin Ning" wrote: Thanks Andreas. Hannes has moved to other teams a few years ago. In my memory, Python was not used in the main SMALT code. However, it might be used in some testing cases. I don't know if Hannes has the time to fix it. Best regards, Zemin On Tue, 8 Oct 2019, Andreas Tille wrote: > Hi James, > > thanks for forwarding. I agree that its probably a small issue > in the Python3 code. Hope Zemin will be able to fix it soon. > @Zemin: Please feel free to ask for help from our Python team > in case you might run into any trouble. > > Kind regards >Andreas. > > > On Tue, Oct 08, 2019 at 05:24:47PM +0100, James Bonfield wrote: >> Hi all, >> >> Hannes is still around, but has moved jobs. I'm including Zemin Ning >> in this reply whose team Hannes was in when he wrote Smalt. >> >> I don't know the extent of the issue having not used Smalt myself, but >> the main tool itself is C so I doubt the python bit is a major >> component. >> >> Regardless, it's not something I'm involved with personally. >> >> James >> >> >> On Tue, Oct 08, 2019 at 05:33:42PM +0200, Andreas Tille wrote: >>> Hi again, >>> >>> I just took James Bonfield in CC since I'm unsure whether my mail might >>> have reached someone who is currently working at sanger.ac.uk. Just to >>> stretch the importance of the issue have a look at the Python2 EOL clock: >>> >>> https://urldefense.proofpoint.com/v2/url?u=https-3A__pythonclock.org_=DwIBAg=D7ByGjS34AllFgecYw0iC6Zq7qlm8uclZFI0SqQnqBo=wodoR_G062E4YLZ-xu5t6g=XK--XBUkRyktzXOkgsZpq_yu16VL7H7Y75QlpOEnwGc=1ojoaFsu0HVyuhxGkiUBSnPjQJLSXJQyv1jrE-FfnMw= >>> >>> In short: Please be so kind and verify the patch linked below and fix >>> the remaining issues with your deeper knowledge of the code. >>> >>> Thanks a lot >>> >>> Andreas. >>> >>> >>> On Thu, Sep 05, 2019 at 03:39:35PM +0200, Andreas Tille wrote: Control: tags -1 upsteam Control: forwarded -1 Hannes Ponstingl Hi Hannes, as you can read below Debian will remove Python2 since it is EOL. I tried to port your test scripts using the 2to3 tool. The result of the automatic conversion can be found here: https://urldefense.proofpoint.com/v2/url?u=https-3A__salsa.debian.org_med-2Dteam_smalt_blob_master_debian_patches_2to3.patch=DwIBAg=D7ByGjS34AllFgecYw0iC6Zq7qlm8uclZFI0SqQnqBo=wodoR_G062E4YLZ-xu5t6g=XK--XBUkRyktzXOkgsZpq_yu16VL7H7Y75QlpOEnwGc=j7oR-RSaMB5DM2SvBCK63XeKcftyATF9QB_A56HxSCs= Unfortunately there are some remaining issues in the test suite which are probably not very hard to fix. I wonder whether you might want to have a look at these and could prepare an official Python3 release of your nice tool. Here is the output of the test suite: PASS: splitReads_test.py PASS: results_split_test.py PASS: ouform_cigar_test.py Traceback (most recent call last): File "./sample_test.py", line 154, in compare_mapping(oufilnam1, oufilnam3) File "./sample_test.py", line 108, in compare_mapping if cmp(cig1.qnam, cig2.qnam): NameError: name 'cmp' is not defined FAIL: sample_test.py PASS: cigar_test.py Discrepancy: cigar:A:60 SIM_0_MAL11_001337747_10_F_75m/1 1 75 + MAL11 1337747 1337821 + 75 M 75 cigar:A:60 SIM_0_MAL11_001337747_10_F_75m/1 1 75 + MAL11 1337747 1337821 + 75 M 75 FAIL: mthread_test.py Traceback (most recent call last): File "./ioform_test.py", line 45, in samnam = df.unpack(READ_PREFIX + ".sam") File "/build/smalt-0.7.6/test/testdata.py", line 71, in unpack oufil.write(lin) TypeError: write() argument must be str, not bytes FAIL: ioform_test.py PASS: xali_test.py Traceback (most recent call last): File "./bam_cigar_test.py", line 254, in isOK = testSAMfilesAreIdentical(sambamnam, samoufilnam) File "./bam_cigar_test.py", line 149, in testSAMfilesAreIdentical linA = infilA.readline() File "/usr/lib/python3.7/codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 260: invalid start byte FAIL: bam_cigar_test.py
Bug#938501: Please port smalt to Python3 (Was: Bug#938501: smalt: Python2 removal in sid/bullseye) [EXT]
Hi Andreas, Thank you for pointing me to this issue once more. Please bear with me until I get a moment to check the patch/update the SMALT test suite to python 3. It is not a problem, but I have to slot this in with the main obligations of my current role. Kind regards, Hannes On 08/10/2019, 16:33, "Andreas Tille" wrote: Hi again, I just took James Bonfield in CC since I'm unsure whether my mail might have reached someone who is currently working at sanger.ac.uk. Just to stretch the importance of the issue have a look at the Python2 EOL clock: https://urldefense.proofpoint.com/v2/url?u=https-3A__pythonclock.org_=DwIBAg=D7ByGjS34AllFgecYw0iC6Zq7qlm8uclZFI0SqQnqBo=XTh5PlieT8KhSRAcJV6w_A=KXRG53toHduo0G9U-G8lXQ7R1ZFLgHXlL6pjvR12rzI=g-PIxNtQvdPqurLJIeCBAx6cbYUpsQj2kEZ57K5Dhks= In short: Please be so kind and verify the patch linked below and fix the remaining issues with your deeper knowledge of the code. Thanks a lot Andreas. On Thu, Sep 05, 2019 at 03:39:35PM +0200, Andreas Tille wrote: > Control: tags -1 upsteam > Control: forwarded -1 Hannes Ponstingl > > Hi Hannes, > > as you can read below Debian will remove Python2 since it is EOL. > I tried to port your test scripts using the 2to3 tool. The result > of the automatic conversion can be found here: > > https://urldefense.proofpoint.com/v2/url?u=https-3A__salsa.debian.org_med-2Dteam_smalt_blob_master_debian_patches_2to3.patch=DwIBAg=D7ByGjS34AllFgecYw0iC6Zq7qlm8uclZFI0SqQnqBo=XTh5PlieT8KhSRAcJV6w_A=KXRG53toHduo0G9U-G8lXQ7R1ZFLgHXlL6pjvR12rzI=HE73hWE00-z91NAO-Of277mmEjoxLCnPh7ns2AfJt88= > > Unfortunately there are some remaining issues in the test suite which > are probably not very hard to fix. I wonder whether you might want > to have a look at these and could prepare an official Python3 release > of your nice tool. > > Here is the output of the test suite: > > > PASS: splitReads_test.py > PASS: results_split_test.py > PASS: ouform_cigar_test.py > Traceback (most recent call last): > File "./sample_test.py", line 154, in > compare_mapping(oufilnam1, oufilnam3) > File "./sample_test.py", line 108, in compare_mapping > if cmp(cig1.qnam, cig2.qnam): > NameError: name 'cmp' is not defined > FAIL: sample_test.py > PASS: cigar_test.py > Discrepancy: > cigar:A:60 SIM_0_MAL11_001337747_10_F_75m/1 1 75 + MAL11 1337747 1337821 + 75 M 75 > cigar:A:60 SIM_0_MAL11_001337747_10_F_75m/1 1 75 + MAL11 1337747 1337821 + 75 M 75 > FAIL: mthread_test.py > Traceback (most recent call last): > File "./ioform_test.py", line 45, in > samnam = df.unpack(READ_PREFIX + ".sam") > File "/build/smalt-0.7.6/test/testdata.py", line 71, in unpack > oufil.write(lin) > TypeError: write() argument must be str, not bytes > FAIL: ioform_test.py > PASS: xali_test.py > Traceback (most recent call last): > File "./bam_cigar_test.py", line 254, in > isOK = testSAMfilesAreIdentical(sambamnam, samoufilnam) > File "./bam_cigar_test.py", line 149, in testSAMfilesAreIdentical > linA = infilA.readline() > File "/usr/lib/python3.7/codecs.py", line 322, in decode > (result, consumed) = self._buffer_decode(data, self.errors, final) > UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 260: invalid start byte > FAIL: bam_cigar_test.py > = > 4 of 9 tests failed > Please report to h...@sanger.ac.uk > = > > > Kind regards > > Andreas. > > > On Fri, Aug 30, 2019 at 07:52:50AM +, Matthias Klose wrote: > > Package: src:smalt > > Version: 0.7.6-8 > > Severity: normal > > Tags: sid bullseye > > User: debian-pyt...@lists.debian.org > > Usertags: py2removal > > > > Python2 becomes end-of-live upstream, and Debian aims to remove > > Python2 from the distribution, as discussed in > > https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.debian.org_debian-2Dpython_2019_07_msg00080.html=DwIBAg=D7ByGjS34AllFgecYw0iC6Zq7qlm8uclZFI0SqQnqBo=XTh5PlieT8KhSRAcJV6w_A=KXRG53toHduo0G9U-G8lXQ7R1ZFLgHXlL6pjvR12rzI=HjxauC5_s56WX-Za34l9eg_sw_Guf5QO1udZvd6fZys= > > > > Your package either build-depends, depends on Python2, or uses Python2 > > in the autopkg tests. Please stop using Python2, and fix this issue > > by one of the following actions. > > > > - Convert your Package to Python3. This is the preferred option. In > > case you are providing a Python module foo, please consider dropping > > the python-foo package, and only build a python3-foo package. Please > > don't drop Python2 modules, which still have reverse
Bug#938501: Please port smalt to Python3 (Was: Bug#938501: smalt: Python2 removal in sid/bullseye) [EXT]
Hi James, thanks for forwarding. I agree that its probably a small issue in the Python3 code. Hope Zemin will be able to fix it soon. @Zemin: Please feel free to ask for help from our Python team in case you might run into any trouble. Kind regards Andreas. On Tue, Oct 08, 2019 at 05:24:47PM +0100, James Bonfield wrote: > Hi all, > > Hannes is still around, but has moved jobs. I'm including Zemin Ning > in this reply whose team Hannes was in when he wrote Smalt. > > I don't know the extent of the issue having not used Smalt myself, but > the main tool itself is C so I doubt the python bit is a major > component. > > Regardless, it's not something I'm involved with personally. > > James > > > On Tue, Oct 08, 2019 at 05:33:42PM +0200, Andreas Tille wrote: > > Hi again, > > > > I just took James Bonfield in CC since I'm unsure whether my mail might > > have reached someone who is currently working at sanger.ac.uk. Just to > > stretch the importance of the issue have a look at the Python2 EOL clock: > > > > > > https://urldefense.proofpoint.com/v2/url?u=https-3A__pythonclock.org_=DwIBAg=D7ByGjS34AllFgecYw0iC6Zq7qlm8uclZFI0SqQnqBo=wodoR_G062E4YLZ-xu5t6g=XK--XBUkRyktzXOkgsZpq_yu16VL7H7Y75QlpOEnwGc=1ojoaFsu0HVyuhxGkiUBSnPjQJLSXJQyv1jrE-FfnMw= > > > > > > In short: Please be so kind and verify the patch linked below and fix > > the remaining issues with your deeper knowledge of the code. > > > > Thanks a lot > > > > Andreas. > > > > > > On Thu, Sep 05, 2019 at 03:39:35PM +0200, Andreas Tille wrote: > > > Control: tags -1 upsteam > > > Control: forwarded -1 Hannes Ponstingl > > > > > > Hi Hannes, > > > > > > as you can read below Debian will remove Python2 since it is EOL. > > > I tried to port your test scripts using the 2to3 tool. The result > > > of the automatic conversion can be found here: > > > > > > > > > https://urldefense.proofpoint.com/v2/url?u=https-3A__salsa.debian.org_med-2Dteam_smalt_blob_master_debian_patches_2to3.patch=DwIBAg=D7ByGjS34AllFgecYw0iC6Zq7qlm8uclZFI0SqQnqBo=wodoR_G062E4YLZ-xu5t6g=XK--XBUkRyktzXOkgsZpq_yu16VL7H7Y75QlpOEnwGc=j7oR-RSaMB5DM2SvBCK63XeKcftyATF9QB_A56HxSCs= > > > > > > > > > Unfortunately there are some remaining issues in the test suite which > > > are probably not very hard to fix. I wonder whether you might want > > > to have a look at these and could prepare an official Python3 release > > > of your nice tool. > > > > > > Here is the output of the test suite: > > > > > > > > > PASS: splitReads_test.py > > > PASS: results_split_test.py > > > PASS: ouform_cigar_test.py > > > Traceback (most recent call last): > > > File "./sample_test.py", line 154, in > > > compare_mapping(oufilnam1, oufilnam3) > > > File "./sample_test.py", line 108, in compare_mapping > > > if cmp(cig1.qnam, cig2.qnam): > > > NameError: name 'cmp' is not defined > > > FAIL: sample_test.py > > > PASS: cigar_test.py > > > Discrepancy: > > > cigar:A:60 SIM_0_MAL11_001337747_10_F_75m/1 1 75 + MAL11 1337747 > > > 1337821 + 75 M 75 > > > cigar:A:60 SIM_0_MAL11_001337747_10_F_75m/1 1 75 + MAL11 1337747 > > > 1337821 + 75 M 75 > > > FAIL: mthread_test.py > > > Traceback (most recent call last): > > > File "./ioform_test.py", line 45, in > > > samnam = df.unpack(READ_PREFIX + ".sam") > > > File "/build/smalt-0.7.6/test/testdata.py", line 71, in unpack > > > oufil.write(lin) > > > TypeError: write() argument must be str, not bytes > > > FAIL: ioform_test.py > > > PASS: xali_test.py > > > Traceback (most recent call last): > > > File "./bam_cigar_test.py", line 254, in > > > isOK = testSAMfilesAreIdentical(sambamnam, samoufilnam) > > > File "./bam_cigar_test.py", line 149, in testSAMfilesAreIdentical > > > linA = infilA.readline() > > > File "/usr/lib/python3.7/codecs.py", line 322, in decode > > > (result, consumed) = self._buffer_decode(data, self.errors, final) > > > UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 260: > > > invalid start byte > > > FAIL: bam_cigar_test.py > > > = > > > 4 of 9 tests failed > > > Please report to h...@sanger.ac.uk > > > = > > > > > > > > > Kind regards > > > > > > Andreas. > > > > > > > > > On Fri, Aug 30, 2019 at 07:52:50AM +, Matthias Klose wrote: > > > > Package: src:smalt > > > > Version: 0.7.6-8 > > > > Severity: normal > > > > Tags: sid bullseye > > > > User: debian-pyt...@lists.debian.org > > > > Usertags: py2removal > > > > > > > > Python2 becomes end-of-live upstream, and Debian aims to remove > > > > Python2 from the distribution, as discussed in > > > > https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.debian.org_debian-2Dpython_2019_07_msg00080.html=DwIBAg=D7ByGjS34AllFgecYw0iC6Zq7qlm8uclZFI0SqQnqBo=wodoR_G062E4YLZ-xu5t6g=XK--XBUkRyktzXOkgsZpq_yu16VL7H7Y75QlpOEnwGc=Xgujf6sRlZuNDRpgPdw-HM2EVf1K2YRkzazDPAt9sK4= > > > > > > > > > > > > Your
Bug#938501: Please port smalt to Python3 (Was: Bug#938501: smalt: Python2 removal in sid/bullseye) [EXT]
Hi all, Hannes is still around, but has moved jobs. I'm including Zemin Ning in this reply whose team Hannes was in when he wrote Smalt. I don't know the extent of the issue having not used Smalt myself, but the main tool itself is C so I doubt the python bit is a major component. Regardless, it's not something I'm involved with personally. James On Tue, Oct 08, 2019 at 05:33:42PM +0200, Andreas Tille wrote: > Hi again, > > I just took James Bonfield in CC since I'm unsure whether my mail might > have reached someone who is currently working at sanger.ac.uk. Just to > stretch the importance of the issue have a look at the Python2 EOL clock: > > > https://urldefense.proofpoint.com/v2/url?u=https-3A__pythonclock.org_=DwIBAg=D7ByGjS34AllFgecYw0iC6Zq7qlm8uclZFI0SqQnqBo=wodoR_G062E4YLZ-xu5t6g=XK--XBUkRyktzXOkgsZpq_yu16VL7H7Y75QlpOEnwGc=1ojoaFsu0HVyuhxGkiUBSnPjQJLSXJQyv1jrE-FfnMw= > > > In short: Please be so kind and verify the patch linked below and fix > the remaining issues with your deeper knowledge of the code. > > Thanks a lot > > Andreas. > > > On Thu, Sep 05, 2019 at 03:39:35PM +0200, Andreas Tille wrote: > > Control: tags -1 upsteam > > Control: forwarded -1 Hannes Ponstingl > > > > Hi Hannes, > > > > as you can read below Debian will remove Python2 since it is EOL. > > I tried to port your test scripts using the 2to3 tool. The result > > of the automatic conversion can be found here: > > > > > > https://urldefense.proofpoint.com/v2/url?u=https-3A__salsa.debian.org_med-2Dteam_smalt_blob_master_debian_patches_2to3.patch=DwIBAg=D7ByGjS34AllFgecYw0iC6Zq7qlm8uclZFI0SqQnqBo=wodoR_G062E4YLZ-xu5t6g=XK--XBUkRyktzXOkgsZpq_yu16VL7H7Y75QlpOEnwGc=j7oR-RSaMB5DM2SvBCK63XeKcftyATF9QB_A56HxSCs= > > > > > > Unfortunately there are some remaining issues in the test suite which > > are probably not very hard to fix. I wonder whether you might want > > to have a look at these and could prepare an official Python3 release > > of your nice tool. > > > > Here is the output of the test suite: > > > > > > PASS: splitReads_test.py > > PASS: results_split_test.py > > PASS: ouform_cigar_test.py > > Traceback (most recent call last): > > File "./sample_test.py", line 154, in > > compare_mapping(oufilnam1, oufilnam3) > > File "./sample_test.py", line 108, in compare_mapping > > if cmp(cig1.qnam, cig2.qnam): > > NameError: name 'cmp' is not defined > > FAIL: sample_test.py > > PASS: cigar_test.py > > Discrepancy: > > cigar:A:60 SIM_0_MAL11_001337747_10_F_75m/1 1 75 + MAL11 1337747 > > 1337821 + 75 M 75 > > cigar:A:60 SIM_0_MAL11_001337747_10_F_75m/1 1 75 + MAL11 1337747 > > 1337821 + 75 M 75 > > FAIL: mthread_test.py > > Traceback (most recent call last): > > File "./ioform_test.py", line 45, in > > samnam = df.unpack(READ_PREFIX + ".sam") > > File "/build/smalt-0.7.6/test/testdata.py", line 71, in unpack > > oufil.write(lin) > > TypeError: write() argument must be str, not bytes > > FAIL: ioform_test.py > > PASS: xali_test.py > > Traceback (most recent call last): > > File "./bam_cigar_test.py", line 254, in > > isOK = testSAMfilesAreIdentical(sambamnam, samoufilnam) > > File "./bam_cigar_test.py", line 149, in testSAMfilesAreIdentical > > linA = infilA.readline() > > File "/usr/lib/python3.7/codecs.py", line 322, in decode > > (result, consumed) = self._buffer_decode(data, self.errors, final) > > UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 260: > > invalid start byte > > FAIL: bam_cigar_test.py > > = > > 4 of 9 tests failed > > Please report to h...@sanger.ac.uk > > = > > > > > > Kind regards > > > > Andreas. > > > > > > On Fri, Aug 30, 2019 at 07:52:50AM +, Matthias Klose wrote: > > > Package: src:smalt > > > Version: 0.7.6-8 > > > Severity: normal > > > Tags: sid bullseye > > > User: debian-pyt...@lists.debian.org > > > Usertags: py2removal > > > > > > Python2 becomes end-of-live upstream, and Debian aims to remove > > > Python2 from the distribution, as discussed in > > > https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.debian.org_debian-2Dpython_2019_07_msg00080.html=DwIBAg=D7ByGjS34AllFgecYw0iC6Zq7qlm8uclZFI0SqQnqBo=wodoR_G062E4YLZ-xu5t6g=XK--XBUkRyktzXOkgsZpq_yu16VL7H7Y75QlpOEnwGc=Xgujf6sRlZuNDRpgPdw-HM2EVf1K2YRkzazDPAt9sK4= > > > > > > > > > Your package either build-depends, depends on Python2, or uses Python2 > > > in the autopkg tests. Please stop using Python2, and fix this issue > > > by one of the following actions. > > > > > > - Convert your Package to Python3. This is the preferred option. In > > > case you are providing a Python module foo, please consider dropping > > > the python-foo package, and only build a python3-foo package. Please > > > don't drop Python2 modules, which still have reverse dependencies, > > > just document them. > > > > > > This is the preferred