builtins: exception, iterator and function attribute surface parity - #950
Merged
Merged
Conversation
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.
Builtin/type surface parity work, rebased onto
mainafter #936 merged.53 files, +2523/-659 across 37 commits.
Themes
sys.excepthookaliases, exception descriptor validation and delete-rejection,AttributeErrorpickle state, mutation-safeUnicodeErrorformatting,ExceptionGroupsequence repr.__pypy__/ memoryview —bufferable,newmemoryview, multidimensional subviews, multidimensionalcountrejection,PickleBufferpublic type surface.__name__/__qualname__/__code__/__dict__deleters raise the setter'sTypeError;method.__class__delete rejected;method.__dir__forwards the underlying function's instance dict;func_set_codewarnsDeprecationWarningwhen the code object changes the callable's kind.int.from_bytesbytes keyword,statfollow_symlinks, coroutine-origin depth keyword, frozen/builtin module APIs,unicodedataUCD type,identity_dictmapping API, float NaN list ordering,eval/AST compile contracts, wrapped builtin method qualification.Rebase notes
Four commits were dropped as already upstream via #936's squash merge (UnionType rich-comparison and identity/iteration slots,
functoolsreduce/cmp_to_key exports, the check.py startup median).One commit —
builtins: describe unraisable destructor errors— was dropped as a deliberate resolution. It replaced the__del__failure report with CPython'sException ignored while calling deallocator ...label andobject=None, butmainmatchespypy/interpreter/executioncontext.py:690line-for-line:The commit carried no test, so the PyPy form was kept. Say so if the CPython wording was intended and it will be restored.
Verification
cargo check --all --no-default-features --features dynasm— clean.Full gates run here in CI.
Commits
— authored by Claude
Summary by CodeRabbit
New Features
functools.cmp_to_keyandreduce, including keyword arguments and callable key wrappers.identity_dict.keys()and.values()support.sys.excepthook.Bug Fixes
os.stathandling for keyword-only symlink behavior.