Files
RustPython/.cspell.dict/rust-more.txt
Jeong, YunWon 7cd4a54e1c Compose native text signatures at compile time from FromArgs (#8807)
* Compose native text signatures at compile time from FromArgs

FromArgs gains a PARAMS const describing its Python parameters.
The derive builds the whole internal doc, `name(sig)\n--\n\ndoc`,
in a const context from those params, and `__text_signature__` /
`__doc__` parse it from the doc. The macro-time string path and the
runtime sig_parts composition are removed.

Signatures follow clinic conventions: `$module` for module functions,
Rust literal defaults rendered as Python reprs, other defaults as
`<unrepresentable>`, and a new `#[pyarg(py_default = "...")]` for the
few fields whose Rust default differs from the Python one. The
`#[pyarg]` keys are documented on the FromArgs derive.

Module functions keep their module object and return it from
`__self__`. PyNativeFunction now traverses its references.

os.stat, os.mkdir, os.listdir, os.open, dict.fromkeys, round, sorted,
int.to_bytes and bytes.hex take arguments matching their signatures.

Assisted-by: Grok:grok-4.7
Assisted-by: Claude:claude-opus-5-5

* Update builtin_signature snippet and fix mkdir on Windows

round and sum now report their FromArgs parameters, so the snippet
asserts their signatures instead of their absence. sum's start is a
PyObjectRef defaulting to int 0 with py_default "0". mkdir reads
dir_fd only on platforms that use it.

Assisted-by: Claude:claude-opus-5-5

* Remove expectedFailure from two signature tests

test_cmp_to_signature and test_autospec_on_bound_builtin_function
now pass. The TestCmpToKeyC override existed only for the marker.

Assisted-by: Claude:claude-opus-5-5
2026-09-24 20:53:28 +09:00

97 lines
749 B
Plaintext

ahash
arrayvec
bidi
biguint
bindgen
bitand
bitflags
bitflagset
bitor
bitvec
bitxor
bstr
byteorder
byteset
caseless
chrono
consts
cranelift
cstring
datelike
deserializer
deserializers
fdiv
flamescope
flate2
fract
getres
hasher
hexf
hexversion
idents
illumos
ilog
indexmap
insta
keccak
lalrpop
lexopt
libc
libcall
libloading
libz
longlong
Manually
maplit
memmap
memmem
metas
modpow
msvc
muldiv
nanos
noalias
nonoverlapping
objclass
peekable
pemfile
powc
powf
powi
prepended
punct
qself
replacen
retag
rmatch
rposition
rsplitn
rustc
rustfmt
rustls
rustyline
seedable
seekfrom
siphash
siphasher
splitn
subsec
thiserror
timelike
timsort
trai
ulonglong
unic
unistd
unraw
unsync
wasip1
wasip2
wasmbind
wasmer
wasmtime
widestring
winapi
winresource
winsock