Skip to content

Commit

Permalink
Merge ea559c1 into 875be83
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Jul 3, 2020
2 parents 875be83 + ea559c1 commit 23c6eb4
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 17 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ python:
- 3.6
- 3.7
- 3.8
- 3.9-dev
- pypy
jobs:
include:
Expand Down
4 changes: 2 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
4.4 (unreleased)
================

- Add support for Python 3.8.
- Add support for Python 3.8 and 3.9

- Drop support for Python 3.4.
- Drop support for Python 3.4 and 3.5.


4.3 (2018-10-04)
Expand Down
11 changes: 0 additions & 11 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,13 +1,2 @@
[nosetests]
nocapture=1
cover-package=zope.exceptions
cover-erase=1
with-doctest=0
where=src

[aliases]
dev = develop easy_install zope.exceptions[testing]
docs = easy_install zope.exceptions[docs]

[bdist_wheel]
universal = 1
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ def alltests():
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Natural Language :: English',
Expand Down
2 changes: 1 addition & 1 deletion src/zope/exceptions/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from zope.exceptions.exceptionformatter import print_exception

Buffer = io.StringIO if bytes is not str else io.BytesIO
Buffer = io.StringIO if bytes is not str else io.BytesIO # PY2


class Formatter(logging.Formatter):
Expand Down
10 changes: 9 additions & 1 deletion src/zope/exceptions/tests/test_exceptionformatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
import sys


_version = sys.version_info
IS_PY39_OR_GREATER = _version.major == 3 and _version.minor >= 9


class TextExceptionFormatterTests(unittest.TestCase):

def _getTargetClass(self):
Expand Down Expand Up @@ -725,7 +729,11 @@ def test_format_exception_as_html(self):
</p>""").format(
module='zope.exceptions.tests.test_exceptionformatter',
fn='test_format_exception_as_html',
)
)
if IS_PY39_OR_GREATER: # pragma: no cover
# Python 3.9 moves the pointer after the statement instead to the
# last character of it:
expected = expected.replace('^<br />', ' ^<br />')
# HTML formatter uses Windows line endings for some reason.
result = result.replace('\r\n', '\n')
result = re.sub(r'line \d\d\d,', 'line ABC,', result)
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
py27,py35,py36,py37,py38,pypy,pypy3,coverage,docs
flake8,py27,py36,py37,py38,py39,pypy,pypy3,coverage,docs

[testenv]
commands =
Expand Down

0 comments on commit 23c6eb4

Please sign in to comment.