Skip to content

Commit

Permalink
Python3.7support (#8)
Browse files Browse the repository at this point in the history
* Fixed tests (See PR #45 in zope.configuration)

* Added support for Python 3.7

* Added back location information to directives.rst
  • Loading branch information
vernans committed Oct 6, 2018
1 parent 645c411 commit cc5c439
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 13 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ python:
- 3.6
- pypy
- pypy3
matrix:
include:
- python: "3.7"
dist: xenial
sudo: true
install:
- pip install -U pip setuptools
- pip install -U coverage coveralls
Expand Down
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
4.1.1 (unreleased)
==================

- Host documentation at https://zopeviewlet.readthedocs.io
- Add support for Python 3.7.

- Host documentation at https://zopeviewlet.readthedocs.io

4.1.0 (2017-09-23)
==================
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def read(*rnames):
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Natural Language :: English',
Expand Down
21 changes: 10 additions & 11 deletions src/zope/viewlet/directives.rst
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ Finally, if a non-existent template is specified, an error is raised:
... ''', context=context)
Traceback (most recent call last):
...
ZopeXMLConfigurationError: File "<string>", line 3.2-7.8
ConfigurationError: ('No such file', '...foo.pt')
ConfigurationError: ('No such file', '...foo.pt')
File "<string>", line 3.2-7.8


The ``viewlet`` Directive
Expand Down Expand Up @@ -377,8 +377,8 @@ Neither the class or template have been specified:
... ''', context=context)
Traceback (most recent call last):
...
ZopeXMLConfigurationError: File "<string>", line 3.2-7.8
ConfigurationError: Must specify a class or template
ConfigurationError: Must specify a class or template
File "<string>", line 3.2-7.8

The specified attribute is not ``__call__``, but also a template has been
specified:
Expand All @@ -396,8 +396,8 @@ specified:
... ''', context=context)
Traceback (most recent call last):
...
ZopeXMLConfigurationError: File "<string>", line 3.2-9.8
ConfigurationError: Attribute and template cannot be used together.
ConfigurationError: Attribute and template cannot be used together.
File "<string>", line 3.2-9.8

Now, we are not specifying a template, but a class that does not have the
specified attribute:
Expand All @@ -415,9 +415,8 @@ specified attribute:
... ''', context=context)
Traceback (most recent call last):
...
ZopeXMLConfigurationError: File "<string>", line 3.2-9.8
ConfigurationError: The provided class doesn't have the specified attribute

ConfigurationError: The provided class doesn't have the specified attribute
File "<string>", line 3.2-9.8

Now for a template that doesn't exist:

Expand All @@ -435,8 +434,8 @@ Now for a template that doesn't exist:
... ''', context=context)
Traceback (most recent call last):
...
ZopeXMLConfigurationError: File "<string>", line 3.2-10.8
ConfigurationError: ('No such file', '...this template is not here')
ConfigurationError: ('No such file', '...this template is not here')
File "<string>", line 3.2-10.8


Cleanup
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,py34,py35,py36,pypy,pypy3,coverage,docs
py27,py34,py35,py36,py37,pypy,pypy3,coverage,docs

[testenv]
commands =
Expand Down

0 comments on commit cc5c439

Please sign in to comment.