Skip to content

Build failure on Python 3.14 #46

@sarahec

Description

@sarahec

While building for Python 3.14 on nixpkgs:

ewf_data = <_io.BufferedReader name='/nix/var/nix/builds/nix-build-python3.14-dissect-evidence-3.12.drv-0/b/source/tests/data/ewf.E01'>

    def test_ewf(ewf_data: BinaryIO) -> None:
        e = ewf.EWF(ewf_data)
    
        assert e.size == 4097
>       assert e.open().read(4097) == (b"\xde\xad\xbe\xef" * 1024) + b"\n"
               ^^^^^^^^^^^^^^^^^^^

tests/test_ewf.py:16: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/nix/store/3f3dshv3bfiilkkbbd17am59ls9wrcfv-python3.14-dissect-util-3.23/lib/python3.14/site-packages/dissect/util/stream.py:168: in read
    self._fill_buf()
/nix/store/3f3dshv3bfiilkkbbd17am59ls9wrcfv-python3.14-dissect-util-3.23/lib/python3.14/site-packages/dissect/util/stream.py:107: in _fill_buf
    self._buf = self._read(self._pos_align, self.align)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <dissect.evidence.ewf.EWFStream object at 0x107e68d90>, offset = 0
length = 131072

    def _read(self, offset: int, length: int) -> bytes:
        result = []
    
        sector_offset = offset // self.sector_size
        sector_count = (length + self.sector_size - 1) // self.sector_size
    
        segment_idx = bisect_right(self.ewf._segment_offsets, sector_offset)
    
        while sector_count > 0:
            if segment_idx > len(self.ewf._segment_offsets):
>               raise EWFError(f"Missing EWF file for segment index: {segment_idx}")
E               dissect.evidence.exceptions.EWFError: Missing EWF file for segment index: 1

dissect/evidence/ewf.py:227: EWFError
=========================== short test summary info ============================
FAILED tests/test_ewf.py::test_ewf - dissect.evidence.exceptions.EWFError: Missing EWF file for segment index: 1
========================= 1 failed, 16 passed in 0.09s =========================
error: builder for '/nix/store/3kr01xqpwzslabn3xqjjixgnb5qh4637-python3.14-dissect-evidence-3.12.drv' failed with exit code 1;
       last 25 log lines:
       > /nix/store/3f3dshv3bfiilkkbbd17am59ls9wrcfv-python3.14-dissect-util-3.23/lib/python3.14/site-packages/dissect/util/stream.py:107: in _fill_buf
       >     self._buf = self._read(self._pos_align, self.align)
       >                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
       >
       > self = <dissect.evidence.ewf.EWFStream object at 0x107e68d90>, offset = 0
       > length = 131072
       >
       >     def _read(self, offset: int, length: int) -> bytes:
       >         result = []
       >     
       >         sector_offset = offset // self.sector_size
       >         sector_count = (length + self.sector_size - 1) // self.sector_size
       >     
       >         segment_idx = bisect_right(self.ewf._segment_offsets, sector_offset)
       >     
       >         while sector_count > 0:
       >             if segment_idx > len(self.ewf._segment_offsets):
       > >               raise EWFError(f"Missing EWF file for segment index: {segment_idx}")
       > E               dissect.evidence.exceptions.EWFError: Missing EWF file for segment index: 1
       >
       > dissect/evidence/ewf.py:227: EWFError

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions