File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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-
4723def get_current_version ():
4824 return pkg .VERSION
4925
@@ -112,7 +88,6 @@ def check_cli_version(config, is_cli: bool = True):
11288@clean_outputs
11389def 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 ()
You can’t perform that action at this time.
0 commit comments