Original issue. Resolved in the reported scope. The raw dict.__dict__["fromkeys"] descriptor has type classmethod_descriptor; the bound dict.fromkeys has type builtin_function_or_method. Binding and representative additional native descriptors agree with CPython.
Independently rechecked on October 6, 2026 (KST): fresh inputs, results and scope.
- Source and standard library:
f39b054b9c8c. - Verified October 5, 2026 on macOS 26.5.2 ARM64.
- RustPython: 0.6.1, Python 3.14.0.alpha; native ARM64.
- Comparison: CPython 3.14.6 ARM64.
Use absolute paths for the variables below:
RP: the RustPython executable for this commit.CP: the CPython 3.14.6 executable.SRC: the source directory at this commit, including its matchingLib.CASE: the directory containing the files shown below.
Shell variables replace recorded absolute paths. Export them so the Python inputs can use them:
export RP CP SRC CASE
unset PYTHONPATH PYTHONHOME PYTHONWARNINGS PYTHONSTARTUP
export PYTHONDONTWRITEBYTECODE=1Save as 4690-original.py.
print(type(dict.__dict__["fromkeys"]))
print(type(dict.fromkeys))cd "$SRC"RustPython:
RUSTPYTHONPATH="$SRC/Lib" "$RP" -B "$CASE/4690-original.py"CPython:
"$CP" -B "$CASE/4690-original.py"Expected: The raw dict.fromkeys descriptor must be classmethod_descriptor, while the bound method remains builtin_function_or_method.
Exit code: 0. No timeout.
stdout:
<class 'classmethod_descriptor'>
<class 'builtin_function_or_method'>
stderr:
No output.
Previously recorded at 8ff947e83a65; exit code 0. This run was not repeated alongside the current results. Historical inputs may differ from the expanded checks above.
stdout:
classmethod
method
PR #8780: native OrderedDict and class-method descriptors.
First fixing commit: not established.
Recorded executable SHA-256 values:
-
RustPython:
a40f4d564f9c53ffcc4ec27c1a61ae3261b68cf3286f511a2ad39fb7f60c9b99. -
CPython:
58eea46bd68c84e30980ca1133d1b0efb139c878a4934a519dba0846b74069ef.
AI assistance: OpenAI Codex.