diff options
author | Jason Madden <jamadden@gmail.com> | 2017-08-25 07:43:31 -0500 |
---|---|---|
committer | Jason Madden <jamadden@gmail.com> | 2017-08-25 11:44:15 -0500 |
commit | 64af3f227d61aac8471bc3e837886b96c647262c (patch) | |
tree | d359aae5fe41cb58ca394756e222d66ec7217d8b | |
parent | 5ad4d2da0e3bb1d4b58ffad3744a566fa5921724 (diff) | |
download | zope-traversing-64af3f227d61aac8471bc3e837886b96c647262c.tar.gz |
Add Python 3.6, drop Python 3.3
Fixes #4
- Badges
- Standard tox.ini, .travis.yml
- Add coveralls and coverage environment
- Not yet to 100% coverage
- Universal wheels
-rw-r--r-- | .coveragerc | 11 | ||||
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | .travis.yml | 25 | ||||
-rw-r--r-- | CHANGES.rst | 72 | ||||
-rw-r--r-- | README.rst | 17 | ||||
-rw-r--r-- | setup.cfg | 2 | ||||
-rw-r--r-- | setup.py | 26 | ||||
-rw-r--r-- | tox.ini | 34 |
8 files changed, 107 insertions, 82 deletions
diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..e5477a0 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,11 @@ +[run] +source = zope.traversing + +[report] +precision = 2 +exclude_lines = + pragma: no cover + if __name__ == '__main__': + raise NotImplementedError + self.fail + raise AssertionError @@ -9,3 +9,5 @@ bin/ develop-eggs/ eggs/ parts/ +.coverage +htmlcov/ diff --git a/.travis.yml b/.travis.yml index 37c5317..b07bcf7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,24 @@ language: python sudo: false python: - - 2.7 - - 3.3 - - 3.4 - - 3.5 - - pypy - - pypy3 + - 2.7 + - 3.4 + - 3.5 + - 3.6 + # Force a newer PyPy on the old 'precise' CI image + # in order to install 'cryptography' needed for coveralls + # After September 2017 this should be the default and the version + # pin can be removed. + - pypy-5.6.0 + - pypy3.5-5.8.0 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 diff --git a/CHANGES.rst b/CHANGES.rst index 5cc6dc7..b382022 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,14 +1,18 @@ -Changes -======= +========= + Changes +========= 4.2.0 (unreleased) ------------------- +================== -- Nothing changed yet. +- Add support for Python 3.6. +- Drop support for Python 3.3. + +- Drop support for ``python setup.py test``. 4.1.0 (2016-08-05) ------------------- +================== - Add support for Python 3.5. @@ -18,19 +22,19 @@ Changes doing attribute lookup on Python 2 by instead raising a ``LocationError``. 4.0.0 (2014-03-21) ------------------- +================== - Add support for Python 3.4. 4.0.0a3 (2013-03-12) --------------------- +==================== - Add support for PyPy. 4.0.0a2 (2013-02-21) --------------------- +==================== - Remove ``zope.container`` testing dependency to break another circular dependency. @@ -44,7 +48,7 @@ Changes 4.0.0a1 (2013-02-20) --------------------- +==================== - Replace deprecated ``zope.component.adapts`` usage with equivalent ``zope.component.adapter`` decorator. @@ -60,18 +64,18 @@ Changes 3.14.0 (2011-03-02) -------------------- +=================== - Re-release of 3.13.1 as a feature version as it introduces dependencies on new feature releases. 3.13.1 (2010-12-14) -------------------- +=================== - Fix ZCML-related dependencies. 3.13 (2010-07-09) ------------------ +================= - When a ``__parent__`` attribute is available on an object, it is always used for absolute URL construction, and no ILocation adapter @@ -84,23 +88,23 @@ Changes ILocation adapters can also be provided. 3.12.1 (2010-04-30) -------------------- +=================== - Remove use of ``zope.testing.doctestunit`` in favor of stdlib's doctest. 3.12.0 (2009-12-29) -------------------- +=================== - Avoid testing dependencies on ``zope.securitypolicies`` and ``zope.principalregistry``. 3.11.0 (2009-12-27) -------------------- +=================== - Remove testing dependency on ``zope.app.publication``. 3.10.0 (2009-12-16) -------------------- +=================== - Remove stray test claiming a no longer existing dependency on ``zope.app.applicationcontrol``. @@ -128,13 +132,13 @@ Changes ``zope.pagetemplate``. 3.9.0 (2009-12-15) ------------------- +================== - Move ``IBeforeTraverseEvent`` here from ``zope.app.publication``, as we already deal with publication traversal. 3.8.0 (2009-09-29) ------------------- +================== - In ``zope.traversing.api.getParent()``, try to delegate to ``zope.location.interfaces.ILocationInfo.getParent()``, analogous to @@ -144,21 +148,21 @@ Changes to invert the package interdependency, but where it is now no longer used. 3.7.2 (2009-08-29) ------------------- +================== - Make virtual hosting tests compatible with ``zope.publisher`` 3.9. Redirecting to a different host requires an explicit ``trusted`` redirect now. 3.7.1 (2009-06-16) ------------------- +================== - ``AbsoluteURL`` now implements the fact that ``__call__`` returns the same as ``__str__`` in a manner that it applies for subclasses, too, so they only have to override ``__str__`` and not both. 3.7.0 (2009-05-23) ------------------- +================== - Move the ``publicationtraverse`` module to ``zope.traversing``, removing the ``zope.app.publisher`` -> ``zope.app.publication`` dependency (which was a @@ -168,7 +172,7 @@ Changes rather than a direct reference. 3.6.0 (2009-04-06) ------------------- +================== - Change ``configure.zcml`` not to depend on ``zope.app.component``. @@ -176,14 +180,14 @@ Changes change from 3.5.3. 3.5.4 (2009-04-06) ------------------- +================== - Revert BBB-incompatible use of ``zope.publisher.skinnable``: that change belongs in a 3.6.0 release, because it requires a BBB-incompatible version of ``zope.publisher``. 3.5.3 (2009-03-10) ------------------- +================== - Use applySkin from new location. zope.publisher.skinnable instead of zope.publisher.browser. @@ -192,14 +196,14 @@ Changes recursive AbsoluteURL adapters (LP: #338101). 3.5.2 (2009-02-04) ------------------- +================== - ``RootPhysicallyLocatable`` is not the same as ``LocationPhysicallyLocatable`` (now in ``zope.location``). Fix the import and testing setups. 3.5.1 (2009-02-02) ------------------- +================== - Obsolete the ``RootPhysicallyLocatable`` adapter, which has been superseded by the refactored ``zope.location.traversing.LocationPhysicallyLocatable`` @@ -222,7 +226,7 @@ Changes of retired zope3-dev at zope.org 3.5.0 (2009-01-31) ------------------- +================== - Use zope.container instead of ``zope.app.container``. @@ -231,7 +235,7 @@ Changes - Reduce, but not eliminate, test dependencies on ``zope.app.component``. 3.5.0a4 (2008-08-01) --------------------- +==================== - Reverse dependencies between ``zope.location`` and ``zope.traversing``. @@ -246,13 +250,13 @@ Changes 3.5.0a3 (2007-12-28) --------------------- +==================== - Back out the controversial ``++skin++`` traverser for XML-RPC. 3.5.0a2 (2007-11-28) --------------------- +==================== - Port 3.4.1a1 to trunk @@ -268,26 +272,26 @@ Changes 3.4.1 (2008-07-30) ------------------- +================== - Fix deprecation warning caused by using an old module name for ``ZopeSecurityPolicy`` in ``ftesting.zcml``. 3.4.1a1 (2007-11-13) --------------------- +==================== - Do not use unicode strings to set the application server in the virtual host namespace. This caused absolute_url to create unicode URL's. 3.4.0 (2007-09-29) ------------------- +================== No further changes since 3.4.0a1. 3.4.0a1 (2007-04-22) --------------------- +==================== Initial release as a separate project, corresponds to ``zope.traversing`` from Zope 3.4.0a1 @@ -1,9 +1,22 @@ -``zope.traversing`` -=================== +===================== + ``zope.traversing`` +===================== + +.. image:: https://img.shields.io/pypi/v/zope.traversing.svg + :target: https://pypi.python.org/pypi/zope.traversing/ + :alt: Latest release + +.. image:: https://img.shields.io/pypi/pyversions/zope.traversing.svg + :target: https://pypi.org/project/zope.traversing/ + :alt: Supported Python versions .. image:: https://travis-ci.org/zopefoundation/zope.traversing.png?branch=master :target: https://travis-ci.org/zopefoundation/zope.traversing +.. image:: https://coveralls.io/repos/github/zopefoundation/zope.traversing/badge.svg?branch=master + :target: https://coveralls.io/github/zopefoundation/zope.traversing?branch=master + + This package provides adapters for resolving object paths by traversing an object hierarchy. This package also includes support for traversal namespaces (e.g. ``++view++``, ``++skin++``, etc.) as well as computing diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..2a9acf1 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal = 1 @@ -18,8 +18,7 @@ ############################################################################## """Setup for zope.traversing package """ -import os -import sys + from setuptools import setup, find_packages @@ -32,20 +31,6 @@ long_description = (read('README.rst') + read('CHANGES.rst')) -def test_suite(): - # use the zope.testrunner machinery to find all the - # test suites we've put under ourselves - from zope.testrunner.options import get_options - from zope.testrunner.find import find_suites - from unittest import TestSuite - here = os.path.abspath(os.path.dirname(sys.argv[0])) - args = sys.argv[:] - src = os.path.join(here, 'src') - defaults = ['--test-path', src] - options = get_options(args, defaults) - suites = list(find_suites(options)) - return TestSuite(suites) - TESTS_REQUIRE = [ 'zope.annotation', 'zope.browserresource[zcml]>=3.12', @@ -60,7 +45,7 @@ TESTS_REQUIRE = [ setup( name='zope.traversing', version='4.2.0.dev0', - url='http://pypi.python.org/pypi/zope.traversing', + url='http://github.com/zopefoundation/zope.traversing', license='ZPL 2.1', author='Zope Foundation and Contributors', author_email='zope-dev@zope.org', @@ -74,9 +59,9 @@ setup( '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 :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Natural Language :: English', @@ -87,7 +72,9 @@ setup( packages=find_packages('src'), package_dir={'': 'src'}, namespace_packages=['zope'], - extras_require=dict(test=TESTS_REQUIRE), + extras_require={ + 'test': TESTS_REQUIRE, + }, install_requires=[ 'setuptools', 'six', @@ -102,7 +89,6 @@ setup( 'zope.security', ], tests_require=TESTS_REQUIRE, - test_suite='__main__.test_suite', include_package_data=True, zip_safe=False, ) @@ -1,22 +1,20 @@ [tox] -envlist = py27,py33,py34,py35,pypy +envlist = + py27,py34,py35,py36,pypy,pypy3,coverage [testenv] -commands = python setup.py -q test -q +commands = + zope-testrunner --test-path=src [] deps = - six - transaction - zope.annotation - zope.browserresource[zcml] - zope.component[zcml] - zope.configuration - zope.i18n - zope.i18nmessageid - zope.interface - zope.location - zope.proxy - zope.publisher - zope.security[zcml] - zope.tales - zope.testing - zope.testrunner + .[test] + +[testenv:coverage] +usedevelop = true +basepython = + python2.7 +commands = + coverage run -m zope.testrunner --test-path=src [] + coverage report --fail-under=95 +deps = + {[testenv]deps} + coverage |