diff --git a/.travis.yml b/.travis.yml index 7b9c365d..29c47cb3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ cache: - pip language: python python: -- '3.9' +- '3.10-dev' env: global: - COVERALLS_PARALLEL=true @@ -19,21 +19,15 @@ after_success: jobs: include: - stage: lint - python: '3.9' + python: '3.10-dev' install: - pip install tox-travis - script: tox -e py27-lint - env: - - TEST_SUITE=lint - - python: '3.9' - install: - - pip install tox-travis - script: tox -e py35-lint + script: tox -e py310-lint env: - TEST_SUITE=lint - stage: deploy script: skip - python: '3.9' + python: '3.10-dev' deploy: provider: pypi user: openshift @@ -44,7 +38,7 @@ jobs: repo: openshift/openshift-restclient-python condition: "$TRAVIS_TAG =~ ^v[0-9]+\\.[0-9]+\\.[0-9]+(([ab]|dev|rc)[0-9]+)?$" - stage: test-deploy - python: '3.9' + python: '3.10-dev' script: python -c "import openshift ; print(openshift.__version__)" install: - pip install openshift diff --git a/openshift/__init__.py b/openshift/__init__.py index c40d6957..e1ff0719 100644 --- a/openshift/__init__.py +++ b/openshift/__init__.py @@ -14,5 +14,5 @@ # Do not edit these constants. They will be updated automatically # by scripts/update-version.sh. -__version__ = "0.10.0dev1" -__k8s_client_version__ = "9.0.0" +__version__ = "0.13.2" +__k8s_client_version__ = "21.7.0" diff --git a/openshift/dynamic/discovery.py b/openshift/dynamic/discovery.py index 3c7cce3a..46b04700 100644 --- a/openshift/dynamic/discovery.py +++ b/openshift/dynamic/discovery.py @@ -130,7 +130,7 @@ def get_resources_for_api_version(self, prefix, group, version, preferred): resources_raw = list(filter(lambda resource: '/' not in resource['name'], resources_response)) subresources_raw = list(filter(lambda resource: '/' in resource['name'], resources_response)) for subresource in subresources_raw: - resource, name = subresource['name'].split('/') + resource, name = subresource['name'].split('/', 1) if not subresources.get(resource): subresources[resource] = {} subresources[resource][name] = subresource diff --git a/openshift/helper/hashes.py b/openshift/helper/hashes.py index 4df7dc5b..bc47f05e 100644 --- a/openshift/helper/hashes.py +++ b/openshift/helper/hashes.py @@ -30,11 +30,11 @@ def generate_hash(resource): resource['name'] = resource.get('metadata', {}).get('name', '') if resource['kind'] == 'ConfigMap': marshalled = marshal(sorted_dict(resource), ['data', 'kind', 'name']) - del(resource['name']) + del resource['name'] return encode(marshalled) if resource['kind'] == 'Secret': marshalled = marshal(sorted_dict(resource), ['data', 'kind', 'name', 'type']) - del(resource['name']) + del resource['name'] return encode(marshalled) raise NotImplementedError diff --git a/python-openshift.spec b/python-openshift.spec index 76f94435..ec944ae1 100644 --- a/python-openshift.spec +++ b/python-openshift.spec @@ -16,7 +16,7 @@ %endif Name: python-%{library} -Version: 0.10.0dev1 +Version: 0.13.2 Release: 1%{?dist} Summary: Python client for the OpenShift API License: ASL 2.0 diff --git a/requirements.txt b/requirements.txt index 88b960cb..c17b2a91 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,3 @@ -jinja2 -kubernetes +kubernetes ~= 21.7.0 python-string-utils -ruamel.yaml six -requests -requests-oauthlib diff --git a/scripts/constants.py b/scripts/constants.py index 8c22e5e8..ff77f84b 100644 --- a/scripts/constants.py +++ b/scripts/constants.py @@ -23,8 +23,8 @@ # client version for packaging and releasing. It can # be different than SPEC_VERSION. -CLIENT_VERSION = "0.10.0dev1" -KUBERNETES_CLIENT_VERSION = "10.0.1" +CLIENT_VERSION = "0.13.2" +KUBERNETES_CLIENT_VERSION = "21.7.0" # Name of the release package PACKAGE_NAME = "openshift" diff --git a/setup.py b/setup.py index 0def000f..0d0c56a9 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ # Do not edit these constants. They will be updated automatically # by scripts/update-client.sh. -CLIENT_VERSION = "0.10.0dev1" +CLIENT_VERSION = "0.13.2" PACKAGE_NAME = "openshift" DEVELOPMENT_STATUS = "3 - Alpha" @@ -46,7 +46,7 @@ def extract_requirements(filename): license="Apache License Version 2.0", url="https://github.com/openshift/openshift-restclient-python", keywords=["Swagger", "OpenAPI", "Kubernetes", "OpenShift"], - install_requires=extract_requirements('requirements.txt'), + install_requires=['kubernetes >= 12.0', 'python-string-utils', 'six'], packages=find_packages(include='openshift.*'), long_description='Python client for OpenShift http://openshift.redhat.com/', classifiers=[ diff --git a/tox.ini b/tox.ini index d2139f62..bac50fee 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ [tox] envlist = + py310-lint py39-lint py39-openshift-unit @@ -9,6 +10,7 @@ deps = -rrequirements.txt -rtest-requirements.txt py39-lint: flake8-bugbear + py310-lint: flake8-bugbear whitelist_externals = /bin/bash