Repository: pola-rs/polars
File: py-polars/polars/meta/versions.py (Python)

Code before:
    adbc_driver_manager:  0.11.0
    altair:               5.4.0
    cloudpickle:          3.0.0
    connectorx:           0.3.2
    deltalake:            0.17.1
    fastexcel:            0.10.4
    fsspec:               2023.12.2
    gevent:               24.2.1
    matplotlib:           3.8.4
    numpy:                1.26.4
    openpyxl:             3.1.2
    pandas:               2.2.2
    pyarrow:              16.0.0
    pydantic:             2.7.1
    pyiceberg:            0.7.1
    sqlalchemy:           2.0.29
    torch:                2.2.2
    xlsx2csv:             0.8.2
    xlsxwriter:           3.2.0
    """  # noqa: W505
    # Note: we import 'platform' here (rather than at the top of the
    # module) as a micro-optimization for polars' initial import
    import platform

    deps = _get_dependency_list()
    core_properties = ("Polars", "Index type", "Platform", "Python", "Runtime Compat")
    keylen = max(len(x) for x in [*core_properties, "Azure CLI", *deps]) + 1

    print("--------Version info---------")
    print(f"{'Polars:':{keylen}s} {get_polars_version()}")
    print(f"{'Index type:':{keylen}s} {get_index_type()}")
    print(f"{'Platform:':{keylen}s} {platform.platform()}")
    print(f"{'Python:':{keylen}s} {sys.version}")
    print(f"{'Runtime Compat:':{keylen}s} {is_runtime_compat()}")

    print("\n----Optional dependencies----")

    from polars.io.cloud.credential_provider import CredentialProviderAzure

    print(f"{'Azure CLI':{keylen}s} ", end="", flush=True)
    print(CredentialProviderAzure._azcli_version() or "<not installed>")

    for name in deps:
        print(f"{name:{keylen}s} ", end="", flush=True)
        print(_get_dependency_version(name))


# See the list of dependencies in pyproject.toml.
def _get_dependency_list() -> list[str]:
    return [
        "adbc_driver_manager",

Review comment (suggestion):
I think this should be a field `Runtime` giving `rt32`, `rt64` or `rtcompat` string. Or at least something more interpretable than "Runtime Compat".

Code after:
    adbc_driver_manager:  0.11.0
    altair:               5.4.0
    cloudpickle:          3.0.0
    connectorx:           0.3.2
    deltalake:            0.17.1
    fastexcel:            0.10.4
    fsspec:               2023.12.2
    gevent:               24.2.1
    matplotlib:           3.8.4
    numpy:                1.26.4
    openpyxl:             3.1.2
    pandas:               2.2.2
    pyarrow:              16.0.0
    pydantic:             2.7.1
    pyiceberg:            0.7.1
    sqlalchemy:           2.0.29
    torch:                2.2.2
    xlsx2csv:             0.8.2
    xlsxwriter:           3.2.0
    """  # noqa: W505
    # Note: we import 'platform' here (rather than at the top of the
    # module) as a micro-optimization for polars' initial import
    import platform

    deps = _get_dependency_list()
    core_properties = ("Polars", "Index type", "Platform", "Python", "Runtime")
    keylen = max(len(x) for x in [*core_properties, "Azure CLI", *deps]) + 1

    print("--------Version info---------")
    print(f"{'Polars:':{keylen}s} {get_polars_version()}")
    print(f"{'Index type:':{keylen}s} {get_index_type()}")
    print(f"{'Platform:':{keylen}s} {platform.platform()}")
    print(f"{'Python:':{keylen}s} {sys.version}")
    print(f"{'Runtime:':{keylen}s} {get_runtime_repr()}")

    print("\n----Optional dependencies----")

    from polars.io.cloud.credential_provider import CredentialProviderAzure

    print(f"{'Azure CLI':{keylen}s} ", end="", flush=True)
    print(CredentialProviderAzure._azcli_version() or "<not installed>")

    for name in deps:
        print(f"{name:{keylen}s} ", end="", flush=True)
        print(_get_dependency_version(name))


# See the list of dependencies in pyproject.toml.
def _get_dependency_list() -> list[str]:
    return [
        "adbc_driver_manager",