Package: src:python-skbio
Version: 0.7.3-1
User: [email protected]
Usertags: python3.15
Tags: patch, ftbfs, forky, sid
Severity: important

Hi!

While rebuilding the python related packages against the Python 3.15rc2
version we found that python-skbio fails to build from source [1].

The error is:
      super(CompressedMixin, self).__init__(*args, **kwargs)
E       io.UnsupportedOperation: File or stream is not readable.

It seems that its open in write only instead of read only as the test
expects, I've created a patch that sets the explicit mode and solves the
problem.

I applied the fix in the sandbox [2] to be able to build the packages
that depend on python-skbio, please consider applying the patch to
support the upcoming 3.15 version.

Setting the severity to important for now. Once Python 3.15 is released,
it will be added to python3-defaults and this bug will become release
critical.

Happy hacking,

[1]: https://debusine.debian.net/debian/r-python-python3.15/artifact/4462291/
[2]: https://debusine.debian.net/debian/r-python-python3.15/

--
"Can you imagine what I would do if I could do all I can?" -- Sun Tzu
Saludos /\/\ /\ >< `/
Description: Explicitly specify mode="rb" in GzipCompressor.get_reader
 GzipFile without explicit mode defaults to fileobj.mode (e.g. 'w+b' for
 temporary files), causing it to open for writing instead of reading.
Forwarded: not-needed
--- a/skbio/io/_iosources.py
+++ b/skbio/io/_iosources.py
@@ -215,7 +215,7 @@ class GzipCompressor(Compressor):
         return self.file.peek(2)[:2] == b"\x1f\x8b"
 
     def get_reader(self):
-        return gzip.GzipFile(fileobj=self.file)
+        return gzip.GzipFile(fileobj=self.file, mode="rb")
 
     def get_writer(self):
         return gzip.GzipFile(

Reply via email to