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-102541: Hide traceback in help prompt by Eclips4 · Pull Request #102614 · python/cpython

Conversation

@Eclips4

@Eclips4 Eclips4 commented Mar 11, 2023 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Add is_cli param to doc function (by default, set to False).
When is_cli arg is True, we raise a ImportError, otherwise, just show a missing_pattern.
Although, add a variable missing_pattern, which now is used by resolve and doc functions.
This PR absolutely compatible with #89130.
I like tests, but i think, that case shouldn't be tested.
If core-devs approve this, it should be merged to 3.11 and 3.12 branches.
On 3.10 this works fine.

  • Issue: help CLI shows a traceback when import failed #102541

Sorry, something went wrong.

Uh oh!

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

arhadthedev reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@bedevere-bot bedevere-bot mentioned this pull request Mar 11, 2023
help CLI shows a traceback when import failed #102541
Closed
@bedevere-bot bedevere-bot added the awaiting review label Mar 11, 2023
@Eclips4

Eclips4 commented Mar 13, 2023

Copy link
Copy Markdown
Member Author

Could someone review it? =)

All reactions

Sorry, something went wrong.

Uh oh!

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

chgnrdv
chgnrdv reviewed Mar 14, 2023
View reviewed changes
Comment thread Lib/pydoc.py Resolved

Uh oh!

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

@Eclips4

Eclips4 commented Mar 17, 2023

Copy link
Copy Markdown
Member Author

@sobolevn
Can you review it?

All reactions

Sorry, something went wrong.

Uh oh!

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

chgnrdv
chgnrdv approved these changes Mar 20, 2023
View reviewed changes
@bedevere-bot bedevere-bot added awaiting core review and removed awaiting review labels Mar 20, 2023
@arhadthedev arhadthedev added the stdlib Standard Library Python modules in the Lib/ directory label Mar 22, 2023
@Eclips4

Eclips4 commented May 14, 2023

Copy link
Copy Markdown
Member Author

Can someone from core developers review it?

All reactions

Sorry, something went wrong.

Uh oh!

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

@terryjreedy
terryjreedy requested a review from ambv June 12, 2023 17:50
@terryjreedy terryjreedy added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Jun 12, 2023
@terryjreedy
terryjreedy requested a review from corona10 June 12, 2023 18:43
@terryjreedy

terryjreedy commented Jun 12, 2023 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

The most appropriate coredev reviewer would be whoever merged the PR that caused the regression. That would have to be a feature addition after 3.10.0b1, May 2021 (and hence not backported to 3.10) and before 3.11.0 in Oct 2022. #98450 fixed a related bug -- help('invalid query') raising with similar result. This caught the exception in a different place (line 2005) and remains fixed.

help need more automated tests.

Eclips4 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@corona10

corona10 commented Jun 13, 2023

Copy link
Copy Markdown
Member

I will take a look at this PR tonight (UTC+9)

Eclips4 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

corona10
corona10 reviewed Jun 13, 2023
View reviewed changes
Comment thread Lib/pydoc.py Resolved

Uh oh!

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

corona10
corona10 approved these changes Jun 13, 2023
View reviewed changes

@corona10 corona10 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 with nit comment.
Writing test code will be great, but I know this case is very hard to write. :)

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels Jun 13, 2023
@corona10

corona10 commented Jun 13, 2023

Copy link
Copy Markdown
Member

Please rebase the PR.

All reactions

Sorry, something went wrong.

Uh oh!

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

corona10
corona10 reviewed Jun 13, 2023
View reviewed changes
Comment thread Misc/NEWS.d/next/Library/2023-03-12-01-17-15.gh-issue-102541.LK1adc.rst Resolved

Uh oh!

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

@Eclips4
pythongh-102541: Hide traceback in help prompt
7828042
@Eclips4
Eclips4 force-pushed the issue-102541 branch from 6f439d7 to 7828042 Compare June 14, 2023 08:18
@Eclips4
Merge branch 'main' into issue-102541
6bfd8a2
@corona10
corona10 merged commit ba516e7 into python:main Jun 14, 2023
@miss-islington

miss-islington commented Jun 14, 2023

Copy link
Copy Markdown
Contributor

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

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 Jun 14, 2023
@miss-islington

miss-islington commented Jun 14, 2023

Copy link
Copy Markdown
Contributor

Sorry, @Eclips4 and @corona10, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker ba516e70c6d156dc59dede35b6fc3db0151780a5 3.11

All reactions

Sorry, something went wrong.

Uh oh!

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

@miss-islington miss-islington assigned corona10 Jun 14, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 14, 2023
@Eclips4 @miss-islington
pythongh-102541: Hide traceback in help prompt (pythongh-102614)
0f5a9af
(cherry picked from commit ba516e7)

Co-authored-by: Kirill Podoprigora <[email protected]>
@bedevere-bot

bedevere-bot commented Jun 14, 2023

Copy link
Copy Markdown

GH-105778 is a backport of this pull request to the 3.12 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.12 only security fixes label Jun 14, 2023
corona10 pushed a commit that referenced this pull request Jun 15, 2023
@miss-islington @Eclips4
[3.12] gh-102541: Hide traceback in help prompt (gh-102614) (gh-105778)
abb4eaa
gh-102541: Hide traceback in help prompt (gh-102614)
(cherry picked from commit ba516e7)

Co-authored-by: Kirill Podoprigora <[email protected]>
@bedevere-bot

bedevere-bot commented Jun 15, 2023

Copy link
Copy Markdown

GH-105830 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 Jun 15, 2023
corona10 pushed a commit to corona10/cpython that referenced this pull request Jun 15, 2023
@Eclips4 @corona10
[3.11] pythongh-102541: Hide traceback in help prompt (pythongh-102614).
b9b058c
(cherry picked from commit ba516e7)

Co-authored-by: Kirill Podoprigora <[email protected]>
corona10 added a commit that referenced this pull request Jun 15, 2023
@corona10 @Eclips4
[3.11] gh-102541: Hide traceback in help prompt (gh-102614). (gh-105830)
abeb589
(cherry picked from commit ba516e7)

Co-authored-by: Kirill Podoprigora <[email protected]>
@Eclips4
Eclips4 deleted the issue-102541 branch June 19, 2023 19:34
@Eclips4 Eclips4 mentioned this pull request Jun 19, 2023
Add is_cli param to pydoc.pyi python/typeshed#10331
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@corona10 corona10 corona10 approved these changes
@ambv ambv Awaiting requested review from ambv
+1 more reviewer
@chgnrdv chgnrdv chgnrdv approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

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

Assignees

@corona10 corona10

Labels

stdlib Standard Library Python modules in the Lib/ directory

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.

7 participants

@Eclips4 @terryjreedy @corona10 @miss-islington @bedevere-bot @chgnrdv @arhadthedev
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.