Skip to content

BytesIO should be marked as thread-unsafe on 3.13 and 3.14 #100

Closed as not planned

Description

@ngoldbaum

I saw crashes related to this running the python-isal tests. See also python/cpython#132551.

Unfortunately the fix didn't quite make it in time for 3.14, so we'll need to wait another year to run tests that use BytesIO in parallel.

Activity

  1. ngoldbaum commented on Jul 24, 2025

    @ngoldbaum
    CollaboratorAuthor

    Actually, on second thought, this might be trickier than I thought to deal with.

    Just using BytesIO is fine, the problem is if e.g. a test fixture returns a BytesIO. Maybe we need a way to detect that fixtures are unsafe?

  2. ngoldbaum commented on Jul 24, 2025

    @ngoldbaum
    CollaboratorAuthor

    IMO this one shouldn't block a 0.6.0 release and maybe it's best to just handle this on a case-by-base basis as we run into issues with fixtures using BytesIO.

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