Skip to content

Tests: remove C API tests using @requires_legacy_unicode_capi()? #109050

Closed
@vstinner

Description

@vstinner

The @test.support.requires_legacy_unicode_capi() decorators uses from _testcapi import unicode_legacy_string, but this module attribute has been remove since Python 3.12 by commit f9c9354, and so all tests using the decorator are now always skipped.

Should we now remove tests using @requires_legacy_unicode_capi() decorator? Or are these tests kept on purpose?

For example, this test is now always skipped:

$ ./python -m test test_capi -m test.test_capi.test_getargs.String_TestCase.test_Z -v

test_Z (test.test_capi.test_getargs.String_TestCase.test_Z) ... skipped 'requires legacy Unicode C API'

See also issue #92536 and PEP 623: Remove wstr from Unicode.

cc @methane @serhiy-storchaka

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions