Skip to content

[stubsabot] Support "Removal" PRs #14401

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 13 commits into from
Jul 16, 2025
Merged

Conversation

donBarbos
Copy link
Contributor

@donBarbos donBarbos commented Jul 12, 2025

discuss: #14402

@donBarbos donBarbos changed the title Support "Removal" PRs for stubsbot Add "Removal" PRs to stubsbot Jul 12, 2025
@donBarbos donBarbos marked this pull request as ready for review July 12, 2025 13:24
@donBarbos donBarbos changed the title Add "Removal" PRs to stubsbot [stubsabot] Support "Removal" PRs Jul 12, 2025
Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

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

Looks good to me, except for a few (debatable) nits.

Comment on lines +511 to +515
try:
with metadata_path(distribution).open("rb") as file:
data = tomlkit.load(file)
except FileNotFoundError:
raise NoSuchStubError(f"Typeshed has no stubs for {distribution!r}!") from None
Copy link
Collaborator

Choose a reason for hiding this comment

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

Note for later: We should probably extract that into a separate function in ts_utils.metadata. This is used several times in a few files. But in a later PR, not here.

if not comment:
return False

release_date_string = comment.removeprefix("# Released on ")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Note: This is probably also something that we should put into metadata (possibly as a structured obsolete field with since_version and since_date fields), but again in a later PR.

@donBarbos
Copy link
Contributor Author

Thank you!

@srittau srittau merged commit 82e2e9c into python:main Jul 16, 2025
46 checks passed
donBarbos added a commit to donBarbos/typeshed that referenced this pull request Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants