We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent abf850a commit 5adae77Copy full SHA for 5adae77
2 files changed
vm/src/stdlib/sys.rs
@@ -262,6 +262,13 @@ mod sys {
262
version::get_version()
263
}
264
265
+ #[cfg(windows)]
266
+ #[pyattr]
267
+ fn winver(_vm: &VirtualMachine) -> String {
268
+ // Note: This is Python DLL version in CPython, but we arbitrary fill it for compatibility
269
+ version::get_winver_number()
270
+ }
271
+
272
#[pyattr]
273
fn _xoptions(vm: &VirtualMachine) -> PyDictRef {
274
let ctx = &vm.ctx;
vm/src/version.rs
@@ -28,6 +28,10 @@ pub fn get_version_number() -> String {
28
format!("{MAJOR}.{MINOR}.{MICRO}{RELEASELEVEL}")
29
30
31
+pub fn get_winver_number() -> String {
32
+ format!("{MAJOR}.{MINOR}")
33
+}
34
35
pub fn get_compiler() -> String {
36
format!("rustc {}", env!("RUSTC_VERSION"))
37
0 commit comments