Skip to content

TypeError calling Traversable.read_text() via importlib.resources #127340

@zooba

Description

@zooba

Bug report

importlib.resources.abc.Traversable.read_text has a signature that only takes an encoding parameter.

importlib.resources._functional.read_text calls it passing errors.

This, unsurprisingly, causes a TypeError. My exact error message is Traversable.read_text() got an unexpected keyword argument 'errors', but I believe it's an instance of CompatibilityFiles.SpecPath (as I've never bothered updating this code for the structural changes).

(Ping @jaraco)

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixes3.14bugs and security fixestopic-importlibtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions