Skip to content

Commit ffdca18

Browse files
Merge pull request #1429 from camporter/support_python39
Add testing and support for python 3.9.
2 parents e33da43 + 8d73349 commit ffdca18

File tree

7 files changed

+83
-83
lines changed

7 files changed

+83
-83
lines changed

.github/workflows/release.yml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
name: Release
2-
3-
on:
4-
release:
5-
types: [published]
6-
7-
jobs:
8-
release:
9-
runs-on: ubuntu-latest
10-
strategy:
11-
matrix:
12-
arch: ['armhf','amd64','arm64','ppc64el','s390x','i386']
13-
steps:
14-
- name: Install Snapcraft
15-
uses: samuelmeuli/action-snapcraft@v1.1.1
16-
with:
17-
snapcraft_token: ${{ secrets.snapcraft_token }}
18-
- name: Push to stable
19-
run: |
20-
VERSION=`snapcraft list-revisions slcli --arch ${{ matrix.arch }} | grep "edge\*" | awk '{print $1}'`
21-
echo Publishing $VERSION on ${{ matrix.arch }}
22-
snapcraft release slcli $VERSION stable
23-
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-18.04
10+
strategy:
11+
matrix:
12+
arch: ['armhf','amd64','arm64','ppc64el','s390x','i386']
13+
steps:
14+
- name: Install Snapcraft
15+
uses: samuelmeuli/action-snapcraft@v1.2.0
16+
with:
17+
snapcraft_token: ${{ secrets.snapcraft_token }}
18+
- name: Push to stable
19+
run: |
20+
VERSION=`snapcraft list-revisions slcli --arch ${{ matrix.arch }} | grep "edge\*" | awk '{print $1}'`
21+
echo Publishing $VERSION on ${{ matrix.arch }}
22+
snapcraft release slcli $VERSION stable
23+

.github/workflows/tests.yml

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,54 @@
1-
name: Tests
2-
3-
on:
4-
push:
5-
branches: [ master ]
6-
pull_request:
7-
branches: [ master ]
8-
jobs:
9-
test:
10-
runs-on: ubuntu-latest
11-
strategy:
12-
matrix:
13-
python-version: [3.5,3.6,3.7,3.8]
14-
15-
steps:
16-
- uses: actions/checkout@v2
17-
- name: Set up Python ${{ matrix.python-version }}
18-
uses: actions/setup-python@v1
19-
with:
20-
python-version: ${{ matrix.python-version }}
21-
- name: Install dependencies
22-
run: |
23-
python -m pip install --upgrade pip
24-
pip install -r tools/test-requirements.txt
25-
- name: Tox Test
26-
run: tox -e py
27-
coverage:
28-
runs-on: ubuntu-latest
29-
steps:
30-
- uses: actions/checkout@v2
31-
- name: Set up Python
32-
uses: actions/setup-python@v1
33-
with:
34-
python-version: 3.8
35-
- name: Install dependencies
36-
run: |
37-
python -m pip install --upgrade pip
38-
pip install -r tools/test-requirements.txt
39-
- name: Tox Coverage
40-
run: tox -e coverage
41-
analysis:
42-
runs-on: ubuntu-latest
43-
steps:
44-
- uses: actions/checkout@v2
45-
- name: Set up Python
46-
uses: actions/setup-python@v1
47-
with:
48-
python-version: 3.8
49-
- name: Install dependencies
50-
run: |
51-
python -m pip install --upgrade pip
52-
pip install -r tools/test-requirements.txt
53-
- name: Tox Analysis
54-
run: tox -e analysis
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python-version: [3.5,3.6,3.7,3.8,3.9]
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v1
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install -r tools/test-requirements.txt
25+
- name: Tox Test
26+
run: tox -e py
27+
coverage:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v2
31+
- name: Set up Python
32+
uses: actions/setup-python@v1
33+
with:
34+
python-version: 3.9
35+
- name: Install dependencies
36+
run: |
37+
python -m pip install --upgrade pip
38+
pip install -r tools/test-requirements.txt
39+
- name: Tox Coverage
40+
run: tox -e coverage
41+
analysis:
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@v2
45+
- name: Set up Python
46+
uses: actions/setup-python@v1
47+
with:
48+
python-version: 3.9
49+
- name: Install dependencies
50+
run: |
51+
python -m pip install --upgrade pip
52+
pip install -r tools/test-requirements.txt
53+
- name: Tox Analysis
54+
run: tox -e analysis

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ If you are using the library directly in python, you can do something like this.
127127
128128
System Requirements
129129
-------------------
130-
* Python 3.5, 3.6, 3.7, or 3.8.
130+
* Python 3.5, 3.6, 3.7, 3.8, or 3.9.
131131
* A valid SoftLayer API username and key.
132132
* A connection to SoftLayer's private network is required to use
133133
our private network API endpoints.
@@ -150,6 +150,6 @@ Python Packages
150150

151151
Copyright
152152
---------
153-
This software is Copyright (c) 2016-2019 SoftLayer Technologies, Inc.
153+
This software is Copyright (c) 2016-2021 SoftLayer Technologies, Inc.
154154

155155
See the bundled LICENSE file for more information.

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
'Programming Language :: Python :: 3.6',
5555
'Programming Language :: Python :: 3.7',
5656
'Programming Language :: Python :: 3.8',
57+
'Programming Language :: Python :: 3.9',
5758
'Programming Language :: Python :: Implementation :: CPython',
5859
'Programming Language :: Python :: Implementation :: PyPy',
5960
],

tests/CLI/modules/user_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
"""
77
import json
88
import sys
9+
import unittest
910

1011
import mock
11-
import testtools
1212

1313
from SoftLayer import testing
1414

@@ -168,7 +168,7 @@ def test_create_user_no_confirm(self, confirm_mock):
168168
result = self.run_command(['user', 'create', 'test', '-e', 'test@us.ibm.com', '-p', 'testword'])
169169
self.assertEqual(result.exit_code, 2)
170170

171-
@testtools.skipIf(sys.version_info < (3, 6), "Secrets module only exists in version 3.6+")
171+
@unittest.skipIf(sys.version_info < (3, 6), "Secrets module only exists in version 3.6+")
172172
@mock.patch('secrets.choice')
173173
@mock.patch('SoftLayer.CLI.formatting.confirm')
174174
def test_create_user_generate_password_36(self, confirm_mock, secrets):

tools/test-requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ pytest
44
pytest-cov
55
mock
66
sphinx
7-
testtools
87
ptable >= 0.9.2
98
click >= 7
109
requests >= 2.20.0

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py35,py36,py37,py38,pypy3,analysis,coverage,docs
2+
envlist = py35,py36,py37,py38,py39,pypy3,analysis,coverage,docs
33

44

55
[flake8]

0 commit comments

Comments
 (0)