You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Linters like pylint and ruff both discourage opening files without an encoding arg, which can cause problems when files written on one platform are opened on another. Because arches is a general library used cross-platform, this affects us.
One instance that came up was #11337 and was fixed, but there are dozens of other issues you can see if you turn on EncodingWarning (see PEP 597), which you don't need a linter for:
or, document that windows users should run python in utf-8 mode
or, just want until Python 3.15 when utf-8 mode defaults on, but python has deferred things like this before, so there's no guarantee it will happen on schedule
Suggest adding explict utf-8 encoding and turning on EncodingWarning in CI and elevating it to an error. This will function like a linter without having to decide on adopting a linter like pylint or ruff in general.
(Finally, the django_storages backend allows setting default encoding apparently, but that's only a potential partial fix for that one backend and for files going through the storages interface.)
The text was updated successfully, but these errors were encountered:
Linters like pylint and ruff both discourage opening files without an
encoding
arg, which can cause problems when files written on one platform are opened on another. Because arches is a general library used cross-platform, this affects us.One instance that came up was #11337 and was fixed, but there are dozens of other issues you can see if you turn on
EncodingWarning
(see PEP 597), which you don't need a linter for:We have a few choices:
Suggest adding explict utf-8 encoding and turning on EncodingWarning in CI and elevating it to an error. This will function like a linter without having to decide on adopting a linter like pylint or ruff in general.
(Finally, the django_storages backend allows setting default encoding apparently, but that's only a potential partial fix for that one backend and for files going through the storages interface.)
The text was updated successfully, but these errors were encountered: