version — functions
What this package is, and what the library behind it is.
Three version numbers matter here and they are not the same thing:
__version__ this Python package
sdk_version the SDK product version of the loaded library
abi_version the C ABI version, in optris_sdk._native
The package version tracks the SDK release it was generated from, so that a bug report quoting it identifies the ABI as well. The ABI version is what decides whether this package can call that library at all, and it is checked at import.
sdk_version()
The loaded SDK's product version as (major, minor, patch).
sdk_version_string()
The loaded SDK's product version for display, e.g. 12.0.0.
sdk_c_abi_version()
The C ABI version the loaded library implements, asked now.
The same number as optris_sdk.abi_version, which is captured
once at import because that is when a library older than this
package has to be refused -- the import-time check is what makes a
mismatch a load failure instead of a missing symbol at the first
call.
This is the live query, and it exists for the same reason Rust has
abi_version() beside its ABI_VERSION constant and .NET has
Sdk.ApiVersion: a diagnostic that reports what the process is
talking to should read the library, not a value it was told
earlier. The two can only differ if something reloaded the library
underneath this package, which nothing here does -- so a
difference is a finding rather than a case to handle.