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-104232: Fix sys.settrace docs to reflect the reality #110516

Merged
merged 1 commit into from
Oct 18, 2023

Conversation

gaogaotiantian
Copy link
Member

@gaogaotiantian gaogaotiantian commented Oct 8, 2023

In our current docs, we claim that:

The local trace function should return a reference to itself (or to another function for further tracing in that scope), or None to turn off tracing in that scope.

That is not the case, and for as far as we know.

Returning None in the local trace function has no effect and it's already the de facto. There are at least 3 issues about this (#104232, #78980 and #56201) and it should not be that difficult to fix this. Rather than changing the behavior which could potentially break someone's code, we can simply change our docs because we never achieved what we claimed anyway, and people are fine with it.


📚 Documentation preview 📚: https://cpython-previews--110516.org.readthedocs.build/

@brandtbucher
Copy link
Member

Thanks for looking into it (this has always confused me too).

@brandtbucher brandtbucher added the needs backport to 3.11 only security fixes label Oct 18, 2023
@brandtbucher brandtbucher merged commit d9246c7 into python:main Oct 18, 2023
26 checks passed
@miss-islington-app
Copy link

Thanks @gaogaotiantian for the PR, and @brandtbucher for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 18, 2023
…0516)

(cherry picked from commit d9246c7)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Oct 18, 2023

GH-111045 is a backport of this pull request to the 3.11 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.11 only security fixes label Oct 18, 2023
@gaogaotiantian gaogaotiantian deleted the sys-settrace-docs branch October 18, 2023 20:43
@brandtbucher brandtbucher added the needs backport to 3.12 bug and security fixes label Oct 18, 2023
@miss-islington-app
Copy link

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 18, 2023
…0516)

(cherry picked from commit d9246c7)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Oct 18, 2023

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

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Oct 18, 2023
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
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
None yet
Development

Successfully merging this pull request may close these issues.

2 participants