[pony] Fix stubtest failures with pony 0.7.20 - #16176
Merged
Merged
Conversation
pony 0.7.20 renamed the first parameter of most methods from domain-specific names (translator, attr, wrapper, monad, ...) to `self` (and to `cls` on EntityMeta), which produced 924 stubtest errors on the daily run (python#16175). - Rename first parameters to `self`/`cls` across the pony stubs - Add symbols new in 0.7.20: py23compat.PY313/PY314, Decompiler opcode handlers (CALL_KW, CONVERT_VALUE, FORMAT_SIMPLE, FORMAT_WITH_SPEC, LOAD_FAST_BORROW*, LOAD_FAST_LOAD_FAST, LOAD_SMALL_INT, POP_JUMP_IF_(NOT_)NONE, SET_FUNCTION_ATTRIBUTE, STORE_FAST_LOAD_FAST, STORE_FAST_STORE_FAST, TO_BOOL), decompiling.direct_jump_to_loop_ops / double_load_store_ops / slice_to_ast, QueryResultIterator.__iter__, utils.IntegerGenerator / PersistentPickler / PersistentUnpickler - Match runtime defaults for Decompiler.CALL_FUNCTION_EX(argc=1) and MAKE_FUNCTION(argc=0) Verified locally against pony==0.7.20: stubtest_third_party.py pony passes (was 924 errors), mypy_test.py stubs/pony and pyright pass, ruff check clean.
This comment has been minimized.
This comment has been minimized.
Collaborator
|
We should also bump the version in |
Contributor
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Contributor
Author
|
Hope this is what you wanted |
srittau
approved these changes
Aug 10, 2026
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 the
ponypart of #16175 (the daily stubtest run also reports a separatesetuptoolsfailure, not addressed here).pony 0.7.20 (released 2026-08-09) renamed the first parameter of most methods from domain-specific names (
translator,attr,wrapper,monad,decompiler, ...) toself— and toclsonEntityMeta— which produced 924 stubtest errors. This updates the stubs to match the 0.7.20 runtime.Changes
self/clsacross the pony stubs (888self, 10cls)py23compat.PY313/PY314Decompileropcode handlers:CALL_KW,CONVERT_VALUE,FORMAT_SIMPLE,FORMAT_WITH_SPEC,LOAD_FAST_BORROW,LOAD_FAST_BORROW_LOAD_FAST_BORROW,LOAD_FAST_LOAD_FAST,LOAD_SMALL_INT,POP_JUMP_IF_NONE,POP_JUMP_IF_NOT_NONE,SET_FUNCTION_ATTRIBUTE,STORE_FAST_LOAD_FAST,STORE_FAST_STORE_FAST,TO_BOOLdecompiling.direct_jump_to_loop_ops/double_load_store_ops/slice_to_astcore.QueryResultIterator.__iter__utils.utils.IntegerGenerator/PersistentPickler/PersistentUnpicklerDecompiler.CALL_FUNCTION_EX(argc=1)andMAKE_FUNCTION(argc=0)Verification (local, pony==0.7.20)
tests/stubtest_third_party.py pony— passes (924 errors before)tests/mypy_test.py stubs/pony— successtests/pyright_test.py stubs/pony— 0 errorsruff check stubs/pony— clean