drop python2 support

- remove python2 from the .travis.yaml file
  - remove python2 from the tox.ini file
  - remove `-y` flag from isort command in update-pycodestle.sh script
  - fix sequence of module imports to fix faiing pycodestyle check in the following files:
    - examples/multiple_clusters.py
    - examples/pick_kube_config_context.py
    - examples/pod_config_list.py
  - testing coverage & codecov tests with python3
  - testing `update-pycodestyle` for python v3.9 and arch ppc6le

Signed-off-by: Priyanka Saggu <priyankasaggu11929@gmail.com>
This commit is contained in:
Priyanka Saggu 2021-05-14 23:38:05 +05:30
parent 4431c4d577
commit 6f097330cf
No known key found for this signature in database
GPG Key ID: 802E62D80FFBD8FC
5 changed files with 16 additions and 6 deletions

View File

@ -24,7 +24,11 @@ jobs:
[[ "${TRAVIS_TAG}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(([ab]|dev|rc)[0-9]+)?$ ]]
- stage: test
python: 3.7
python: 3.9
env: TOXENV=update-pycodestyle
- python: 3.9
env: TOXENV=coverage,codecov
- python: 3.7
env: TOXENV=docs
- python: 3.5
env: TOXENV=py35
@ -60,7 +64,10 @@ jobs:
distributions: sdist bdist_wheel
- stage: test
python: 3.7
python: 3.9
env: TOXENV=update-pycodestyle
arch: ppc64le
- python: 3.7
env: TOXENV=docs
arch: ppc64le
- python: 3.5

View File

@ -18,9 +18,10 @@ Allows you to pick a context and then lists all pods in the chosen context.
Please install the pick library before running this example.
"""
from pick import pick # install pick using `pip install pick`
from kubernetes import client, config
from kubernetes.client import configuration
from pick import pick # install pick using `pip install pick`
def main():

View File

@ -18,9 +18,10 @@ Allows you to pick a context and then lists all pods in the chosen context.
Please install the pick library before running this example.
"""
from pick import pick # install pick using `pip install pick`
from kubernetes import client, config
from kubernetes.client import configuration
from pick import pick # install pick using `pip install pick`
def main():

View File

@ -19,9 +19,10 @@ context includes a cluster, a user, and a namespace.
Please install the pick library before running this example.
"""
from pick import pick # install pick using `pip install pick`
from kubernetes import client, config
from kubernetes.client import configuration
from pick import pick # install pick using `pip install pick`
def main():

View File

@ -67,7 +67,7 @@ done
echo "--- applying isort"
for SOURCE in $SOURCES; do
isort -y $SOURCE
isort $SOURCE
done
echo "--- check pycodestyle (all need to be fixed manually)"