ba50e86563
ruff (unspecified-encoding) and the Windows-footgun checker both flag open() in text mode without encoture=. Keep text mode (the Windows lock path in _try_acquire_file_lock writes a str newline) and pass encoding='utf-8'.