Closed mgedmin closed 6 years ago
Also, the insidious thing about this bug is that write_text_file()
first reports
logger.debug("Writing to %s with its original encoding %s",
filename, encoding)
and then it silently upgrades that encoding to something else, without informing the user. You may want to fix that too!
Ouch! Good catch. That set()
is a small optimization that actually breaks the functionality!
Commit https://github.com/zestsoftware/zest.releaser/commit/95e3bd3daa1617e85aee56ba93c961be8784e7da fixes the logging.
Released in 6.13.2
Thank you!
(:fireworks: The fix works! :fireworks:)
Set iteration order is not defined in Python. This loop is one where the order matters, otherwise we could be "upgrading" to UTF-8 without any reason, leading to bugs like #254.
I have not tested that this fix works.
I don't currently have the time to write a unit test that would expose the bug.