Skip to content

Commit

Permalink
Deprecate python 3.6 (#5125)
Browse files Browse the repository at this point in the history
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
  • Loading branch information
harupy committed Dec 1, 2021
1 parent 2f35662 commit 85ae465
Showing 1 changed file with 20 additions and 19 deletions.
39 changes: 20 additions & 19 deletions mlflow/__init__.py
Expand Up @@ -27,6 +27,8 @@
For a lower level API, see the :py:mod:`mlflow.tracking` module.
"""
import sys

from mlflow.version import VERSION as __version__ # pylint: disable=unused-import
from mlflow.utils.logging_utils import _configure_mlflow_loggers
import mlflow.tracking._model_registry.fluent
Expand Down Expand Up @@ -97,25 +99,24 @@

_configure_mlflow_loggers(root_module_name=__name__)

# TODO: Uncomment this block when deprecating Python 3.6 support
# _major = 3
# _minor = 6
# _deprecated_version = (_major, _minor)
# _min_supported_version = (_major, _minor + 1)

# if sys.version_info[:2] == _deprecated_version:
# warnings.warn(
# "MLflow support for Python {dep_ver} is deprecated and will be dropped in "
# "an upcoming release. At that point, existing Python {dep_ver} workflows "
# "that use MLflow will continue to work without modification, but Python {dep_ver} "
# "users will no longer get access to the latest MLflow features and bugfixes. "
# "We recommend that you upgrade to Python {min_ver} or newer.".format(
# dep_ver=".".join(map(str, _deprecated_version)),
# min_ver=".".join(map(str, _min_supported_version)),
# ),
# FutureWarning,
# stacklevel=2,
# )
_major = 3
_minor = 6
_deprecated_version = (_major, _minor)
_min_supported_version = (_major, _minor + 1)

if sys.version_info[:2] == _deprecated_version:
warnings.warn(
"MLflow support for Python {dep_ver} is deprecated and will be dropped in "
"an upcoming release. At that point, existing Python {dep_ver} workflows "
"that use MLflow will continue to work without modification, but Python {dep_ver} "
"users will no longer get access to the latest MLflow features and bugfixes. "
"We recommend that you upgrade to Python {min_ver} or newer.".format(
dep_ver=".".join(map(str, _deprecated_version)),
min_ver=".".join(map(str, _min_supported_version)),
),
FutureWarning,
stacklevel=2,
)

ActiveRun = mlflow.tracking.fluent.ActiveRun
log_param = mlflow.tracking.fluent.log_param
Expand Down

0 comments on commit 85ae465

Please sign in to comment.