Skip to content

Commit 1fa810c

Browse files
committed
Remove old package checker
1 parent 9b0e313 commit 1fa810c

1 file changed

Lines changed: 0 additions & 25 deletions

File tree

cli/polyaxon/_cli/version.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -20,30 +20,6 @@ def pip_upgrade(project_name=PROJECT_CLI_NAME):
2020
Printer.print("polyaxon upgraded!")
2121

2222

23-
def get_version(package: str, show_error: bool = True):
24-
try:
25-
import pkg_resources
26-
except ImportError:
27-
return
28-
29-
try:
30-
return pkg_resources.get_distribution(package).version
31-
except pkg_resources.DistributionNotFound:
32-
if show_error:
33-
logger.error("`%s` is not installed", package)
34-
35-
36-
def check_old_packages():
37-
pkg = "polyaxon-cli"
38-
if get_version(package=pkg, show_error=False):
39-
Printer.error(
40-
"Legacy package `{pkg}` is installed. Please run `pip uninstall {pkg}`".format(
41-
pkg=pkg
42-
),
43-
sys_exit=True,
44-
)
45-
46-
4723
def get_current_version():
4824
return pkg.VERSION
4925

@@ -112,7 +88,6 @@ def check_cli_version(config, is_cli: bool = True):
11288
@clean_outputs
11389
def version(check):
11490
"""Print the current version of the cli and platform."""
115-
check_old_packages()
11691
Printer.heading("Current cli version: {}".format(pkg.VERSION))
11792
if check:
11893
config = set_versions_config()

0 commit comments

Comments
 (0)