Skip to content

gh-116750: Document 3.14 changes around sys.monitoring.clear_tool_id - #156706

Merged
nedbat merged 2 commits into
python:mainfrom
Oberon00:doc-sys-monitoring-tool-id-versioning
Sep 14, 2026
Merged

nedbat merged 2 commits into
python:mainfrom
Oberon00:doc-sys-monitoring-tool-id-versioning

Conversation

@Oberon00

Copy link
Copy Markdown
Contributor

clear_tool_id() was added in 3.14 but lacked a versionadded note. Also free_tool_id()'s behavior changed (now calling clear_tool_id() before releasing the tool_id, rather than leaving events/callbacks registered) which was also not a documented change. Also add a What's New in 3.14 entry covering both.

(Using gh-116750 as issue number, which is the issue for the original change but is already closed, hope that is OK.)

…ing tool_id functions

clear_tool_id() was added in 3.14 but lacked a versionadded note, and
free_tool_id()'s behavior change (now calling clear_tool_id() before
releasing the tool_id, rather than leaving events/callbacks registered)
was undocumented. Also add a What's New in 3.14 entry for both.
@Oberon00
Oberon00 requested a review from AA-Turner as a code owner August 31, 2026 12:01
@bedevere-app bedevere-app Bot added docs Documentation in the Doc dir skip news labels Aug 31, 2026
@python-cla-bot

python-cla-bot Bot commented Aug 31, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@read-the-docs-community

read-the-docs-community Bot commented Aug 31, 2026

Copy link
Copy Markdown

@nedbat

nedbat commented Sep 1, 2026

Copy link
Copy Markdown
Member

@markshannon Opinion?

@markshannon

markshannon commented Sep 1, 2026

Copy link
Copy Markdown
Member

This look right. We did change free_tool_id, so it should be documented.

@Oberon00

Copy link
Copy Markdown
Contributor Author

Anything I should do here to progress?
I thought it was useful to have the versionadded/versionchanged especially because I don't usually look at the different Python versions' docs. When supporting multiple Python versions in a sys.monitoring-based tool, one would think that calling clear_tool_id is enough to clean up for all Python versions, and then one would have unexpected runtime behavior on older versions that also cannot be caught by type checkers (since the function is there, but behaves differently at runtime)

@nedbat
nedbat merged commit f815f74 into python:main Sep 14, 2026
30 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Sep 14, 2026
@nedbat nedbat added needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Sep 14, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @Oberon00 for the PR, and @nedbat for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Thanks @Oberon00 for the PR, and @nedbat for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Sep 14, 2026

Copy link
Copy Markdown

GH-157481 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Sep 14, 2026
@bedevere-app

bedevere-app Bot commented Sep 14, 2026

Copy link
Copy Markdown

GH-157482 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Sep 14, 2026
johnslavik pushed a commit to johnslavik/cpython that referenced this pull request Sep 14, 2026
…ol_id (python#156706)

pythongh-116750: Document versionadded/versionchanged for sys.monitoring tool_id functions

clear_tool_id() was added in 3.14 but lacked a versionadded note, and
free_tool_id()'s behavior change (now calling clear_tool_id() before
releasing the tool_id, rather than leaving events/callbacks registered)
was undocumented. Also add a What's New in 3.14 entry for both.

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
hugovk pushed a commit that referenced this pull request Sep 14, 2026
…ool_id (GH-156706) (#157482)

Co-authored-by: Christian Neumüller <christian+github@neumueller.me>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
hugovk pushed a commit that referenced this pull request Sep 14, 2026
…ool_id (GH-156706) (#157481)

Co-authored-by: Christian Neumüller <christian+github@neumueller.me>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants