Skip to content

Commit

Permalink
Add Python 3.7 and fix deprecation warnings.
Browse files Browse the repository at this point in the history
Fixes #2
  • Loading branch information
jamadden committed Oct 21, 2018
1 parent 446ccfe commit 77b4c3e
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 29 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
4 changes: 2 additions & 2 deletions CHANGES.rst
Expand Up @@ -2,10 +2,10 @@
CHANGES
=======

4.0.1 (unreleased)
4.1.0 (unreleased)
------------------

- Nothing changed yet.
- Add support for Python 3.7.


4.0.0 (2017-05-02)
Expand Down
7 changes: 5 additions & 2 deletions setup.py
Expand Up @@ -58,7 +58,7 @@ def read(*rnames):
]

setup(name='zope.app.component',
version='4.0.1.dev0',
version='4.1.0.dev0',
author='Zope Corporation and Contributors',
author_email='zope-dev@zope.org',
description='Local Zope Component Support',
Expand All @@ -74,18 +74,21 @@ def read(*rnames):
'Intended Audience :: Developers',
'License :: OSI Approved :: Zope Public License',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 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/zope.app.component',
url='https://github.com/zopefoundation/zope.app.component',
license='ZPL 2.1',
packages=find_packages('src'),
package_dir={'': 'src'},
Expand Down
44 changes: 22 additions & 22 deletions src/zope/app/component/browser/registration.py
Expand Up @@ -69,7 +69,7 @@ def registrations(self):
return registrations

def update(self):
registrations = dict([(r.id(), r) for r in self.registrations()])
registrations = {r.id(): r for r in self.registrations()}
for id in self.request.form.get('ids', ()):
r = registrations.get(id)
if r is not None:
Expand All @@ -79,7 +79,7 @@ def __call__(self):
self.update()
return self.render()

@component.adapter(zope.component.interfaces.IUtilityRegistration,
@component.adapter(zope.interface.interfaces.IUtilityRegistration,
zope.publisher.interfaces.browser.IBrowserRequest)
@interface.implementer(IRegistrationDisplay)
class UtilityRegistrationDisplay(object):
Expand Down Expand Up @@ -187,28 +187,28 @@ class AddUtilityRegistration(form.Form):

form_fields = form.Fields(
schema.Choice(
__name__ = 'provided',
title=_("Provided interface"),
description=_("The interface provided by the utility"),
vocabulary="Utility Component Interfaces",
required=True,
),
__name__='provided',
title=_("Provided interface"),
description=_("The interface provided by the utility"),
vocabulary="Utility Component Interfaces",
required=True,
),
schema.TextLine(
__name__ = 'name',
title=_("Register As"),
description=_("The name under which the utility will be known."),
required=False,
default=u'',
missing_value=u''
),
__name__='name',
title=_("Register As"),
description=_("The name under which the utility will be known."),
required=False,
default=u'',
missing_value=u''
),
schema.Text(
__name__ = 'comment',
title=_("Comment"),
required=False,
default=u'',
missing_value=u''
),
)
__name__='comment',
title=_("Comment"),
required=False,
default=u'',
missing_value=u''
),
)

name = provided = None

Expand Down
2 changes: 1 addition & 1 deletion src/zope/app/component/testing.py
Expand Up @@ -34,7 +34,7 @@
from zope.traversing.interfaces import ITraversable

def buildSampleFolderTree():
"""
r"""
Create a tree of folders and return the root::
____________ rootFolder ______________________________
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
@@ -1,6 +1,6 @@
[tox]
envlist =
py27, pypy, py34, py35, py36
py27, pypy, py34, py35, py36, py37

[testenv]
commands =
Expand Down

0 comments on commit 77b4c3e

Please sign in to comment.