Skip to content

Commit

Permalink
Add Python 3.6, drop Python 3.3
Browse files Browse the repository at this point in the history
Project gardening:

- Rename .txt -> .rst
- Universal wheels
- Add coveralls and coverage environment
  - 93%
- Badges
- zope.testrunner for namespace path issues
  • Loading branch information
jamadden committed Oct 16, 2017
1 parent c33ca88 commit e29f77b
Show file tree
Hide file tree
Showing 13 changed files with 139 additions and 84 deletions.
11 changes: 11 additions & 0 deletions .coveragerc
@@ -0,0 +1,11 @@
[run]
source = z3c.pt

[report]
precision = 2
exclude_lines =
pragma: no cover
if __name__ == '__main__':
raise NotImplementedError
self.fail
raise AssertionError
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -9,3 +9,5 @@ bin
develop-eggs
docs
parts
.coverage
htmlcov/
21 changes: 13 additions & 8 deletions .travis.yml
@@ -1,15 +1,20 @@
language: python
sudo: false
python:
- 2.7
- 3.3
- 3.4
- 3.5
- pypy
- pypy3
- 2.7
- 3.4
- 3.5
- 3.6
- pypy
- pypy3
install:
- pip install tox-travis
- pip install -U pip setuptools
- pip install -U coverage coveralls
- pip install -U -e .[test]
script:
- tox
- coverage run -m zope.testrunner --test-path=src
after_success:
- coveralls
notifications:
email: false
cache: pip
47 changes: 24 additions & 23 deletions CHANGES.txt → CHANGES.rst
@@ -1,22 +1,24 @@
Changelog
=========
===========
Changelog
===========

3.1 (unreleased)
~~~~~~~~~~~~~~~~
3.1.0 (unreleased)
===================

- Nothing changed yet.
- Added support for Python 3.6.
- Dropped support for Python 3.3.


3.0 (2016-09-02)
~~~~~~~~~~~~~~~~
================

- Added support for Python 3.4, 3.5, PyPy and PyPy3.

- Dropped support for Python 2.6.


3.0.0a1 (2013-02-25)
~~~~~~~~~~~~~~~~~~~~
====================

Compatibility:

Expand All @@ -30,15 +32,15 @@ Bugfixes:


2.2.3 (2012-06-01)
~~~~~~~~~~~~~~~~~~
==================

Compatibility:

- The translation function now accepts (but ignores) a ``context``
argument. This fixes a compatibility issue with Chameleon 2.9.x.

2.2.2 (2012-04-24)
~~~~~~~~~~~~~~~~~~
==================

Bugfixes:

Expand All @@ -47,15 +49,15 @@ Bugfixes:
probably cached).

2.2.1 (2012-02-15)
~~~~~~~~~~~~~~~~~~
==================

- Only require Chameleon >= 2.4, was needlessly bumped in last release.

- Add test extra, remove versions from buildout.cfg.


2.2 (2012-01-08)
~~~~~~~~~~~~~~~~
================

Features:

Expand All @@ -77,14 +79,14 @@ Changes:
simple function.

2.1.5 (2011-11-24)
~~~~~~~~~~~~~~~~~~
==================

- Use non-strict mode if available for compatibility with the
reference engine where expressions are only compiled at evaluation
time.

2.1.4 (2011-09-14)
~~~~~~~~~~~~~~~~~~
==================

- The provider expression is now first evaluated as a string
expression, the result of which is used as the content provider
Expand All @@ -94,7 +96,7 @@ Changes:
get evaluated correctly, e.g. ``provider: ${mgr}``.

2.1.3 (2011-08-22)
~~~~~~~~~~~~~~~~~~
==================

- Configure HTML boolean attributes (in HTML-mode only)::

Expand All @@ -103,27 +105,27 @@ Changes:
"noresize", "defer"

2.1.2 (2011-08-19)
~~~~~~~~~~~~~~~~~~
==================

- Enable option ``literal_false`` to get the behavior that a value of
``False`` does not drop an attribute.

2.1.1 (2011-08-11)
~~~~~~~~~~~~~~~~~~
==================

- Make sure the builtin names 'path' and 'exists' can be redefined.

- Guard ``sys.modules`` (mapped to the builtin variable "modules")
against import-time side effects using ``ProxyFactory``.

2.1 (2011-07-28)
~~~~~~~~~~~~~~~~
================

- Use dynamic expression evaluation framework that comes included with
Chameleon.

2.0 (2011-07-14)
~~~~~~~~~~~~~~~~
================

- Point release.

Expand All @@ -134,7 +136,7 @@ Changes:
- Fixed issue with the call flag on the Zope traverser compiler.

2.0-rc3 (2011-07-11)
~~~~~~~~~~~~~~~~~~~~
====================

- Python-expressions are no longer TALES-expressions; previously, the
pipe operator would split Python expression clauses, allowing
Expand All @@ -149,15 +151,15 @@ Changes:
on ``PageTemplate`` instances.

2.0-rc2 (2011-03-24)
~~~~~~~~~~~~~~~~~~~~
====================

- Fixed an issue with ``"exists:"`` expression where a callable would
be attempted called. It is meanwhile implied with this expression
types that it should use the ``"nocall:"`` pragma.


2.0-rc1 (2011-02-28)
~~~~~~~~~~~~~~~~~~~~
====================

- Update to Chameleon 2.0.

Expand Down Expand Up @@ -200,7 +202,7 @@ Changes:
- Bind template to the template object in the general case.

1.2 (2010/05/12)
------------------
----------------

- Fixed compatibility issue with recent change in Chameleon.

Expand Down Expand Up @@ -896,4 +898,3 @@ Changes:
----------------

- First public release

2 changes: 2 additions & 0 deletions MANIFEST.in
Expand Up @@ -3,6 +3,8 @@ include *.txt
include *.py
include buildout.cfg
include tox.ini
include .travis.yml
include .coveragerc

recursive-include src *
recursive-include docs *.py
Expand Down
27 changes: 27 additions & 0 deletions README.rst
@@ -0,0 +1,27 @@
========
z3c.pt
========

.. image:: https://img.shields.io/pypi/v/z3c.pt.svg
:target: https://pypi.python.org/pypi/z3c.pt/
:alt: Latest release

.. image:: https://img.shields.io/pypi/pyversions/z3c.pt.svg
:target: https://pypi.org/project/z3c.pt/
:alt: Supported Python versions

.. image:: https://travis-ci.org/zopefoundation/z3c.pt.svg?branch=master
:target: https://travis-ci.org/zopefoundation/z3c.pt

.. image:: https://coveralls.io/repos/github/zopefoundation/z3c.pt/badge.svg?branch=master
:target: https://coveralls.io/github/zopefoundation/z3c.pt?branch=master

.. image:: https://readthedocs.org/projects/z3cpt/badge/?version=latest
:target: https://z3cpt.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

This is a fast implementation of the ZPT template engine for Zope 3
which uses Chameleon to compile templates to byte-code.

The package provides application support equivalent to
``zope.pagetemplate``.
12 changes: 0 additions & 12 deletions README.txt

This file was deleted.

2 changes: 2 additions & 0 deletions setup.cfg
@@ -0,0 +1,2 @@
[bdist_wheel]
universal = 1
30 changes: 20 additions & 10 deletions setup.py
Expand Up @@ -13,16 +13,16 @@
##############################################################################
"""Setup
"""
import os
from setuptools import setup, find_packages


def read(filename):
with open(filename) as f:
def read(*filenames):
with open(os.path.join(*filenames)) as f:
return f.read()


def alltests():
import os
import sys
import unittest
# use the zope.testrunner machinery to find all the
Expand All @@ -36,14 +36,24 @@ def alltests():
suites = list(zope.testrunner.find.find_suites(options))
return unittest.TestSuite(suites)

TESTS_REQUIRE = [
'zope.testing',
'zope.testrunner',
]

setup(
name='z3c.pt',
version='3.1.dev0',
version='3.1.0.dev0',
author='Malthe Borch and the Zope Community',
author_email='zope-dev@zope.org',
description='Fast ZPT engine.',
long_description=read('README.txt') + read('CHANGES.txt'),
long_description=(
read('README.rst')
+ '\n\n'
+ read('src', 'z3c', 'pt', 'README.rst')
+ '\n\n'
+ read('CHANGES.rst')
),
license='ZPL',
keywords='tal tales pagetemplate zope chameleon',
classifiers=[
Expand All @@ -55,9 +65,9 @@ def alltests():
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
Expand All @@ -81,10 +91,10 @@ def alltests():
'zope.contentprovider',
'Chameleon >= 2.4',
],
extras_require=dict(
test=['zope.testing', 'zope.testrunner'],
),
tests_require=['zope.testing'],
extras_require={
'test': TESTS_REQUIRE,
},
tests_require=TESTS_REQUIRE,
test_suite='__main__.alltests',
include_package_data=True,
zip_safe=False,
Expand Down
7 changes: 1 addition & 6 deletions src/z3c/__init__.py
@@ -1,6 +1 @@
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
__import__('pkg_resources').declare_namespace(__name__) # pragma: no cover

0 comments on commit e29f77b

Please sign in to comment.