Skip to content
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

gh-80527: Change support.requires_legacy_unicode_capi() #108438

Merged
merged 1 commit into from
Aug 24, 2023

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Aug 24, 2023

The decorator now requires to be called:

@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.

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.
@vstinner vstinner added skip news needs backport to 3.12 bug and security fixes labels Aug 24, 2023
@vstinner vstinner requested a review from rhettinger as a code owner August 24, 2023 17:24
@vstinner vstinner merged commit 995f4c4 into python:main Aug 24, 2023
@vstinner vstinner deleted the unicode_legacy branch August 24, 2023 18:09
@miss-islington
Copy link
Contributor

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-108446 is a backport of this pull request to the 3.12 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.12 bug and security fixes label Aug 24, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 24, 2023
…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 995f4c4)

Co-authored-by: Victor Stinner <[email protected]>
Yhg1s pushed a commit that referenced this pull request Aug 25, 2023
…8438) (#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 995f4c4)

Co-authored-by: Victor Stinner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants