Uh oh!
There was an error while loading. Please reload this page.
Replace codecs.open with built-in open for UTF-8 file handling - #210
Conversation
eemeli
commented
Nov 27, 2025
Sorry for not getting to this earlier. It looks like there's a difference in |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
eemeli
left a comment
There was a problem hiding this comment.
Hey; hope you don't mind that I went ahead and fixed this PR? The test failures were due to needing newline='\n' as an argument for open() so that it doesn't apply universal newlines when reading files.
Beyond that, mocking builtins.open breaks stuff at least in babel, and seems like an in-general bad idea. So I refactored the patch_files() decorator to build actual files instead, using TemporaryDirectory.
Uh oh!
There was an error while loading. Please reload this page.
PredaaA
commented
Jan 8, 2026
Thank you for the fixes! I wasn't able to look into it. |
codecs.openis deprecated since Python 3.14. This replaces all occurences of it toopen(...).