Skip to content

struct module does not accept mmap #1408

Closed

Description

@orent

struct.unpack/unpack_from accepts bytes, bytearray memoryview and other buffet-like objects but not mmap.

For reference, the re module accepts all of them and also mmap.

The memoryview object does not accept mmap, either.

Activity

  1. slozier commented on Oct 5, 2026

    @slozier
    Contributor

    Closing this since struct now supports mmap. I think there are still some issues with large files (more than 2GB), but it's a more fundamental issue with our buffer protocol implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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