Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate python 3.6 #5125

Merged
merged 1 commit into from Dec 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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