[med-svn] [Git][med-team/cyvcf2][master] Commit NMU from Stefano Rivera
Andreas Tille (@tille)
gitlab at salsa.debian.org
Sun Nov 21 13:25:16 GMT 2021
Andreas Tille pushed to branch master at Debian Med / cyvcf2
Commits:
df9ade50 by Andreas Tille at 2021-11-21T14:23:50+01:00
Commit NMU from Stefano Rivera
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/python-3.10.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+cyvcf2 (0.30.11-1.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Patch: Python 3.10 support - avoid a regression in gzip file handles
+ (Closes: #1000317)
+
+ -- Stefano Rivera <stefanor at debian.org> Sun, 21 Nov 2021 08:38:57 -0400
+
cyvcf2 (0.30.11-1) unstable; urgency=medium
* Fix watch URL
=====================================
debian/patches/python-3.10.patch
=====================================
@@ -0,0 +1,46 @@
+From: Stefano Rivera <stefano at rivera.za.net>
+Date: Sun, 21 Nov 2021 08:29:40 -0400
+Subject: Avoid a Python 3.10 regression in iterating GzipFiles
+
+Open the file with a context manager, so we're holding onto a reference to it, for the lifetime of the iteration.
+
+This avoids hitting https://bugs.python.org/issue45475 which affects python3.10 3.10.0-4 in Debian.
+
+Bug-Debian: https://bugs.debian.org/1000317
+Forwarded: https://github.com/brentp/cyvcf2/pull/225
+---
+ cyvcf2/tests/test_reader.py | 21 +++++++++++----------
+ 1 file changed, 11 insertions(+), 10 deletions(-)
+
+diff --git a/cyvcf2/tests/test_reader.py b/cyvcf2/tests/test_reader.py
+index 76cb9f8..f81b920 100644
+--- a/cyvcf2/tests/test_reader.py
++++ b/cyvcf2/tests/test_reader.py
+@@ -456,16 +456,17 @@ def test_var_type():
+ def _get_line_for(v):
+ import gzip
+
+- for i, line in enumerate(gzip.open(VCF_PATH), start=1):
+- line = line.decode()
+- if line[0] == "#": continue
+- toks = line.strip().split("\t")
+- if not (toks[0] == v.CHROM and int(toks[1]) == v.POS): continue
+- if toks[3] != v.REF: continue
+- if toks[4] not in v.ALT: continue
+- return toks
+- else:
+- raise Exception("not found")
++ with gzip.open(VCF_PATH) as f:
++ for i, line in enumerate(f, start=1):
++ line = line.decode()
++ if line[0] == "#": continue
++ toks = line.strip().split("\t")
++ if not (toks[0] == v.CHROM and int(toks[1]) == v.POS): continue
++ if toks[3] != v.REF: continue
++ if toks[4] not in v.ALT: continue
++ return toks
++ else:
++ raise Exception("not found")
+
+
+ def _get_samples(v):
=====================================
debian/patches/series
=====================================
@@ -1,2 +1,3 @@
add_htslib_link_dependency.patch
i386.patch
+python-3.10.patch
View it on GitLab: https://salsa.debian.org/med-team/cyvcf2/-/commit/df9ade504e530e167fdaf16ea4ced6a6a4eb9734
--
View it on GitLab: https://salsa.debian.org/med-team/cyvcf2/-/commit/df9ade504e530e167fdaf16ea4ced6a6a4eb9734
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20211121/8cc55c7b/attachment-0001.htm>
More information about the debian-med-commit
mailing list