Debian Patches

Status for python-pysam/0.24.1+ds-3

Patch Description Author Forwarded Bugs Origin Last update
clean_less Do not clean *.bam files Michael R. Crusoe not-needed 2020-01-23
6261249228.patch Fix faidx output capture and improve pysam's use of -o for redirection

Capturing faidx output has been broken since v0.24.0 due to importing
samtools >=1.22 which newly uses bgzf_open() to write to standard output,
similarly to the calmd command. Fix this by patching `bgzf_open("-", ...)`
and using the same MAP_STDOUT_OPTIONS technique as for calmd.

The view -c special case has been unnecessary since samtools 1.4.

If the user-specified arguments use -o FILE themselves, the caller needs
to use catch_stdout=False to avoid the synthetic -o option used to capture
stdout clobbering the desired -o option. Make this more robust by prepending
the synthetic -o option rather than appending it, so that the user's option
clobbers the synthetic one instead. Fixes #1397.

Add test cases for commands that use special MAP_STDOUT_OPTIONS handling.
John Marshall <jmarshall@hey.com> no https://github.com/pysam-developers/pysam/commit/6261249228 2026-09-23
skip-32bit-tests.patch Skip tests that are invalid or crash on 32-bit platforms TestBinaryCompatibility compares hard-coded object sizes of the 64-bit
layouts, and testIteratorOutOfScope deliberately accesses a PileupColumn
after its iterator is gone, which is a use-after-free in pysam that
typically crashes rather than raising on 32-bit platforms (see
https://github.com/pysam-developers/pysam/issues/1151).
Upstream guards these with platform.machine(), but that reports the
kernel architecture: on i386 builds on a 64-bit kernel it still returns
x86_64, so the guard does not take effect and both test sets fail or
crash, breaking the build on i386, armhf and any other 32-bit arch.
Key both guards on the pointer size of the interpreter running the
tests instead.

diff --git a/tests/AlignmentFilePileup_test.py b/tests/AlignmentFilePileup_test.py
index 0969231..64a13fc 100644
Andreas Tille <tille@debian.org> yes debian

All known versions for source package 'python-pysam'

Links