python_version#

python_version()[source]#

Python version requirement specifier for the object (PEP 440).

Part of packaging metadata for the object.

  • String name: "python_version"

  • Private tag, developer and framework facing

  • Values: PEP 440 compliant version specifier

  • Example: ">=3.10"

  • Default: no restriction

sktime manages objects and estimators like mini-packages, with their own dependencies and compatibility requirements. Dependencies are specified in the tags:

  • "python_version": Python version specifier (PEP 440) for the object,

  • "python_dependencies": list of required Python packages (PEP 440)

  • "python_dependencies_alias": alias for package names, if different from import names

  • "env_marker": environment marker for the object (PEP 508)

  • "requires_cython": whether the object requires a C compiler present

The python_version tag of an object is a PEP 440 compliant version specifier string, specifying python version compatibility of the object.

The tag is used in packaging metadata for the object, and is used internally to check compatibility of the object with the build environment, to raise informative error messages.

Developers can use _check_python_version from skbase.utils.dependencies to check compatibility of the python constraint of the object with the current build environment, or _check_estimator_deps to check compatibility of the object (including further checks) with the current build environment.