mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
[3.12] gh-80527: Change support.requires_legacy_unicode_capi() (GH-108438) (#108446)
gh-80527: Change support.requires_legacy_unicode_capi() (GH-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.
(cherry picked from commit 995f4c48e1
)
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
22621907ee
commit
0eb6d87304
5 changed files with 17 additions and 16 deletions
|
@ -282,7 +282,7 @@ class Test_Csv(unittest.TestCase):
|
|||
self.assertRaises(OSError, writer.writerows, BadIterable())
|
||||
|
||||
@support.cpython_only
|
||||
@support.requires_legacy_unicode_capi
|
||||
@support.requires_legacy_unicode_capi()
|
||||
@warnings_helper.ignore_warnings(category=DeprecationWarning)
|
||||
def test_writerows_legacy_strings(self):
|
||||
import _testcapi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue