We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db1adaa commit 609d99fCopy full SHA for 609d99f
vm/src/stdlib/sys.rs
@@ -229,11 +229,13 @@ mod sys {
229
230
#[pyattr]
231
fn implementation(vm: &VirtualMachine) -> PyRef<PyNamespace> {
232
- // TODO: Add crate version to this namespace
+ const NAME: &str = "rustpython";
233
+
234
+ let cache_tag = format!("{NAME}-{}{}", version::MAJOR, version::MINOR);
235
let ctx = &vm.ctx;
236
py_namespace!(vm, {
- "name" => ctx.new_str(ascii!("rustpython")),
- "cache_tag" => ctx.new_str(ascii!("rustpython-01")),
237
+ "name" => ctx.new_str(NAME),
238
+ "cache_tag" => ctx.new_str(cache_tag),
239
"_multiarch" => ctx.new_str(MULTIARCH.to_owned()),
240
"version" => version_info(vm),
241
"hexversion" => ctx.new_int(version::VERSION_HEX),
0 commit comments