* Align contextvars, CLI startup, and stat validation with CPython
Validate Context and ContextVar arguments and mapping keys, hash names through the Python protocol, and preserve string contents without invoking __str__. Set the main module loader for command and stdin execution, report missing scripts with exit status 2, and reject file descriptors combined with follow_symlinks=False.
Enable the nine corresponding stdlib regression tests.
Assisted-by: Codex:gpt-6
* Move set_main_builtin_importer off the compiler feature
Define the method in vm_new.rs so builds without rustpython-compiler,
such as example_projects/barebone, can compile. Also set BuiltinImporter
on an existing __main__ when its loader is missing or None.
Assisted-by: Grok:4.6
* Fix /dev/fd, rlimit, spawn scheduler, and context cache
Honor PYTHONEXECUTABLE when computing sys.executable.
Rewind the file offset after a pyc magic probe.
Stop masking rlimit values with RLIM_INFINITY.
Print the pyrepl-unavailable warning before the rustyline shell.
Parse posix_spawn scheduler and apply it where the host supports it.
Update ContextVar cache fields under one lock.
Remove expectedFailure and skip markers for tests that now pass.
Assisted-by: Grok:4.6
* address review: check rlim_t overflow on convert
Replace the u64-to-rlim_t as-cast in py2rlim_limit with
a checked try_from, matching py2rlim.
Assisted-by: Grok:4.6
* add __basicsize__ getter
* modify best_base function to get proper base
* inherit basicsize from the base type
---------
Signed-off-by: snowapril <sinjihng@gmail.com>
Initially this is only meant to be a small update for `test_io.py`.
But it turns out that `test.support` need a lot of cleanup especially
for `test.support.warnings_helper`.
Check key and value before calling `env::set_var`
From doc of `env::set_var`,
```
This function may panic if `key` is empty, contains an ASCII equals sign
`'='` or the NUL character `'\0'`, or when the value contains the NUL
character.
```