Skip to content

Commit

Permalink
Merge pull request #8 from cjwatson/py38
Browse files Browse the repository at this point in the history
Add support for Python 3.8
  • Loading branch information
cjwatson committed Dec 19, 2019
2 parents 1ff5d03 + 11231bb commit 60f2474
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
7 changes: 2 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@ python:
- 3.4
- 3.5
- 3.6
- 3.7
- 3.8
- pypy
- pypy3
matrix:
include:
- python: "3.7"
dist: xenial
sudo: true
install:
- pip install -U pip setuptools
- pip install -U coverage coveralls
Expand Down
5 changes: 4 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
4.5 (unreleased)
================

- Nothing changed yet.
- Fix tests on Python 3.8
(`#7 <https://github.com/zopefoundation/zope.contenttype/issues/7>`_).

- Add support for Python 3.8.


4.4 (2018-10-05)
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def read(*rnames):
'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',
'Programming Language :: Python :: Implementation :: PyPy',
'Operating System :: OS Independent',
Expand Down
3 changes: 2 additions & 1 deletion src/zope/contenttype/tests/testContentTypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def setUp(self):
import mimetypes
mimetypes.init()
self._old_state = mimetypes.__dict__.copy()
self._old_types_count = len(self._old_state["types_map"])

def tearDown(self):
import mimetypes
Expand All @@ -31,7 +32,7 @@ def tearDown(self):
def _check_types_count(self, delta):
import mimetypes
self.assertEqual(len(mimetypes.types_map),
len(self._old_state["types_map"]) + delta)
self._old_types_count + delta)

def _getFilename(self, name):
import os.path
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
py27,py34,py35,py36,py37,pypy,pypy3,coverage
py27,py34,py35,py36,py37,py38,pypy,pypy3,coverage

[testenv]
commands =
Expand All @@ -11,7 +11,7 @@ deps =
[testenv:coverage]
usedevelop = true
basepython =
python3.7
python3.8
commands =
coverage run -m zope.testrunner --test-path=src
coverage report --fail-under=100
Expand Down

0 comments on commit 60f2474

Please sign in to comment.