bittensor.utils.version#

Attributes#

Exceptions#

VersionCheckError

Common base class for all non-exit exceptions.

Functions#

_get_version_file_path()

_get_version_from_file(version_file)

_get_version_from_pypi([timeout])

get_and_save_latest_version([timeout])

check_version([timeout])

Check if the current version of Bittensor is up to date with the latest version on PyPi.

version_checking([timeout])

Deprecated, kept for backwards compatibility. Use check_version() instead.

Module Contents#

bittensor.utils.version.VERSION_CHECK_THRESHOLD = 86400#
exception bittensor.utils.version.VersionCheckError[source]#

Bases: Exception

Common base class for all non-exit exceptions.

Initialize self. See help(type(self)) for accurate signature.

bittensor.utils.version._get_version_file_path()[source]#
Return type:

pathlib.Path

bittensor.utils.version._get_version_from_file(version_file)[source]#
Parameters:

version_file (pathlib.Path)

Return type:

Optional[str]

bittensor.utils.version._get_version_from_pypi(timeout=15)[source]#
Parameters:

timeout (int)

Return type:

str

bittensor.utils.version.get_and_save_latest_version(timeout=15)[source]#
Parameters:

timeout (int)

Return type:

str

bittensor.utils.version.check_version(timeout=15)[source]#

Check if the current version of Bittensor is up to date with the latest version on PyPi. Raises a VersionCheckError if the version check fails.

Parameters:

timeout (int)

bittensor.utils.version.version_checking(timeout=15)[source]#

Deprecated, kept for backwards compatibility. Use check_version() instead.

Parameters:

timeout (int)