Skip to content

Commit

Permalink
Merge pull request #4 from zopefoundation/issue3
Browse files Browse the repository at this point in the history
Add Python 3.7, drop 3.3. Fix tests and DeprecationWarnings.
  • Loading branch information
jamadden committed Oct 19, 2018
2 parents 6fa215b + 686a1b9 commit aea5a44
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 27 deletions.
8 changes: 7 additions & 1 deletion .travis.yml
Expand Up @@ -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

Expand Down
26 changes: 14 additions & 12 deletions 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.

Expand All @@ -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.
Expand All @@ -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
Expand All @@ -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
Expand All @@ -56,6 +58,6 @@ CHANGES


1.0.0 (2008-01-24)
------------------
==================

- Initial Release
12 changes: 6 additions & 6 deletions setup.py
Expand Up @@ -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",
Expand All @@ -76,18 +76,18 @@ 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',
'Operating System :: OS Independent',
'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'},
Expand All @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions src/z3c/baseregistry/README.rst
Expand Up @@ -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)
Expand Down Expand Up @@ -172,7 +172,7 @@ we can register the registry:
...
... <utility
... component="README.custom"
... provides="zope.component.interfaces.IComponents"
... provides="zope.interface.interfaces.IComponents"
... name="custom" />
...
... </configure>
Expand Down Expand Up @@ -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
~~~~~~~
Expand Down
5 changes: 3 additions & 2 deletions src/z3c/baseregistry/baseregistry.py
Expand Up @@ -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
Expand Down
14 changes: 12 additions & 2 deletions 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

0 comments on commit aea5a44

Please sign in to comment.