Skip to content

Commit 4725113

Browse files
authored
Add python 3.11, no longer test python 3.6 (#43)
1 parent e2756cb commit 4725113

5 files changed

Lines changed: 28 additions & 20 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ git:
44
depth: false
55
language: python
66
python:
7-
- '3.6'
87
- '3.7'
98
- '3.8'
109
- '3.9'
1110
- '3.10'
11+
- '3.11'
1212
install:
1313
- pip install tox-travis
1414
script:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ A Python module to access the [OpenCage Geocoding API](https://opencagedata.com/
1414

1515
## Usage
1616

17-
Supports Python 3.6 or newer. Use the older opencage 1.x releases if you need Python 2.7 support.
17+
Supports Python 3.7 or newer. Use the older opencage 1.x releases if you need Python 2.7 support.
1818

1919
Install the module:
2020

setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
ROOT_DIR = os.path.dirname(__file__)
1414
SOURCE_DIR = os.path.join(ROOT_DIR)
1515

16-
if sys.version_info < (3, 5):
16+
if sys.version_info < (3, 6):
1717
raise RuntimeError(
18-
"opencage requires Python 3.6 or newer"
19-
"Use older opencage 1.x for Python 2.7 or 3.5"
18+
"opencage requires Python 3.7 or newer"
19+
"Use older opencage 1.x for Python 2.7 or 3.6"
2020
)
2121

2222
# try for travis
@@ -48,11 +48,11 @@
4848
'License :: OSI Approved :: BSD License',
4949
'Operating System :: OS Independent',
5050
"Programming Language :: Python :: 3 :: Only",
51-
'Programming Language :: Python :: 3.6',
5251
'Programming Language :: Python :: 3.7',
5352
'Programming Language :: Python :: 3.8',
5453
'Programming Language :: Python :: 3.9',
5554
'Programming Language :: Python :: 3.10',
55+
'Programming Language :: Python :: 3.11',
5656
'Topic :: Scientific/Engineering :: GIS',
5757
'Topic :: Utilities'
5858
],
@@ -64,7 +64,7 @@
6464
test_suite='tests',
6565
tests_require=[
6666
'httpretty>=0.9.6',
67-
'pylint==2.9.1',
67+
'pylint==2.15.9',
6868
'pytest>=6.0'
6969
],
7070
)

tox.ini

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
[tox]
2-
envlist = py3613, py3710, py3815, py3920, py3108, lint
2+
envlist = py37,py38,py39,py310,py311,lint
33

44
[testenv]
55
deps =
66
httpretty
77
pytest
88
pytest-aiohttp
99
pytest-asyncio
10-
commands = pytest test
10+
commands =
11+
pytest test
1112

1213
[testenv:lint]
1314
usedevelop = True
1415
deps =
1516
httpretty
1617
pylint==2.15.9
1718
pytest
18-
commands = pylint opencage examples/demo.py setup.py test
19+
commands =
20+
pylint opencage examples/demo.py setup.py test

vagrant-provision.sh

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
#!/bin/bash
22

33
sudo apt-get update -qq
4-
sudo apt-get install --no-install-recommends -q -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
4+
sudo apt-get install --no-install-recommends -qq -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
5+
6+
export PATH="${HOME}/.local/bin:$PATH"
7+
8+
# pip and tox should be installed with system python, not any .pyenv environments
9+
sudo apt-get install -y python3-pip
10+
pip install --upgrade pip
11+
pip install tox
12+
513

614
# https://github.com/pyenv/pyenv-installer#readme
715
curl -s -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
@@ -15,17 +23,15 @@ eval "$(pyenv virtualenv-init -)"
1523
source ~/.bashrc
1624
exec $SHELL
1725

18-
for VERSION in 3.6.13 3.7.10 3.8.15 3.9.2 3.10.8; do
26+
# 'exec $SHELL' doesn't work well in a provision file. Likely you need to
27+
# run the following commands manually after 'vagrant up'
28+
29+
for VERSION in 3.7 3.8 3.9 3.10 3.11; do
30+
VERSION=$(pyenv latest --known $VERSION)
1931
echo "Installing $VERSION ..."
2032
pyenv install --skip-existing $VERSION
21-
pyenv global $VERSION
2233
done
2334

24-
sudo apt-get install -y python3-pip
25-
# Python 3.8 has conflicts with upstream Ubuntu and removed distutils from base
26-
# installation, now add a global one back
27-
sudo apt-get install --no-install-recommends -q -y python3-distutils
28-
35+
# Any version not part of the globals isn't found by tox' envlist
36+
pyenv global $(pyenv versions --bare)
2937
pyenv versions
30-
31-
sudo pip3 install tox

0 commit comments

Comments
 (0)