kube-shell icon indicating copy to clipboard operation
kube-shell copied to clipboard

Python 3.7 support (fix deprecated yaml call)

Open oscarlofwenhamn opened this issue 6 years ago • 3 comments

When starting kube-shell i get the following warnings:

c:\python37\lib\site-packages\kubernetes\config\kube_config.py:280: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  config_dict=yaml.load(f),
c:\python37\lib\site-packages\kubeshell\kubeshell.py:43: YAMLLoadWarning: calling yaml.load_all() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  for doc in docs:

Since they reference YAMLLoadWarning: calling yaml.load_all() without Loader being deprecated I am guessing this is a question of updating to new 3.7 standards.

However, I am noticing the last commit was sept 19 2018, so I understand if this is a dead project.

oscarlofwenhamn avatar Aug 29 '19 08:08 oscarlofwenhamn

Add the following to kubeshell.py and kube_config.py to suppress warnings: yaml.warnings({'YAMLLoadWarning': False})

Langvann avatar Oct 03 '19 12:10 Langvann

Thanks for the tip!

oscarlofwenhamn avatar Oct 04 '19 11:10 oscarlofwenhamn

However, is this something that can be done after installing the script or does it require cloning and rebuildning? Would it be worth adding to the source repo?

oscarlofwenhamn avatar Oct 07 '19 07:10 oscarlofwenhamn