Skip to content

filter_file is broken #48037

@haampie

Description

@haampie

Steps to reproduce

  • runs f.tell() on a TextIOWrapper, which returns an "opaque number", which is not the number of bytes, but this number is used as such afterwards
  • does not explicitly open the file in a locale-independent way
  • does not allow users to specify a different text encoding
  • creates a file backup in an unsafe way
  • (does not preserve hardlinks, but i guess we can live with that)

Error message

No response

Information on your system

  • Spack: 0.24.0.dev0 (a3985e7)
  • Python: 3.13.0
  • Platform: linux-ubuntu24.04-zen2

General information

  • I have run spack debug report and reported the version of Spack/Python/Platform
  • I have searched the issues of this repo and believe this is not a duplicate
  • I have run the failing commands in debug mode and reported the output

Metadata

Metadata

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions