[med-svn] [Git][med-team/python-pbcore][master] 6 commits: Drop Debian patches applied in upstream 2.6.0
Andreas Tille (@tille)
gitlab at salsa.debian.org
Tue Oct 20 16:01:28 BST 2026
Andreas Tille pushed to branch master at Debian Med / python-pbcore
Commits:
20c3eb77 by Andreas Tille at 2026-10-20T16:18:23+02:00
Drop Debian patches applied in upstream 2.6.0
The pyxb to xmlschema conversion and the numpy fixes are part of the
new upstream release, so their patches are no longer needed.
- - - - -
2a6b4409 by Andreas Tille at 2026-10-20T16:19:54+02:00
Skip tests requiring pbtestdata
New upstream test modules import pbtestdata at module level, which makes
pytest fail during collection since that package is not available in
Debian. Use importorskip for all pbtestdata users.
- - - - -
30409508 by Andreas Tille at 2026-10-20T16:20:30+02:00
Add numpy 2.4 compatibility patch
numpy 2.4 no longer converts non-zero-dimensional arrays with int() and
removed the deprecated np.in1d alias. Extract the element explicitly
and use np.isin instead.
- - - - -
75fff427 by Andreas Tille at 2026-10-20T16:30:52+02:00
Upload to unstable
- - - - -
1a9f74b4 by Andreas Tille at 2026-10-20T16:40:44+02:00
Close bug
- - - - -
d9c0214e by Andreas Tille at 2026-10-20T16:47:25+02:00
Upload to unstable
- - - - -
7 changed files:
- debian/changelog
- − debian/patches/b24746790c7105212e45dc2f40115d231bd8baae.patch
- debian/patches/exclude_test_missing_data.patch
- + debian/patches/numpy-2.4.patch
- − debian/patches/numpy2.patch
- − debian/patches/numpy_1.24.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,10 +1,17 @@
-python-pbcore (2.6.0+dfsg-1) UNRELEASED; urgency=medium
+python-pbcore (2.6.0+dfsg-1) unstable; urgency=medium
- * d/watch: Use Github template
* New upstream version
+ * d/watch: Use Github template
* Reflow Uploaders field (cme)
-
- -- Andreas Tille <tille at debian.org> Tue, 20 Oct 2026 14:49:48 +0200
+ * Drop patches applied upstream:
+ - b24746790c7105212e45dc2f40115d231bd8baae.patch
+ - numpy_1.24.patch (Closes: #1114717)
+ - numpy2.patch
+ * Update exclude_test_missing_data.patch to skip tests that need the
+ unpackaged PacBioTestData module.
+ * Add numpy-2.4.patch to fix compatibility with numpy 2.4.
+
+ -- Andreas Tille <tille at debian.org> Tue, 20 Oct 2026 16:41:12 +0200
python-pbcore (2.1.2+dfsg-14) unstable; urgency=medium
=====================================
debian/patches/b24746790c7105212e45dc2f40115d231bd8baae.patch deleted
=====================================
The diff for this file was not included because it is too large.
=====================================
debian/patches/exclude_test_missing_data.patch
=====================================
@@ -1,17 +1,11 @@
Author: Andreas Tille <tille at debian.org>
-Last-Update: 2018-10-31
-Description: Missing data for this test
+Last-Update: 2026-10-20
+Description: Skip tests needing pbtestdata
+ The PacBioTestData package is not available in Debian. Skip the tests
+ that require it instead of letting test collection fail.
---- a/tests/test_pbdataset_metadata.py
-+++ b/tests/test_pbdataset_metadata.py
-@@ -134,6 +134,7 @@ class TestDataSet:
- aln = AlignmentSet(outXml)
- assert aln.uuid == oldUuid
-
-+ @pytest.mark.skip(reason="pbtestdata is not packaged yet")
- @pytest.mark.internal_data
- def test_merge(self):
- sset_fn = ('/pbi/dept/secondary/siv/testdata/'
+diff --git a/pytest.ini b/pytest.ini
+index 9d827fc..dbd44fa 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -1,6 +1,5 @@
@@ -21,9 +15,11 @@ Description: Missing data for this test
internal_data: requires access to internal data on '/pbi/dept/secondary/siv/testdata'
constools: requires 'pbindex', 'samtools' and 'pbmerge' in PATH
+diff --git a/setup.py b/setup.py
+index 40a08ef..5084693 100755
--- a/setup.py
+++ b/setup.py
-@@ -5,7 +5,6 @@ from setuptools import setup, find_packa
+@@ -5,7 +5,6 @@ from setuptools import setup, find_packages
test_deps = [
'coverage',
@@ -31,3 +27,164 @@ Description: Missing data for this test
'pylint',
'pytest',
'pytest-cov',
+diff --git a/tests/test_mapped_sequence_identity.py b/tests/test_mapped_sequence_identity.py
+index 2d064ea..ae00358 100644
+--- a/tests/test_mapped_sequence_identity.py
++++ b/tests/test_mapped_sequence_identity.py
+@@ -12,7 +12,8 @@ from pbcore.util.statistics import (pb_identity,
+ gap_compressed_identity)
+ from pbcore.io import AlignmentSet, BamReader, IndexedBamReader
+
+-from pbtestdata import get_file
++pbtestdata = pytest.importorskip("pbtestdata")
++get_file = pbtestdata.get_file
+
+
+ def _compare_identity(x1, x2):
+diff --git a/tests/test_pbcore_io_align_pacbiobamindex.py b/tests/test_pbcore_io_align_pacbiobamindex.py
+index 9d12a1d..218e1da 100644
+--- a/tests/test_pbcore_io_align_pacbiobamindex.py
++++ b/tests/test_pbcore_io_align_pacbiobamindex.py
+@@ -1,4 +1,6 @@
+
++import pytest
++
+ from pbcore.io.align.PacBioBamIndex import get_index_size_bytes
+ from pbcore.io import openDataSet, PacBioBamIndex
+ import pbcore.data
+@@ -7,7 +9,7 @@ import pbcore.data
+ class TestPacBioBamIndex:
+
+ def test_get_index_size_bytes(self):
+- import pbtestdata
++ pbtestdata = pytest.importorskip("pbtestdata")
+ ds = openDataSet(pbtestdata.get_file("subreads-sequel"))
+ assert get_index_size_bytes(ds.externalResources[0].pbi) == 580
+ ds2 = openDataSet(pbtestdata.get_file("ccs-barcoded"))
+diff --git a/tests/test_pbdataset.py b/tests/test_pbdataset.py
+index 8999552..572025d 100644
+--- a/tests/test_pbdataset.py
++++ b/tests/test_pbdataset.py
+@@ -1154,7 +1154,7 @@ class TestDataSet:
+ aln2.toExternalFiles())
+
+ def test_mixed_pbi_columns(self):
+- import pbtestdata
++ pbtestdata = pytest.importorskip("pbtestdata")
+ inp1 = pbtestdata.get_file("barcoded-subreadset")
+ inp2 = pbtestdata.get_file("subreads-unbarcoded")
+ ds1 = SubreadSet(inp1, strict=True)
+@@ -1171,7 +1171,7 @@ class TestDataSet:
+ assert not ds.isMapped
+
+ def test_numbarcodes(self):
+- import pbtestdata
++ pbtestdata = pytest.importorskip("pbtestdata")
+ inp = pbtestdata.get_file("barcoded-subreadset")
+ ds = SubreadSet(inp, strict=True)
+ assert ds.numBarcodes == 3
+@@ -1179,7 +1179,7 @@ class TestDataSet:
+ @pytest.mark.internal_data
+ @pytest.mark.constools
+ def test_copyTo_same_base_names(self):
+- import pbtestdata
++ pbtestdata = pytest.importorskip("pbtestdata")
+ # see bug 33778
+ tmp_bam = tempfile.NamedTemporaryFile(suffix=".bam")
+ log.debug(tmp_bam.name)
+diff --git a/tests/test_pbdataset_metadata.py b/tests/test_pbdataset_metadata.py
+index 3d914ec..9332596 100644
+--- a/tests/test_pbdataset_metadata.py
++++ b/tests/test_pbdataset_metadata.py
+@@ -134,6 +134,7 @@ class TestDataSet:
+ aln = AlignmentSet(outXml)
+ assert aln.uuid == oldUuid
+
++ @pytest.mark.skip(reason="pbtestdata is not packaged yet")
+ @pytest.mark.internal_data
+ def test_merge(self):
+ sset_fn = ('/pbi/dept/secondary/siv/testdata/'
+diff --git a/tests/test_pbdataset_split.py b/tests/test_pbdataset_split.py
+index 8feea15..6b3af3c 100644
+--- a/tests/test_pbdataset_split.py
++++ b/tests/test_pbdataset_split.py
+@@ -11,7 +11,7 @@ from pbcore.io import (DataSet, SubreadSet, ReferenceSet, AlignmentSet,
+ import pbcore.data.datasets as data
+ import pbcore.data as upstreamdata
+
+-import pbtestdata
++pbtestdata = pytest.importorskip("pbtestdata")
+
+ log = logging.getLogger(__name__)
+
+diff --git a/tests/test_pbdataset_subtypes.py b/tests/test_pbdataset_subtypes.py
+index 822379b..fb49b58 100644
+--- a/tests/test_pbdataset_subtypes.py
++++ b/tests/test_pbdataset_subtypes.py
+@@ -990,7 +990,7 @@ class TestDataSet:
+ ds2.write(ds_out, validate=False)
+
+ def test_provenance_record_ordering(self):
+- import pbtestdata
++ pbtestdata = pytest.importorskip("pbtestdata")
+ ds = SubreadSet(pbtestdata.get_file("subreads-sequel"), strict=True)
+ ds.metadata.addParentDataSet(
+ uuid.uuid4(), ds.datasetType, createdBy="AnalysisJob", timeStampedName="")
+@@ -1008,7 +1008,7 @@ class TestDataSet:
+ assert len(ds1.resourceReaders()) == 1
+
+ def test_consensus_read_set_ref(self):
+- import pbtestdata
++ pbtestdata = pytest.importorskip("pbtestdata")
+ ds = ConsensusReadSet(pbtestdata.get_file("ccs-sequel"), strict=True)
+ uuid = ds.metadata.collections[0].consensusReadSetRef.uuid
+ assert uuid == "5416f525-d3c7-496b-ba8c-18d7ec1b4499"
+@@ -1027,7 +1027,7 @@ class TestDataSet:
+
+ @pytest.mark.constools
+ def test_generate_indices(self):
+- import pbtestdata
++ pbtestdata = pytest.importorskip("pbtestdata")
+ tmp_bam = tempfile.NamedTemporaryFile(suffix=".subreads.bam").name
+ tmp_pbi = tmp_bam + ".pbi"
+ tmp_bai = tmp_bam + ".bai"
+@@ -1040,7 +1040,7 @@ class TestDataSet:
+ assert len(ds) == 117
+
+ def test_trust_counts(self):
+- import pbtestdata
++ pbtestdata = pytest.importorskip("pbtestdata")
+ f1 = pbtestdata.get_file("aligned-xml")
+ f2 = pbtestdata.get_file("aligned-ds-2")
+ ds = openDataFile(f1, f2, trustCounts=True)
+@@ -1095,7 +1095,7 @@ class TestDataSet:
+
+ @pytest.mark.constools
+ def test_bedset(self):
+- import pbtestdata
++ pbtestdata = pytest.importorskip("pbtestdata")
+ bed_xml = pbtestdata.get_file("bedset")
+ ds = BedSet(bed_xml)
+ assert os.path.isfile(ds.externalResources[0].resourceId)
+@@ -1104,7 +1104,7 @@ class TestDataSet:
+
+ @pytest.mark.constools
+ def test_bedset_updateCounts(self):
+- import pbtestdata
++ pbtestdata = pytest.importorskip("pbtestdata")
+ bed_xml = pbtestdata.get_file("bedset")
+ ds = BedSet(bed_xml)
+ ds.updateCounts()
+diff --git a/tests/test_pbdataset_utils.py b/tests/test_pbdataset_utils.py
+index b5400cb..22dc950 100644
+--- a/tests/test_pbdataset_utils.py
++++ b/tests/test_pbdataset_utils.py
+@@ -13,7 +13,7 @@ from pbcore.io.dataset.utils import split_keys_around_read_groups, collection_fi
+
+ import pbcore.data as upstreamdata
+
+-import pbtestdata
++pbtestdata = pytest.importorskip("pbtestdata")
+
+ log = logging.getLogger(__name__)
+
=====================================
debian/patches/numpy-2.4.patch
=====================================
@@ -0,0 +1,66 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: 2026-10-20
+Bug-Debian: https://bugs.debian.org/1095090
+ https://bugs.debian.org/1114717
+Description: Fix compatibility with numpy 2.4
+ numpy 2.4 refuses int() on arrays that are not zero-dimensional and
+ removed the long-deprecated np.in1d alias. Extract the single element
+ explicitly and use np.isin instead.
+
+diff --git a/pbcore/io/align/PacBioBamIndex.py b/pbcore/io/align/PacBioBamIndex.py
+index 92e7dab..1b39a98 100644
+--- a/pbcore/io/align/PacBioBamIndex.py
++++ b/pbcore/io/align/PacBioBamIndex.py
+@@ -169,7 +169,7 @@ class PacBioBamIndex(PbIndexBase):
+ # TODO: remove nReads check when the rest of this code can handle empty
+ # mapped bam files (columns are missing, flags don't reflect that)
+ if self.hasCoordinateSortedInfo and self.nReads:
+- ntId = int(peek("u4", 1))
++ ntId = int(peek("u4", 1)[0])
+ for columnName, columnType in COORDINATE_SORTED_DTYPE:
+ peek(columnType, ntId)
+
+diff --git a/pbcore/io/align/_AlignmentMixin.py b/pbcore/io/align/_AlignmentMixin.py
+index 3407b82..cfc3bb2 100644
+--- a/pbcore/io/align/_AlignmentMixin.py
++++ b/pbcore/io/align/_AlignmentMixin.py
+@@ -67,7 +67,7 @@ class IndexedAlignmentReaderMixin(AlignmentReaderMixin):
+ rQuery = "*"
+
+ rgs = rgIDs(movieName)
+- rns = np.flatnonzero(np.in1d(self.qId, rgs) &
++ rns = np.flatnonzero(np.isin(self.qId, rgs) &
+ (self.holeNumber == holeNumber))
+ alns = [a for a in self[rns]
+ if rQueryMatch(a.readName, rQuery)]
+diff --git a/pbcore/io/dataset/DataSetMembers.py b/pbcore/io/dataset/DataSetMembers.py
+index 9233496..f4cc4bf 100644
+--- a/pbcore/io/dataset/DataSetMembers.py
++++ b/pbcore/io/dataset/DataSetMembers.py
+@@ -128,7 +128,7 @@ def recordMembership(records, constraints):
+ # columns. So we can slice the first columns of records to match
+ # constraints. Both are recarrays
+ subarrs1 = records[list(records.dtype.names[:len(constraints.dtype)])]
+- return np.in1d(subarrs1, constraints)
++ return np.isin(subarrs1, constraints)
+
+
+ def reccheck(records, qname_tables):
+@@ -139,7 +139,7 @@ def reccheck(records, qname_tables):
+ contextid and holenumber (you cannot skip fields, e.g. just holenumber).
+ We also want to allow people to mix partially and fully specified qnames
+ in the whitelist. Therefore we have different tables for different
+- lengths (so we can use np.in1d, which operates on recarrays quite nicely)
++ lengths (so we can use np.isin, which operates on recarrays quite nicely)
+ """
+ mask = np.zeros(len(records), dtype=bool)
+ for table in qname_tables.values():
+@@ -154,7 +154,7 @@ def inOp(ar1, ar2):
+ return reccheck(ar1, ar2)
+ assert isinstance(ar1, (np.ndarray, list, tuple))
+ assert isinstance(ar2, (np.ndarray, list, tuple))
+- return np.in1d(ar1, ar2)
++ return np.isin(ar1, ar2)
+
+
+ OPMAP = {'==': OP.eq,
=====================================
debian/patches/numpy2.patch deleted
=====================================
@@ -1,66 +0,0 @@
-Description: workaround overflow errors with numpy 2.
- These changes fix various overflow errors caught since numpy 2 by
- restoring the former behavior by emulating the situation when overflows
- weren't trapped. The -1 error code in unsigned types is handled by
- setting the value to the maximum unsigned integer instead, and large
- index values not fitting in 32-bit are guarded with modulo operation.
- .
- The change also includes a slight modification to account for weirder
- base 16 numbers caught by end user upstream, resolving the following
- error:
- .
- File "/home/shuaiw/miniconda3/envs/methy2/lib/python3.11/site-packages/pbcore/io/align/BamIO.py", line 218, in __init__
- self._loadReadGroupInfo()
- File "/home/shuaiw/miniconda3/envs/methy2/lib/python3.11/site-packages/pbcore/io/align/BamIO.py", line 89, in _loadReadGroupInfo
- rgID = rgAsInt(rg["ID"])
- ^^^^^^^^^^^^^^^^^
- File "/home/shuaiw/miniconda3/envs/methy2/lib/python3.11/site-packages/pbcore/io/align/_BamSupport.py", line 70, in rgAsInt
- return np.int32(int(rgIdString.split("/")[0], 16))
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ValueError: invalid literal for int() with base 16: 'cb4d472d-100C60F6'
- .
- I'm reluctant to formally send that patch upstream, as it feels like a
- workaround where the right answer would probably be to bump the type
- sizes to 64-bit. However, I do not know what is the actually correct
- approach.
-Author: Étienne Mollier <emollier at debian.org>
-Bug: https://github.com/PacificBiosciences/pbcore/issues/127
-Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1095090
-Last-Update: 2025-02-27
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- python-pbcore.orig/pbcore/io/align/BamAlignment.py
-+++ python-pbcore/pbcore/io/align/BamAlignment.py
-@@ -532,7 +532,11 @@
- if data.dtype == np.int8:
- gapCode = ord("-")
- else:
-- gapCode = data.dtype.type(-1)
-+ try:
-+ gapCode = data.dtype.type(-1)
-+ except OverflowError:
-+ # Hack: accomodate for unsigned types with numpy 2+.
-+ gapCode = data.dtype.type(np.iinfo(data.dtype).max)
- uc = self.unrolledCigar(orientation=orientation)
- alnData = np.repeat(np.array(gapCode, dtype=data.dtype), len(uc))
- gapMask = (uc == gapOp)
---- python-pbcore.orig/pbcore/io/align/_BamSupport.py
-+++ python-pbcore/pbcore/io/align/_BamSupport.py
-@@ -1,6 +1,7 @@
- # Author: David Alexander
-
- import numpy as np
-+import re
-
-
- class UnavailableFeature(Exception):
-@@ -63,7 +64,8 @@
- # qId calculation from RG ID string
- #
- def rgAsInt(rgIdString):
-- return np.int32(int(rgIdString.split("/")[0], 16))
-+ return np.int32(int(re.sub("-", "", rgIdString.split("/")[0]), 16)
-+ % (np.iinfo(np.int32).max+1))
-
- #
- # Kinetics: decode the scheme we are using to encode approximate frame
=====================================
debian/patches/numpy_1.24.patch deleted
=====================================
@@ -1,31 +0,0 @@
-Author: Andreas Tille <tille at debian.org>
-Last-Update: 2022-12-29
-Bug-Debian: https://bugs.debian.org/1027211
-Description: Fix AttributeError: module 'numpy' has no attribute 'float'.
- with numpy/1.24.1
-
---- a/pbcore/io/dataset/DataSetMembers.py
-+++ b/pbcore/io/dataset/DataSetMembers.py
-@@ -827,7 +827,7 @@ class Filters(RecordWrapper):
- 'mapqv': (lambda x: x.mapQV),
- 'accuracy': (
- lambda x: (np.ones(len(x.nMM), dtype='f4') -
-- (x.nMM + x.nIns + x.nDel).astype(np.float) /
-+ (x.nMM + x.nIns + x.nDel).astype(float) /
- (x.nM + x.nMM + x.nIns)))
- }
- base = self._pbiVecAccMap()
-@@ -869,11 +869,11 @@ class Filters(RecordWrapper):
- 'bcq': int,
- 'bq': int,
- 'qs': int,
-- 'rq': np.float,
-+ 'rq': float,
- 'pos': int,
- 'tstart': int,
- 'tend': int,
-- 'accuracy': np.float,
-+ 'accuracy': float,
- 'readstart': int,
- 'cx': PbiFlags.flagMap,
- 'n_subreads': int,
=====================================
debian/patches/series
=====================================
@@ -1,8 +1,6 @@
doc-theme.patch
exclude_test_missing_data.patch
-b24746790c7105212e45dc2f40115d231bd8baae.patch
seek-curdir-for-xml.patch
-numpy_1.24.patch
no-intersphinx.patch
remove-pkg-resources.patch
-numpy2.patch
+numpy-2.4.patch
View it on GitLab: https://salsa.debian.org/med-team/python-pbcore/-/compare/86c70613334b4ddf848662c4f377666a4605dbe0...d9c0214e744475d27cc582f598d69ad406579f4d
--
View it on GitLab: https://salsa.debian.org/med-team/python-pbcore/-/compare/86c70613334b4ddf848662c4f377666a4605dbe0...d9c0214e744475d27cc582f598d69ad406579f4d
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20261020/c82e2273/attachment-0001.htm>
More information about the debian-med-commit
mailing list