Skip to content

Commit e82ec1d

Browse files
Merge pull request #24 from IBM/upg-python
chore: upgraded the minimum supported version of python to 3.6
2 parents 52a6a79 + b80a289 commit e82ec1d

File tree

12 files changed

+33
-55
lines changed

12 files changed

+33
-55
lines changed

.dl_env.enc

-912 Bytes
Binary file not shown.

.travis.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@ cache: pip
66

77
matrix:
88
include:
9-
- python: 3.5
9+
- python: 3.6
1010
before_script:
1111
- >-
1212
[ -z "${TRAVIS_TAG}" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]
1313
&& openssl aes-256-cbc -K $encrypted_fc092b9428d6_key -iv $encrypted_fc092b9428d6_iv -in cis.env.enc -out cis.env -d
1414
&& openssl aes-256-cbc -K $encrypted_d4a185972ecc_key -iv $encrypted_d4a185972ecc_iv -in pdns.env.enc -out pdns.env -d
1515
&& openssl aes-256-cbc -K $encrypted_16de86179301_key -iv $encrypted_16de86179301_iv -in .transit_env.enc -out .transit_env -d
16-
&& openssl aes-256-cbc -K $encrypted_b4d7fa377f59_key -iv $encrypted_b4d7fa377f59_iv -in .dl_env.enc -out .dl_env -d
16+
&& openssl aes-256-cbc -K $encrypted_27cb64608ff6_key -iv $encrypted_27cb64608ff6_iv -in dl.env.enc -out dl.env -d
1717
|| true
1818
[ -z "${TRAVIS_TAG}" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]
1919
&& openssl aes-256-cbc -K $encrypted_89a9eb4f9417_key -iv $encrypted_89a9eb4f9417_iv -in dns.env.enc -out dns.env -d || true
20-
- python: 3.6
2120
- python: 3.7
2221
- python: 3.8
22+
- python: 3.9
2323

2424
before_install:
2525
- npm install npm@latest -g
@@ -45,7 +45,7 @@ deploy:
4545
script: npx semantic-release
4646
skip_cleanup: true
4747
on:
48-
python: '3.5'
48+
python: '3.6'
4949
branch: master
5050

5151
- provider: pypi
@@ -54,5 +54,5 @@ deploy:
5454
repository: https://upload.pypi.org/legacy
5555
skip_cleanup: true
5656
on:
57-
python: '3.5'
57+
python: '3.6'
5858
tags: true

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ IBM Cloud services:
9393

9494
- An [IBM Cloud][ibm-cloud-onboarding] account.
9595
- An IAM API key to allow the SDK to access your account. Create one [here](https://cloud.ibm.com/iam/apikeys).
96-
- Python 3.5.3 or above.
96+
- Python 3.6 or above.
9797

9898
## Installation
9999

dl.env.enc

784 Bytes
Binary file not shown.

ibm_cloud_networking_services/common.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def get_user_agent():
4646

4747

4848
def get_sdk_headers(service_name, service_version, operation_id):
49+
#pylint: disable=unused-argument
4950
"""
5051
Get the request headers to be sent in requests by the SDK.
5152

requirements-dev.txt

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
# test dependencies
2-
pytest>=2.8.2
3-
responses>=0.10
4-
python_dotenv>=0.1.5
5-
pylint>=1.4.4
6-
tox>=2.9.1
2+
codecov>=2.1.0,<3.0.0
3+
coverage>=4.5.4
4+
pylint>=2.6.0,<3.0.0
5+
pytest>=6.2.1,<7.0.0
6+
pytest-cov>=2.2.1,<3.0.0
77
pytest-rerunfailures>=3.1
8-
9-
# code coverage
10-
coverage<5
11-
codecov>=1.6.3
12-
pytest-cov>=2.2.1
13-
14-
# documentation
15-
recommonmark>=0.2.0
16-
Sphinx>=1.3.1
8+
responses>=0.12.1,<1.0.0
9+
tox>=3.2.0,<4.0.0
10+
python_dotenv>=0.1.5

requirements.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
jproperties
2-
requests>=2.0,<3.0
3-
python_dateutil>=2.5.3
4-
websocket-client==0.48.0
5-
ibm_cloud_sdk_core>=3.0.0
1+
requests>=2.24.0,<3.0
2+
python_dateutil>=2.5.3,<3.0.0
3+
ibm_cloud_sdk_core>=3.4.0,<4.0.0

setup.py

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
PACKAGE_DESC = 'Python client library for IBM Cloud Networking Services'
2525

2626
with open('requirements.txt') as f:
27-
install_requires = [str(req) for req in pkg_resources.parse_requirements(f)]
27+
install_requires = [
28+
str(req) for req in pkg_resources.parse_requirements(f)
29+
]
2830
with open('requirements-dev.txt') as f:
2931
tests_require = [str(req) for req in pkg_resources.parse_requirements(f)]
3032

@@ -38,35 +40,16 @@
3840
os.system('python setup.py sdist upload -r pypi')
3941
sys.exit()
4042

41-
class PyTest(TestCommand):
42-
def finalize_options(self):
43-
TestCommand.finalize_options(self)
44-
self.test_args = ['--strict', '--verbose', '--tb=long', 'test']
45-
self.test_suite = True
46-
47-
def run_tests(self):
48-
import pytest
49-
errcode = pytest.main(self.test_args)
50-
sys.exit(errcode)
51-
52-
class PyTestUnit(PyTest):
53-
def finalize_options(self):
54-
self.test_args = ['--strict', '--verbose', '--tb=long', 'test/unit']
55-
56-
class PyTestIntegration(PyTest):
57-
def finalize_options(self):
58-
self.test_args = ['--strict', '--verbose', '--tb=long', 'test/integration']
59-
6043
with open("README.md", "r") as fh:
6144
readme = fh.read()
6245

63-
setup(name=PACKAGE_NAME.replace('_', '-'),
46+
setup(
47+
name=PACKAGE_NAME.replace('_', '-'),
6448
version=__version__,
6549
description=PACKAGE_DESC,
6650
license='Apache 2.0',
6751
install_requires=install_requires,
6852
tests_require=tests_require,
69-
cmdclass={'test': PyTest, 'test_unit': PyTestUnit, 'test_integration': PyTestIntegration},
7053
author='IBM',
7154
author_email='[email protected]',
7255
long_description=readme,
@@ -89,5 +72,4 @@ def finalize_options(self):
8972
'Topic :: Software Development :: Libraries :: Python Modules',
9073
'Topic :: Software Development :: Libraries :: Application Frameworks',
9174
],
92-
zip_safe=True
93-
)
75+
zip_safe=True)

test/integration/test_direct_link_provider_v2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818

1919
# load the .env file containing your environment variables
2020
try:
21-
load_dotenv(find_dotenv(filename=".dl_env"))
21+
load_dotenv(find_dotenv(filename="dl.env"))
2222
except:
23-
raise unittest.SkipTest('no .dl_env file loaded, skipping...')
23+
raise unittest.SkipTest('no dl.env file loaded, skipping...')
2424

2525
class TestDirectLinkProviderV2(unittest.TestCase):
2626
""" Test class for DirectLink Provider sdk functions """

test/integration/test_direct_link_v1.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525

2626
# load the .env file containing your environment variables
2727
try:
28-
load_dotenv(find_dotenv(filename=".dl_env"))
28+
load_dotenv(find_dotenv(filename="dl.env"))
2929
except:
30-
raise unittest.SkipTest('no .dl_env file loaded, skipping...')
30+
raise unittest.SkipTest('no dl.env file loaded, skipping...')
3131

3232
class TestDirectLinkV1(unittest.TestCase):
3333
""" Test class for DirectLink sdk functions """

test/integration/test_ssl_certificate_api_v1.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import os
99
import unittest
1010
import time
11+
import pytest
1112
from dotenv import load_dotenv, find_dotenv
1213
from ibm_cloud_networking_services import SslCertificateApiV1
1314
from ibm_cloud_sdk_core import ApiException
@@ -99,6 +100,7 @@ def test_1_list_custom_certificates(self):
99100
assert resp is not None
100101
assert resp.status_code == 200
101102

103+
@pytest.mark.skip(reason="No need to run this test case")
102104
def test_1_custom_certificate_actions(self):
103105
""" test method upload/delete/update/get given customized ssl certificate """
104106

@@ -155,6 +157,7 @@ def test_1_custom_certificate_actions(self):
155157
assert resp is not None
156158
assert resp.status_code == 200
157159

160+
@pytest.mark.skip(reason="No need to run this test case")
158161
def test_1_universal_certificate_setting_actions(self):
159162
""" test method get/set custom ssl certificate settings """
160163

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tox]
2-
envlist = lint, py35, py36, py37, py38
2+
envlist = py37-lint, py36, py37, py38, py39
33

4-
[testenv:lint]
4+
[testenv:py37-lint]
55
basepython = python3.7
66
deps = pylint
77
commands = pylint --rcfile=.pylintrc ibm_cloud_networking_services test

0 commit comments

Comments
 (0)