Skip to content

Conversation

Eclips4
Copy link
Member

@Eclips4 Eclips4 commented Mar 11, 2023

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.

@Eclips4
Copy link
Member Author

Eclips4 commented Mar 13, 2023

Could someone review it? =)

@Eclips4
Copy link
Member Author

Eclips4 commented Mar 17, 2023

@sobolevn
Can you review it?

@arhadthedev arhadthedev added the stdlib Standard Library Python modules in the Lib/ directory label Mar 22, 2023
@Eclips4
Copy link
Member Author

Eclips4 commented May 14, 2023

Can someone from core developers review it?

@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
Copy link
Member

terryjreedy commented Jun 12, 2023

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.

@corona10
Copy link
Member

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

Copy link
Member

@corona10 corona10 left a 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. :)

@corona10
Copy link
Member

Please rebase the PR.

@corona10 corona10 merged commit ba516e7 into python:main Jun 14, 2023
@miss-islington
Copy link
Contributor

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

@miss-islington
Copy link
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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 14, 2023
(cherry picked from commit ba516e7)

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

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

@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
gh-102541: Hide traceback in help prompt (gh-102614)
(cherry picked from commit ba516e7)

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

GH-105830 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 Jun 15, 2023
corona10 pushed a commit to corona10/cpython that referenced this pull request Jun 15, 2023
(cherry picked from commit ba516e7)

Co-authored-by: Kirill Podoprigora <[email protected]>
corona10 added a commit that referenced this pull request Jun 15, 2023
(cherry picked from commit ba516e7)

Co-authored-by: Kirill Podoprigora <[email protected]>
@Eclips4 Eclips4 deleted the issue-102541 branch June 19, 2023 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Standard Library Python modules in the Lib/ directory
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants