diff --git a/.travis.yml b/.travis.yml index 38a5a1f..7938527 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,13 @@ python: - 3.4 - 3.5 - 3.6 - - pypy-5.4.1 + - pypy + - pypy3 +matrix: + include: + - python: "3.7" + dist: xenial + sudo: true script: - coverage run -m zope.testrunner --test-path=src --auto-color --auto-progress diff --git a/CHANGES.rst b/CHANGES.rst index 4945352..5e68a29 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,15 +1,17 @@ -======= -CHANGES -======= +========= + CHANGES +========= -2.1.1 (unreleased) ------------------- +2.2.0 (unreleased) +================== -- Nothing changed yet. +- Add support for Python 3.7. + +- Drop support for Python 3.3. 2.1.0 (2017-05-03) ------------------- +================== - Add support for Python 3.4, 3.5, 3.6 and PyPy. @@ -18,7 +20,7 @@ CHANGES 2.0.0 (2012-11-17) ------------------- +================== - zope.configuration changed action tuples to action dicts. This version works with the new action dict given from zope.configuration since version 3.8.0. @@ -27,7 +29,7 @@ CHANGES 1.3.0 (2010-10-28) ------------------- +================== - Fundamental change in the way how baseregistry hooks into ZCA. Now it uses hooks.setSite, which requires that zope.component hooks @@ -38,13 +40,13 @@ CHANGES 1.2.0 (2009-12-27) ------------------- +================== - Moved browser dependencies to zmi extras 1.1.0 (2009-03-19) ------------------- +================== - Fix base registry management form failure in case, when a site has its parent's local site manager (that isn't registered as utility) in its @@ -56,6 +58,6 @@ CHANGES 1.0.0 (2008-01-24) ------------------- +================== - Initial Release diff --git a/setup.py b/setup.py index 1c30982..077adea 100644 --- a/setup.py +++ b/setup.py @@ -49,7 +49,7 @@ def read(*rnames): 'webtest', ] -setup ( +setup( name="z3c.baseregistry", version='2.1.1.dev0', author="Stephan Richter, Roger Ineichen and the Zope Community", @@ -76,10 +76,10 @@ def read(*rnames): '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 :: 3.7', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Natural Language :: English', @@ -87,7 +87,7 @@ def read(*rnames): 'Topic :: Internet :: WWW/HTTP', 'Framework :: Zope :: 3' ], - url='http://github.com/zopefoundation/z3c.baseregistry', + url='https://github.com/zopefoundation/z3c.baseregistry', packages=find_packages('src'), include_package_data=True, package_dir={'': 'src'}, @@ -101,11 +101,11 @@ def read(*rnames): tests_require=tests_require, install_requires=[ 'setuptools', - 'zope.component[hook,zcml] >= 4.3.0', - 'zope.configuration >= 4.1.0', + 'zope.component[hook,zcml] >= 4.5.0', + 'zope.configuration >= 4.3.0', 'zope.i18nmessageid >= 2.2', 'zope.interface', - 'zope.schema', + 'zope.schema >= 4.9.0', 'zope.site', ], zip_safe=False, diff --git a/src/z3c/baseregistry/README.rst b/src/z3c/baseregistry/README.rst index 61d60ba..5a00dd5 100644 --- a/src/z3c/baseregistry/README.rst +++ b/src/z3c/baseregistry/README.rst @@ -117,7 +117,7 @@ However, when reading the jar, we get an error: This is because we have not registered the registry in its parent as an ``IComponents`` utility, yet: - >>> from zope.component.interfaces import IComponents + >>> from zope.interface.interfaces import IComponents >>> zope.component.provideUtility(myRegistry, IComponents, 'myRegistry') >>> pickle.loads(jar) @@ -172,7 +172,7 @@ we can register the registry: ... ... ... ... @@ -549,8 +549,8 @@ benefit. ... ''', context=context) ... except Exception as e: ... print(e) - File... - ConfigurationError: Nested ``registerIn`` directives are not permitted. + Nested ``registerIn`` directives are not permitted. + File... Cleanup ~~~~~~~ diff --git a/src/z3c/baseregistry/baseregistry.py b/src/z3c/baseregistry/baseregistry.py index 3393951..ad1147e 100644 --- a/src/z3c/baseregistry/baseregistry.py +++ b/src/z3c/baseregistry/baseregistry.py @@ -15,10 +15,11 @@ """ __docformat__ = "reStructuredText" -from zope.component import globalregistry, interfaces +from zope.component import globalregistry +from zope.interface.interfaces import IComponents def BC(components, name): - return components.getUtility(interfaces.IComponents, name) + return components.getUtility(IComponents, name) class BaseComponents(globalregistry.BaseGlobalComponents): """An ``IComponents`` implementation that serves as base for other diff --git a/tox.ini b/tox.ini index 89b6219..b584544 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,19 @@ [tox] envlist = - py27, pypy, py34, py35, py36 + py27, pypy, py34, py35, py36, py37, coverage [testenv] commands = zope-testrunner --test-path=src [] +extras = test + + +[testenv:coverage] +usedevelop = true +basepython = + python3.6 +commands = + coverage run -m zope.testrunner --test-path=src + coverage report --fail-under=100 deps = - .[test] + coverage