Skip to content

gh-116738: Add free-threading tests for binascii - #143234

Closed
raven-dev-ops wants to merge 3 commits into
python:mainfrom
raven-dev-ops:gh-116738-binascii-audit
Closed

gh-116738: Add free-threading tests for binascii#143234
raven-dev-ops wants to merge 3 commits into
python:mainfrom
raven-dev-ops:gh-116738-binascii-audit

Conversation

@raven-dev-ops

@raven-dev-ops raven-dev-ops commented Dec 28, 2025

Copy link
Copy Markdown

Summary

  • Add free-threading regression coverage for binascii (Audit all built-in modules for thread safety #116738).
  • Assert that importing binascii does not enable the GIL when running with -X gil=0.
  • Add a multi-thread stress test for common binascii operations under -X gil=0.

Motivation

  • Built-in extension modules should be thread-safe in free-threaded builds and correctly declare their GIL usage.

Testing

  • Default build: ./python -m test -j0 test_binascii
  • Free-threaded build: ./python -X gil=0 -m test -j0 test_binascii

Issue

@python-cla-bot

python-cla-bot Bot commented Dec 28, 2025

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app bedevere-app Bot added the tests Tests in the Lib/test dir label Dec 28, 2025
@bedevere-app

bedevere-app Bot commented Dec 28, 2025

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@bedevere-app

bedevere-app Bot commented Dec 28, 2025

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@raven-dev-ops raven-dev-ops changed the title gh-116738: add free-threading tests for binascii Dec 28, 2025
@raven-dev-ops
raven-dev-ops deleted the gh-116738-binascii-audit branch December 28, 2025 00:37
@raven-dev-ops
raven-dev-ops restored the gh-116738-binascii-audit branch December 28, 2025 01:02
@raven-dev-ops raven-dev-ops reopened this Dec 28, 2025
@bedevere-app

bedevere-app Bot commented Dec 28, 2025

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@raven-dev-ops
raven-dev-ops marked this pull request as draft December 28, 2025 02:10
@raven-dev-ops

raven-dev-ops commented Dec 28, 2025

Copy link
Copy Markdown
Author

This is the first time I have tried to contribute to an open-source project, just let me know what I am doing wrong, I am thankful for your time.

@raven-dev-ops
raven-dev-ops marked this pull request as ready for review December 28, 2025 02:23
Comment thread Misc/NEWS.d/next/Tests/2025-12-27-20-13-12.gh-issue-116738.efglNB.rst Outdated
Comment thread Lib/test/test_binascii.py Outdated
Comment thread Lib/test/test_binascii.py Outdated
Comment thread Lib/test/test_binascii.py Outdated

@raven-dev-ops raven-dev-ops left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added NEWS.d to pass the bot test, I saw the (skip-label), does mean I would have auto-passed without updating NEWS.d from the "bedevere-app"?

Edit: bedevere/news
bedevere/news — "skip news" label found (I will remove the NEWS since it did skip.)

@raven-dev-ops raven-dev-ops closed this by deleting the head repository Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants