Skip to content

Commit

Permalink
Python 3.8 support (CI, setup.py, fix deprecation warning)
Browse files Browse the repository at this point in the history
  • Loading branch information
kmike committed Feb 19, 2020
1 parent b0887c6 commit 0e4636d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ matrix:
env: TOXENV=py36
- python: 3.7
env: TOXENV=py37
- python: 3.8
env: TOXENV=py38

install:
- pip install -U tox
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Scientific/Engineering :: Information Analysis',
Expand Down
8 changes: 6 additions & 2 deletions src/dawg.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ cimport _guide_builder
cimport _dictionary_builder
cimport b64_decode

import collections
try:
from collections.abc import Mapping
except ImportError:
# Python 2.7
from collections import Mapping
import struct
import sys
from binascii import b2a_base64
Expand Down Expand Up @@ -852,7 +856,7 @@ def _iterable_from_argument(arg):
if arg is None:
arg = []

if isinstance(arg, collections.Mapping):
if isinstance(arg, Mapping):
return ((key, arg[key]) for key in arg)
else:
return arg
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py27,py35,py35-locale,py36,py37
envlist = py27,py35,py35-locale,py36,py37,py38

[testenv]
deps =
Expand Down

0 comments on commit 0e4636d

Please sign in to comment.