◐ Shell
clean mode source ↗

Deprecation of locale.getdefaultlocale breaks POSIX compatibility on Windows platform

Bug report

Bug description:

Follow-up to #90817.

In summary, without getdetfaultlocale, tools that rely on POSIX locales cannot reliably get the same information from getlocale or setlocale on Windows.

For example, Linux will return something like 'en_AU'. But on Windows, getlocale will return something like 'English_Australia'.

CPython versions tested on:

3.12, 3.13

Operating systems tested on:

Windows, Linux

Linked PRs