For some modules, having pure python module is easier than rust natve one. In that case, we probably still want to have rust version of that modules due to safety or performance.
Maybe a simple solution for one or more Python implementations would be the following procedure:
a list of all modules (names) implemented in Rust
a typing.Dict[str, typing.Set[str]] of module names and module root directories (set is useful to test multiple different python implementations if ever needed (mostly for extensibility, I guess).
for every combination of modules, create a Lib directory with symlinks to the required module implementation root directories.
run the tests with RUSTPYTHONPATH set
Note: This only works if the modules in a Lib dir are preferred over built-in modules written in Rust. I don't know details like this about RustPython.
If that is the case, I could write a short python script to demonstrate the procedure above to make things clearer. Code says more than thousand words...
Summary
For some modules, having pure python module is easier than rust natve one. In that case, we probably still want to have rust version of that modules due to safety or performance.
_io
: Use _pyio.py as the base for our _io implementation #1821json
: Replace the json module with the Python implementation from CPython #1839Detailed Explanation
Drawbacks, Rationale, and Alternatives
Unresolved Questions
We need to decide:
Technical support for testing both module with same test script would be great to manage the quality of incubating modules.
The text was updated successfully, but these errors were encountered: