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 2 is deprecated. Upgrade to Python 3 as soon as possible." message when upgrading gyb #328

Closed
jay-eleven opened this issue Sep 21, 2021 · 0 comments · Fixed by #329

Comments

@jay-eleven
Copy link
Contributor

The install script install-gyb.sh checks for Python2 BEFORE Python3 so a "Python 2 is deprecated" message is shown in Google Cloud Shell that has both versions installed.

I think swapping lines 178 and 182 (ie. checking for Python 3 first) would solve this issue... 🤔

https://github.com/jay0lee/got-your-back/blob/f5207f5cf83a9086ae793170f221fc473dd89bc6/install-gyb.sh#L178-L189

This is the complete upgrade sequence plus a couple of checks:

jay@cloudshell:~$ cat updategyb.sh
bash <(curl -s -S -L https://git.io/gyb-install) -l

jay@cloudshell:~$ ./updategyb.sh
This Linux distribution uses glibc 2.28
Using GYB compiled against glibc2.27

Checking GitHub URL https://api.github.com/repos/jay0lee/got-your-back/releases for latest GYB release (unauthenticated)...

Getting file and download URL...

********************************************************************************
Python 2 is deprecated. Upgrade to Python 3 as soon as possible.
See https://cloud.google.com/python/docs/python2-sunset

To suppress this warning, create an empty ~/.cloudshell/no-python-warning file.
The command will automatically proceed in  seconds or on any key.
********************************************************************************
********************************************************************************
Python 2 is deprecated. Upgrade to Python 3 as soon as possible.
See https://cloud.google.com/python/docs/python2-sunset

To suppress this warning, create an empty ~/.cloudshell/no-python-warning file.
The command will automatically proceed in  seconds or on any key.
********************************************************************************
Downloading file gyb-1.52-linux-x86_64-glibc2.27.tar.xz from https://github.com/jay0lee/got-your-back/releases/download/v1.52/gyb-1.52-linux-x86_64-glibc2.27.tar.xz to /tmp/tmp.nSMEWXAwYG (unauthenticated)...

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   644  100   644    0     0   3558      0 --:--:-- --:--:-- --:--:--  3558
100 20.5M  100 20.5M    0     0  28.4M      0 --:--:-- --:--:-- --:--:-- 28.4M
Extracting archive to /home/jay/bin

Finished extracting GYB archive.

Here's information about your GYB upgrade:

Got Your Back 1.52
https://git.io/gyb
Jay Lee - jay0lee@gmail.com
Python 3.9.7 64-bit final
google-api-client 2.21.0
Linux-5.4.120+-x86_64-with-glibc2.28 x86_64
Path: /home/jay/bin/gyb
OpenSSL 1.1.1l  24 Aug 2021
www.googleapis.com connects using TLSv1.3 TLS_AES_256_GCM_SHA384
GYB upgrade complete!

jay@cloudshell:~$ python
********************************************************************************
Python 2 is deprecated. Upgrade to Python 3 as soon as possible.
See https://cloud.google.com/python/docs/python2-sunset

To suppress this warning, create an empty ~/.cloudshell/no-python-warning file.
The command will automatically proceed in  seconds or on any key.
********************************************************************************
Python 2.7.16 (default, Oct 10 2019, 22:02:15)
[GCC 8.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
jay@cloudshell:~$ python3
Python 3.7.3 (default, Jan 22 2021, 20:04:44)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
jay@cloudshell:~$
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.

1 participant