GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-98239: Document that `inspect.getsource()` can raise `TypeError` by sobolevn · Pull Request #101689 · python/cpython

Conversation

@sobolevn

@sobolevn sobolevn commented Feb 8, 2023 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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

cc @ericvsmith

  • Issue: inspect.getsource() on sourceless dataclass raises undocumented exception #98239

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@sobolevn
pythongh-98239: Document that inspect.getsource() can raise `TypeEr…
52b3481
…ror`
@bedevere-bot bedevere-bot added the awaiting review label Feb 8, 2023
@bedevere-bot bedevere-bot mentioned this pull request Feb 8, 2023
inspect.getsource() on sourceless dataclass raises undocumented exception #98239
Closed
@bedevere-bot bedevere-bot added docs Documentation in the Doc dir skip news labels Feb 8, 2023
@sobolevn

sobolevn commented Mar 20, 2023

Copy link
Copy Markdown
Member Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@AlexWaygood
AlexWaygood self-requested a review March 20, 2023 23:15
AlexWaygood
AlexWaygood reviewed Mar 23, 2023
View reviewed changes

@AlexWaygood AlexWaygood left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this 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:

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Doc/library/inspect.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/inspect.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@sobolevn @AlexWaygood
Apply suggestions from code review
d08f2d8
Co-authored-by: Alex Waygood <[email protected]>
AlexWaygood
AlexWaygood approved these changes Mar 23, 2023
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting review labels Mar 23, 2023
@AlexWaygood AlexWaygood added needs backport to 3.10 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

miss-islington commented Mar 23, 2023

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the awaiting merge label Mar 23, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 23, 2023
@sobolevn @miss-islington
pythongh-98239: Document that inspect.getsource() can raise `TypeEr…
79cd865
…ror` (pythonGH-101689)

(cherry picked from commit b613208)

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

bedevere-bot commented Mar 23, 2023

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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
@sobolevn @miss-islington
pythongh-98239: Document that inspect.getsource() can raise `TypeEr…
e395b9a
…ror` (pythonGH-101689)

(cherry picked from commit b613208)

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

bedevere-bot commented Mar 23, 2023

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 label Mar 23, 2023
miss-islington added a commit that referenced this pull request Mar 23, 2023
@miss-islington @sobolevn
gh-98239: Document that inspect.getsource() can raise TypeError (G…
77e54fe
…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
@miss-islington @sobolevn
gh-98239: Document that inspect.getsource() can raise TypeError (G…
202e16e
…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
@sobolevn @Fidget-Spinner
pythongh-98239: Document that inspect.getsource() can raise `TypeEr…
c25402d
…ror` (python#101689)
warsaw pushed a commit to warsaw/cpython that referenced this pull request Apr 11, 2023
@sobolevn @warsaw
pythongh-98239: Document that inspect.getsource() can raise `TypeEr…
280960c
…ror` (python#101689)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@AlexWaygood AlexWaygood AlexWaygood approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

docs Documentation in the Doc dir skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@sobolevn @miss-islington @bedevere-bot @AlexWaygood
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.