Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vstinner opened this issue Sep 7, 2023 · 1 comment
Closed

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

vstinner opened this issue Sep 7, 2023 · 1 comment
Labels
tests Tests in the Lib/test dir topic-C-API

Comments

@vstinner
Copy link
Member

vstinner commented Sep 7, 2023

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

@serhiy-storchaka
Copy link
Member

I have examined them all, and they do not contain anything that could be tested. The fact that particular format units are errors is already tested in other tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir topic-C-API
Projects
None yet
Development

No branches or pull requests

2 participants