Skip to content

gh-105895: Add match and case to help topics - #132784

Closed
dzherb wants to merge 9 commits into
python:mainfrom
dzherb:gh-132783-match-help
Closed

gh-105895: Add match and case to help topics#132784
dzherb wants to merge 9 commits into
python:mainfrom
dzherb:gh-132783-match-help

Conversation

@dzherb

@dzherbdzherb commented Apr 21, 2025

Copy link
Copy Markdown
Contributor

@python-cla-bot

python-cla-botBot commented Apr 21, 2025

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@dzherb

Copy link
Copy Markdown
ContributorAuthor

I'm not sure if I should also commit the autogenerated topics.py

@dzherb

dzherb commented Apr 21, 2025

Copy link
Copy Markdown
ContributorAuthor

This test case fails not due to unsorted keywords, but because match and case are not present in keyword.kwlist. Instead, they are listed in keyword.softkwlist, along with entries like type and _.

classTestHelper(unittest.TestCase):
deftest_keywords(self):
self.assertEqual(sorted(pydoc.Helper.keywords),
sorted(keyword.kwlist))

I suggest splitting this into two separate cases:

classTestHelper(unittest.TestCase):
deftest_keywords_are_sorted(self):
self.assertEqual(
sorted(pydoc.Helper.keywords),
list(pydoc.Helper.keywords),
)
deftest_keywords_in_grammar(self):
all_keywords=set(keyword.kwlist) |set(keyword.softkwlist)
forkwinpydoc.Helper.keywords:
self.assertIn(kw, all_keywords)

@bedevere-app

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@sobolevnsobolevn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I checked out this PR and tried:

Снимок экрана 2025-05-06 в 15 21 31

I think that you need to regen pydoc-topics with: make -C Doc pydoc-topics

It might take a while.

Also, add a NEWS entry (see #132784 (comment) about how to do that) and change the issue number :) I will update you PR title for you to match the original issue #132783

@sobolevnsobolevn changed the title gh-132783: Add match and case to help topicsgh-105895: Add match and case to help topicsMay 6, 2025
@bedevere-app

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

Comment threadLib/pydoc.py Outdated
@dzherb
dzherb requested a review from sobolevnMay 7, 2025 11:57
@dzherb

Copy link
Copy Markdown
ContributorAuthor

@sobolevn could you please look at the last changes? Is everything ok?

@sobolevnsobolevn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, but I can't merge this PR. Since I am not an expert in pydoc and I need someone who knows how it actually works to verify :)

@StanFromIrelandStanFromIreland left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There are conflicts that need to be fixed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please revert changes to this file, they will be automatically done before a release.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please move to "Library"

@hugovk
hugovk removed their request for review April 6, 2026 12:45
@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actionsgithub-actionsBot added the stale Stale PR or inactive for long period of time. label May 14, 2026
@StanFromIreland

Copy link
Copy Markdown
Member

Closing, changes haven't been made.

@sobolevn

Copy link
Copy Markdown
Member

I will take this over and credit @dzherb for their work :)

sobolevn added a commit to sobolevn/cpython that referenced this pull request Jun 24, 2026
Originally published in python#132784
Co-authored-by: dzherb <zherbin.dima@yandex.ru>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting reviewstaleStale PR or inactive for long period of time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@dzherb@StanFromIreland@sobolevn