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

Python 3.7 support (fix deprecated yaml call) #71

Open
oscarlofwenhamn opened this issue Aug 29, 2019 · 3 comments
Open

Python 3.7 support (fix deprecated yaml call) #71

oscarlofwenhamn opened this issue Aug 29, 2019 · 3 comments

Comments

@oscarlofwenhamn
Copy link

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.

@Langvann
Copy link

Langvann commented Oct 3, 2019

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

@oscarlofwenhamn
Copy link
Author

Thanks for the tip!

@oscarlofwenhamn
Copy link
Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants