Wikifunctions:Python implementations
Appearance
You can do most things that work in Rustpython which is used under the hood.
- "RustPython is in development, and while the interpreter certainly can be used in interesting use cases like running Python in WASM and embedding into a Rust project, do note that RustPython is not totally production-ready." source
See https://rustpython.github.io/pages/whats-left for an overview of missing built-in modules.
Error handling
Open questions as of October 2024
- How to cast a string to a Wikidata item reference (Z6091)? (raised in telegram)
Known limitations as of October 2024
- The serialization of code to JSON is buggy. For now we have to escape backward slash '\' in regexes. See https://phabricator.wikimedia.org/T371561
Modules
Only built-in python modules in RustPython is supported (installation of modules is not supported)
This is by design to avoid reproducibility issues and bugs caused by different module versions.
HTTP connections
Disabled by design for security and reproducibility reasons.
- the built-in module http.client does not work. Because of that it is currently not possible to make ANY HTTP requests from implementations. See https://phabricator.wikimedia.org/T371484