Page MenuHomePhabricator

cleanup: drop support for config.textfile_encoding
Closed, ResolvedPublicDesign

Description

config.textfile_encoding (default set to 'utf-8') is rarely used. Most textfile encodings is hard-coded with 'utf-8'.

With Python 3.15 and PEP 686, explicit global encoding configuration is increasingly unnecessary because UTF-8 becomes de facto standard text encoding. Therefore I propose to:

  • Deprecate config.textfile_encoding
  • Replace remaining usages with explicit 'utf-8'
  • Update documentation if needed

Event Timeline

Xqt triaged this task as Low priority.
Xqt changed the subtype of this task from "Task" to "Design".

Change #1306111 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] config: Drop textfile_encoding variable and use 'utf-8' directly instead

https://gerrit.wikimedia.org/r/1306111

Change #1306111 merged by jenkins-bot:

[pywikibot/core@master] config: Drop textfile_encoding variable and use 'utf-8' directly instead

https://gerrit.wikimedia.org/r/1306111