Skip to content

Commit accb551

Browse files
authored
Merge pull request #563 from swamper123/Drop_Python2_support_in_travis
Drop python2 support in travis
2 parents 93306bc + 4477988 commit accb551

File tree

8 files changed

+25
-25
lines changed

8 files changed

+25
-25
lines changed

.travis.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,30 @@ language: python
33
matrix:
44
include:
55
- os: linux
6-
python: "2.7"
7-
- os: linux
6+
dist: bionic
87
python: "3.6"
98
- os: linux
9+
dist: bionic
1010
python: "3.7"
1111
- os: linux
12+
dist: bionic
1213
python: "3.8"
14+
- os: linux
15+
dist: bionic
16+
python: "3.9-dev"
1317
- os: osx
14-
osx_image: xcode8.3
18+
osx_image: xcode12.2
1519
language: generic
16-
before_install:
17-
- if [ $TRAVIS_OS_NAME = osx ]; then brew update; fi
18-
- if [ $TRAVIS_OS_NAME = osx ]; then brew install openssl; fi
19-
# - if [$TRAVIS_OS_NAME = osx ]; then python -c "import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)"; fi
20-
20+
before_install:
21+
- brew install python@3.9
22+
- pip3 install virtualenv
2123
install:
2224
# - scripts/travis.sh pip install pip-accel
23-
- if [ $TRAVIS_OS_NAME = osx ]; then scripts/travis.sh pip install -U "\"setuptools<45"\"; else pip install -U setuptools --upgrade ; fi
24-
- scripts/travis.sh pip install coveralls
25-
- scripts/travis.sh pip install --requirement=requirements-checks.txt
26-
- scripts/travis.sh pip install --requirement=requirements-tests.txt
27-
- scripts/travis.sh LC_ALL=C pip install .
25+
- pip3 install -U setuptools --upgrade
26+
- scripts/travis.sh pip3 install coveralls
27+
- scripts/travis.sh pip3 install --requirement=requirements-checks.txt
28+
- scripts/travis.sh pip3 install --requirement=requirements-tests.txt
29+
- scripts/travis.sh LC_ALL=C pip3 install .
2830
script:
2931
# - scripts/travis.sh make check
3032
- scripts/travis.sh make test

scripts/travis.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
#!/bin/bash -e
22
set -x
33
if [ "$TRAVIS_OS_NAME" = osx ]; then
4-
VIRTUAL_ENV="$HOME/.virtualenvs/python2.7"
5-
if [ ! -x "$VIRTUAL_ENV/bin/python" ]; then
6-
virtualenv "$VIRTUAL_ENV"
7-
fi
4+
VIRTUAL_ENV="$HOME/.virtualenvs/python3"
5+
virtualenv "$VIRTUAL_ENV"
86
source "$VIRTUAL_ENV/bin/activate"
97
fi
108

test/test_client_async.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
IS_DARWIN = platform.system().lower() == "darwin"
3333
OSX_SIERRA = LooseVersion("10.12")
3434
if IS_DARWIN:
35-
IS_HIGH_SIERRA_OR_ABOVE = LooseVersion(platform.mac_ver()[0])
36-
SERIAL_PORT = '/dev/ttyp0' if not IS_HIGH_SIERRA_OR_ABOVE else '/dev/ptyp0'
35+
IS_HIGH_SIERRA_OR_ABOVE = OSX_SIERRA < LooseVersion(platform.mac_ver()[0])
36+
SERIAL_PORT = '/dev/ptyp0' if not IS_HIGH_SIERRA_OR_ABOVE else '/dev/ttyp0'
3737
else:
3838
IS_HIGH_SIERRA_OR_ABOVE = False
3939
SERIAL_PORT = "/dev/ptmx"

test/test_client_async_tornado.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
IS_DARWIN = platform.system().lower() == "darwin"
2525
OSX_SIERRA = LooseVersion("10.12")
2626
if IS_DARWIN:
27-
IS_HIGH_SIERRA_OR_ABOVE = LooseVersion(platform.mac_ver()[0])
28-
SERIAL_PORT = '/dev/ttyp0' if not IS_HIGH_SIERRA_OR_ABOVE else '/dev/ptyp0'
27+
IS_HIGH_SIERRA_OR_ABOVE = OSX_SIERRA < LooseVersion(platform.mac_ver()[0])
28+
SERIAL_PORT = '/dev/ptyp0' if not IS_HIGH_SIERRA_OR_ABOVE else '/dev/ttyp0'
2929
else:
3030
IS_HIGH_SIERRA_OR_ABOVE = False
3131
SERIAL_PORT = "/dev/ptmx"

test/test_server_async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
IS_DARWIN = platform.system().lower() == "darwin"
2727
OSX_SIERRA = LooseVersion("10.12")
2828
if IS_DARWIN:
29-
IS_HIGH_SIERRA_OR_ABOVE = LooseVersion(platform.mac_ver()[0])
29+
IS_HIGH_SIERRA_OR_ABOVE = OSX_SIERRA < LooseVersion(platform.mac_ver()[0])
3030
SERIAL_PORT = '/dev/ptyp0' if not IS_HIGH_SIERRA_OR_ABOVE else '/dev/ttyp0'
3131
else:
3232
IS_HIGH_SIERRA_OR_ABOVE = False

test/test_server_asyncio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
IS_DARWIN = platform.system().lower() == "darwin"
3434
OSX_SIERRA = LooseVersion("10.12")
3535
if IS_DARWIN:
36-
IS_HIGH_SIERRA_OR_ABOVE = LooseVersion(platform.mac_ver()[0])
36+
IS_HIGH_SIERRA_OR_ABOVE = OSX_SIERRA < LooseVersion(platform.mac_ver()[0])
3737
SERIAL_PORT = '/dev/ptyp0' if not IS_HIGH_SIERRA_OR_ABOVE else '/dev/ttyp0'
3838
else:
3939
IS_HIGH_SIERRA_OR_ABOVE = False

test/test_server_sync.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
IS_DARWIN = platform.system().lower() == "darwin"
2929
OSX_SIERRA = LooseVersion("10.12")
3030
if IS_DARWIN:
31-
IS_HIGH_SIERRA_OR_ABOVE = LooseVersion(platform.mac_ver()[0])
31+
IS_HIGH_SIERRA_OR_ABOVE = OSX_SIERRA < LooseVersion(platform.mac_ver()[0])
3232
SERIAL_PORT = '/dev/ptyp0' if not IS_HIGH_SIERRA_OR_ABOVE else '/dev/ttyp0'
3333
else:
3434
IS_HIGH_SIERRA_OR_ABOVE = False

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# directory.
55

66
[tox]
7-
envlist = py27, py35, py36, py37, pypy
7+
envlist = py36, py37, py38, pypy3
88

99
[testenv]
1010
deps = -r requirements-tests.txt

0 commit comments

Comments
 (0)