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

Remove Python 2.7 deprecation warning. #11713

Merged
merged 2 commits into from
Jan 11, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions kolibri/utils/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,6 @@ def prepend_cext_path(dist_path):
logger.debug("No C extensions are available for this platform")


def check_python_versions():
if sys.version_info.major == 2:
logging.basicConfig(format="%(levelname)s: %(message)s", level=logging.INFO)
logging.StreamHandler(sys.stdout)
logger = logging.getLogger("env")
warning_text = "Python 2.7 support will be dropped in Kolibri 0.17, please upgrade your Python version"
logger.warn(warning_text)
warn(warning_text, DeprecationWarning)


def set_env():
"""
Sets the Kolibri environment for the CLI or other application worker
Expand All @@ -103,8 +93,6 @@ def set_env():
from the distributed version in case it exists before importing anything
else.
"""
check_python_versions()

from kolibri import dist as kolibri_dist # noqa

monkey_patch_collections()
Expand Down
Loading