Add _locale module (#10859)

More accurately reflect the platform availability of several constants and functions in `locale`.
This commit is contained in:
Nikita Sobolev
2023-10-08 13:55:19 +03:00
committed by GitHub
parent 64d6d96568
commit 5531e9d470
6 changed files with 204 additions and 107 deletions

View File

@@ -1,7 +1,8 @@
# These entries looks like a `setup-python` bug:
(dbm.gnu)?
(locale.bind_textdomain_codeset)?
(locale.bindtextdomain)?
(locale.dcgettext)?
(locale.dgettext)?
(locale.gettext)?
(locale.textdomain)?
(_?locale.bind_textdomain_codeset)?
(_?locale.bindtextdomain)?
(_?locale.dcgettext)?
(_?locale.dgettext)?
(_?locale.gettext)?
(_?locale.textdomain)?

View File

@@ -1,7 +1,8 @@
# These entries looks like a `setup-python` bug:
(dbm.gnu)?
(locale.bind_textdomain_codeset)?
(locale.bindtextdomain)?
(locale.dcgettext)?
(locale.dgettext)?
(locale.gettext)?
(locale.textdomain)?
(_?locale.bind_textdomain_codeset)?
(_?locale.bindtextdomain)?
(_?locale.dcgettext)?
(_?locale.dgettext)?
(_?locale.gettext)?
(_?locale.textdomain)?

View File

@@ -1,6 +1,4 @@
ctypes.GetLastError # Is actually a pointer
locale.[A-Z0-9_]+ # Constants that should be moved to _locale and re-exported conditionally
locale.nl_langinfo # Function that should be moved to _locale and re-exported conditionally
# alias for a class defined elsewhere,
# mypy infers the variable has type `(*args) -> DupHandle` but stubtest infers the runtime type as <class DupHandle>
multiprocessing.reduction.AbstractReducer.DupHandle