Repository navigation
Re-enable gdb stubtest - #16813
Merged
Merged
Re-enable gdb stubtest#16813
Conversation
Contributor
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Contributor
Author
|
I've checked the failing check. The only failing check is "stubsabot: dry run", which hit a GitHub API rate limit (403) on an unrelated package (braintree). It doesn't seem related to this change. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #15236
The gdb venv is now created with gdb's own Python (the version is queried from gdb and passed to
uv venv --python). With that fixed, stubtest reported 71 errors that are unrelated to the venv. I fixed the stubs where they were already wrong for 16.3 (checked against the gdb 16.3 sources) and allowlisted what is new or changed in GDB 17.I'm happy to split the stub fixes into a separate PR if that's easier to review.
I used Claude for guidance and review; the changes were written by me.
Detailed changes
tests/stubtest_third_party.pyubuntu-latest).17.1in the version check.stubs/gdb/METADATA.tomlskip = true.stubs/gdb/gdb/__init__.pyi(all present in 16.3)Value: add the missing reflected operators (__rand__,__ror__,__rxor__,__rlshift__,__rrshift__,__rpow__).Architecture.void_type(),Block.subblocks,Symbol.domain,RecordAuxiliaryand the module-levelmissing_file_handlers.RecordGap: renameerror_code/error_stringtoreason_code/reason_string, which is what gdb actually exposes.stubs/gdb/gdb/printing.pyiNoOpStringPrinter.stubs/gdb/gdb/dap/(all present in 16.3)server.pyi: addDeferredRequest, the missingCancellationHandlerandServermethods,call_function_later,export_lineandimport_line; removeCancellationHandler.starting/done, which exist in neither 16.3 nor 17.1.scopes.pyi: the scope references take and storeframeId, not a frame object.events.pyi,startup.pyi,sources.pyi,frames.pyi,launch.pyi: add missing parameters, defaults and definitions.stubs/gdb/@tests/stubtest_allowlist.txtgdb.dap.globalvars,gdb.ptwrite) and a few internal helpers.