Description
Describe the bug
The marimo env
command incorrectly displays the OS version as "10" for Windows 11 systems. This issue arises because the platform.release()
function relies on the version of the kernel32.dll
file, which remains unchanged between Windows 10 and Windows 11. As a result, the actual Windows version is not accurately reflected.
Workaround or Plan to Submit a PR
I have identified a solution that involves using sys.getwindowsversion().build
to determine if the OS is Windows 11 and updating the OS Version
field accordingly. I am planning to submit a PR with the necessary changes to fix this issue.
Stack Trace or Screenshots
N/A
Here’s the problematic output:
{
"marimo": "0.3.7",
"OS": "Windows",
"OS Version": "10",
"Processor": "AMD64 Family 25 Model 80 Stepping 0, AuthenticAMD",
"Python Version": "3.11.4",
"Binaries": {
"Browser": "--",
"Node": "v18.17.0"
},
"Requirements": {
"click": "8.1.6",
"importlib-resources": "6.3.2",
"jedi": "0.19.0",
"markdown": "3.6",
"pymdown-extensions": "10.7.1",
"pygments": "2.15.1",
"tomlkit": "0.12.4",
"uvicorn": "0.29.0",
"starlette": "0.37.2",
"websocket": "missing",
"typing-extensions": "4.10.0",
"black": "24.3.0"
}
}
The OS Version
should reflect "11" for Windows 11 systems instead of "10".
Environment
{
"marimo": "0.3.7",
"OS": "Windows",
"OS Version": "10",
"Processor": "AMD64 Family 25 Model 80 Stepping 0, AuthenticAMD",
"Python Version": "3.11.4",
"Binaries": {
"Browser": "--",
"Node": "v18.17.0"
},
"Requirements": {
"click": "8.1.6",
"importlib-resources": "6.3.2",
"jedi": "0.19.0",
"markdown": "3.6",
"pymdown-extensions": "10.7.1",
"pygments": "2.15.1",
"tomlkit": "0.12.4",
"uvicorn": "0.29.0",
"starlette": "0.37.2",
"websocket": "missing",
"typing-extensions": "4.10.0",
"black": "24.3.0"
}
}
Code to reproduce
To reproduce the issue, simply run the marimo env
command on a Windows 11 machine. The command faces issues in displaying when the OS version is 11.
Alternatively, you can use the following minimal reproducible example to observe the issue:
# Example code to reproduce the issue
import platform
def get_system_info():
info = {
"OS": platform.system(),
"OS Version": platform.release(), # This will show "10" on Windows 11
"Processor": platform.processor(),
"Python Version": platform.python_version(),
}
return info
if __name__ == "__main__":
system_info = get_system_info()
print(system_info)
Running this code on a Windows 11 machine will display the incorrect OS version:
python example.py
Expected Output (on Windows 11):
{
"OS": "Windows",
"OS Version": "10", # Incorrectly shows "10" instead of "11"
"Processor": "AMD64 Family 25 Model 80 Stepping 0, AuthenticAMD",
"Python Version": "3.11.4"
}