mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
Merge dd4516ac55 into f9704f1d84
This commit is contained in:
commit
6d486da382
3 changed files with 1 additions and 11 deletions
|
|
@ -370,8 +370,6 @@ The :mod:`locale` module defines the following exception and functions:
|
|||
determined.
|
||||
The "C" locale is represented as ``(None, None)``.
|
||||
|
||||
.. deprecated-removed:: 3.11 3.15
|
||||
|
||||
|
||||
.. function:: getlocale(category=LC_CTYPE)
|
||||
|
||||
|
|
|
|||
|
|
@ -559,12 +559,6 @@ def getdefaultlocale(envvars=('LC_ALL', 'LC_CTYPE', 'LANG', 'LANGUAGE')):
|
|||
|
||||
"""
|
||||
|
||||
import warnings
|
||||
warnings._deprecated(
|
||||
"locale.getdefaultlocale",
|
||||
"{name!r} is deprecated and slated for removal in Python {remove}. "
|
||||
"Use setlocale(), getencoding() and getlocale() instead.",
|
||||
remove=(3, 15))
|
||||
return _getdefaultlocale(envvars)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
from decimal import Decimal
|
||||
from test import support
|
||||
from test.support import cpython_only, verbose, is_android, linked_to_musl, os_helper
|
||||
from test.support.warnings_helper import check_warnings
|
||||
from test.support.import_helper import ensure_lazy_imports, import_fresh_module
|
||||
from unittest import mock
|
||||
import unittest
|
||||
|
|
@ -654,8 +653,7 @@ class TestMiscellaneous(unittest.TestCase):
|
|||
env.unset('LC_ALL', 'LC_CTYPE', 'LANG', 'LANGUAGE')
|
||||
env.set('LC_CTYPE', 'UTF-8')
|
||||
|
||||
with check_warnings(('', DeprecationWarning)):
|
||||
self.assertEqual(locale.getdefaultlocale(), (None, 'UTF-8'))
|
||||
self.assertEqual(locale.getdefaultlocale(), (None, 'UTF-8'))
|
||||
finally:
|
||||
if orig_getlocale is not None:
|
||||
_locale._getdefaultlocale = orig_getlocale
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue