Skip to content

gh-98239: Document that inspect.getsource() can raise TypeError #101689

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

Merged
merged 2 commits into from
Mar 23, 2023

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Feb 8, 2023

Now all inspect.getsourcefile, inspect.getsourcelines, and inspect.getsource mention the TypeError case.

cc @ericvsmith

@sobolevn
Copy link
Member Author

@AlexWaygood this is quite a simple change, but it is stuck. Can you please take a look?

@AlexWaygood AlexWaygood self-requested a review March 20, 2023 23:15
Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

LGTM! Just two small suggestions to minimise the diff and keep the additions consistent with the immediate surrounding text:

@AlexWaygood AlexWaygood added needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes labels Mar 23, 2023
@AlexWaygood AlexWaygood merged commit b613208 into python:main Mar 23, 2023
@miss-islington
Copy link
Contributor

Thanks @sobolevn for the PR, and @AlexWaygood for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 23, 2023
…ror` (pythonGH-101689)

(cherry picked from commit b613208)

Co-authored-by: Nikita Sobolev <[email protected]>
@bedevere-bot
Copy link

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

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Mar 23, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 23, 2023
…ror` (pythonGH-101689)

(cherry picked from commit b613208)

Co-authored-by: Nikita Sobolev <[email protected]>
@bedevere-bot
Copy link

GH-102970 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Mar 23, 2023
miss-islington added a commit that referenced this pull request Mar 23, 2023
…H-101689)

(cherry picked from commit b613208)

Co-authored-by: Nikita Sobolev <[email protected]>
miss-islington added a commit that referenced this pull request Mar 23, 2023
…H-101689)

(cherry picked from commit b613208)

Co-authored-by: Nikita Sobolev <[email protected]>
Fidget-Spinner pushed a commit to Fidget-Spinner/cpython that referenced this pull request Mar 27, 2023
warsaw pushed a commit to warsaw/cpython that referenced this pull request Apr 11, 2023
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.

4 participants