mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
gh-80527: Change support.requires_legacy_unicode_capi() (#108438)
The decorator now requires to be called with parenthesis: @support.requires_legacy_unicode_capi() instead of: @support.requires_legacy_unicode_capi The implementation now only imports _testcapi when the decorator is called, so "import test.support" no longer imports the _testcapi extension.
This commit is contained in:
parent
fa6933e035
commit
995f4c48e1
5 changed files with 17 additions and 16 deletions
|
@ -588,7 +588,7 @@ class ExplicitConstructionTest:
|
|||
self.assertRaises(InvalidOperation, Decimal, "1_2_\u00003")
|
||||
|
||||
@cpython_only
|
||||
@requires_legacy_unicode_capi
|
||||
@requires_legacy_unicode_capi()
|
||||
@warnings_helper.ignore_warnings(category=DeprecationWarning)
|
||||
def test_from_legacy_strings(self):
|
||||
import _testcapi
|
||||
|
@ -2920,7 +2920,7 @@ class ContextAPItests:
|
|||
Overflow])
|
||||
|
||||
@cpython_only
|
||||
@requires_legacy_unicode_capi
|
||||
@requires_legacy_unicode_capi()
|
||||
@warnings_helper.ignore_warnings(category=DeprecationWarning)
|
||||
def test_from_legacy_strings(self):
|
||||
import _testcapi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue