Add missing NULL guard in PileupColumn.get_query_qualities#1380
Conversation
0d22c0d to
9c654ed
Compare
|
|
@nh13 : Thanks for putting in the time to improve pysam!
@jmarshall: Hopefully this is meant tongue-in-cheek because maintainers have no obligation to merge late-breaking pull requests if a release is impending. It also seems unwise to complain about small, targeted PRs. There are definitely better and worse times for contributions in terms of release latency, but I hope that useful contributions are always welcome. I know this is easy for me to say, but I'll set aside some time in the next week to help review these PRs to hopefully save @jmarshall some time (who is an absolute hero for his work keeping pysam afloat). |
9c654ed to
b124bcb
Compare
|
@jmarshall, apologies for the deluge and the poor timing. I should have reached out first to ask whether these were welcome and when. I've converted all 13 PRs to draft so they're out of your way for the release. On your points:
Happy to close any or all of these if they're not useful, or leave them as drafts until you're open to reviewing them. Whatever works best for you. @bioinformed, thanks for the kind words and the offer to help review. |
|
There are test cases for these accessors — see However none of this works in Python 3.11, which is #1151. Rather to my surprise, it turns out these test cases do work again — and don't crash — in Python 3.12 and later! Nonetheless I'd like to use this PR as an additional excuse to get to the bottom of that Python 3.11 problem and hopefully merge a fix for that at the same time. |
Summary
plp == NULLguard toPileupColumn.get_query_qualities()to match all 6 sibling methods (pileups,get_num_aligned,get_query_sequences,get_mapping_qualities,get_query_positions,get_query_names)get_query_qualities()after the pileup iterator is exhausted causes a segfault instead of raising a cleanValueErrorTest plan
REF_PATH=: pytest tests/AlignmentFilePileup_test.py -vAI disclosure: This PR was AI-assisted using Claude Code. The issue was identified via AI-guided code review, and the implementation was drafted by AI with human review and approval.