Snakepit.PythonVersion (Snakepit v0.13.0)

Copy Markdown View Source

Detects the active Python runtime version and recommends worker profiles.

Legacy Optional Module

Snakepit does not call this module internally. It remains available for compatibility and may be removed in v0.16.0 or later.

Prefer Snakepit.PythonRuntime for runtime resolution and explicit worker-profile selection in your application configuration.

Summary

Types

version()

@type version() :: {non_neg_integer(), non_neg_integer(), non_neg_integer()}

Functions

detect()

@spec detect() :: {:ok, version()} | {:error, term()}

detect(path)

@spec detect(binary()) :: {:ok, version()} | {:error, term()}

recommend_profile()

@spec recommend_profile() :: :process | :thread

recommend_profile(version)

@spec recommend_profile(version()) :: :process | :thread

supports_free_threading?(version)

@spec supports_free_threading?(version()) :: boolean()

validate()

@spec validate() :: :ok | {:error, term()}