Back to development: 4.0.1
Switch to new Framework :: Zope :: 3 classifier See https://github.com/zopefoundation/z3c.authviewlet/pull/6#discussion_r226414566 for the background behind this.
Add Python 3.7 and fix deprecation warnings. Fixes #2
Merge pull request #3 from zopefoundation/issue2 Add Python 3.7 and fix deprecation warnings.
Preparing release 4.1.0
@@ -5,7 +5,13 @@ python:
|
|
5 |
- 3.4
|
6 |
- 3.5
|
7 |
- 3.6
|
8 |
-
- pypy
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
script:
|
10 |
- coverage run -m zope.testrunner --test-path=src --auto-color --auto-progress
|
11 |
|
5 |
- 3.4
|
6 |
- 3.5
|
7 |
- 3.6
|
8 |
+
- pypy
|
9 |
+
- pypy3
|
10 |
+
matrix:
|
11 |
+
include:
|
12 |
+
- python: "3.7"
|
13 |
+
dist: xenial
|
14 |
+
sudo: true
|
15 |
script:
|
16 |
- coverage run -m zope.testrunner --test-path=src --auto-color --auto-progress
|
17 |
|
@@ -2,6 +2,12 @@
|
|
2 |
CHANGES
|
3 |
=======
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
4.0.0 (2017-05-02)
|
6 |
------------------
|
7 |
|
2 |
CHANGES
|
3 |
=======
|
4 |
|
5 |
+
4.1.0 (2018-10-22)
|
6 |
+
------------------
|
7 |
+
|
8 |
+
- Add support for Python 3.7.
|
9 |
+
|
10 |
+
|
11 |
4.0.0 (2017-05-02)
|
12 |
------------------
|
13 |
|
@@ -58,7 +58,7 @@ def read(*rnames):
|
|
58 |
]
|
59 |
|
60 |
setup(name='zope.app.component',
|
61 |
-
version='4.
|
62 |
author='Zope Corporation and Contributors',
|
63 |
author_email='zope-dev@zope.org',
|
64 |
description='Local Zope Component Support',
|
@@ -74,18 +74,21 @@ def read(*rnames):
|
|
74 |
'Intended Audience :: Developers',
|
75 |
'License :: OSI Approved :: Zope Public License',
|
76 |
'Programming Language :: Python',
|
|
|
77 |
'Programming Language :: Python :: 2.7',
|
|
|
78 |
'Programming Language :: Python :: 3.4',
|
79 |
'Programming Language :: Python :: 3.5',
|
80 |
'Programming Language :: Python :: 3.6',
|
|
|
81 |
'Programming Language :: Python :: Implementation :: CPython',
|
82 |
'Programming Language :: Python :: Implementation :: PyPy',
|
83 |
'Natural Language :: English',
|
84 |
'Operating System :: OS Independent',
|
85 |
'Topic :: Internet :: WWW/HTTP',
|
86 |
-
'Framework ::
|
87 |
],
|
88 |
-
url='
|
89 |
license='ZPL 2.1',
|
90 |
packages=find_packages('src'),
|
91 |
package_dir={'': 'src'},
|
58 |
]
|
59 |
|
60 |
setup(name='zope.app.component',
|
61 |
+
version='4.1.0',
|
62 |
author='Zope Corporation and Contributors',
|
63 |
author_email='zope-dev@zope.org',
|
64 |
description='Local Zope Component Support',
|
74 |
'Intended Audience :: Developers',
|
75 |
'License :: OSI Approved :: Zope Public License',
|
76 |
'Programming Language :: Python',
|
77 |
+
'Programming Language :: Python :: 2',
|
78 |
'Programming Language :: Python :: 2.7',
|
79 |
+
'Programming Language :: Python :: 3',
|
80 |
'Programming Language :: Python :: 3.4',
|
81 |
'Programming Language :: Python :: 3.5',
|
82 |
'Programming Language :: Python :: 3.6',
|
83 |
+
'Programming Language :: Python :: 3.7',
|
84 |
'Programming Language :: Python :: Implementation :: CPython',
|
85 |
'Programming Language :: Python :: Implementation :: PyPy',
|
86 |
'Natural Language :: English',
|
87 |
'Operating System :: OS Independent',
|
88 |
'Topic :: Internet :: WWW/HTTP',
|
89 |
+
'Framework :: Zope :: 3',
|
90 |
],
|
91 |
+
url='https://github.com/zopefoundation/zope.app.component',
|
92 |
license='ZPL 2.1',
|
93 |
packages=find_packages('src'),
|
94 |
package_dir={'': 'src'},
|
@@ -69,7 +69,7 @@ def registrations(self):
|
|
69 |
return registrations
|
70 |
|
71 |
def update(self):
|
72 |
-
registrations =
|
73 |
for id in self.request.form.get('ids', ()):
|
74 |
r = registrations.get(id)
|
75 |
if r is not None:
|
@@ -79,7 +79,7 @@ def __call__(self):
|
|
79 |
self.update()
|
80 |
return self.render()
|
81 |
|
82 |
-
@component.adapter(zope.
|
83 |
zope.publisher.interfaces.browser.IBrowserRequest)
|
84 |
@interface.implementer(IRegistrationDisplay)
|
85 |
class UtilityRegistrationDisplay(object):
|
@@ -187,28 +187,28 @@ class AddUtilityRegistration(form.Form):
|
|
187 |
|
188 |
form_fields = form.Fields(
|
189 |
schema.Choice(
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
schema.TextLine(
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
schema.Text(
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
|
213 |
name = provided = None
|
214 |
|
69 |
return registrations
|
70 |
|
71 |
def update(self):
|
72 |
+
registrations = {r.id(): r for r in self.registrations()}
|
73 |
for id in self.request.form.get('ids', ()):
|
74 |
r = registrations.get(id)
|
75 |
if r is not None:
|
79 |
self.update()
|
80 |
return self.render()
|
81 |
|
82 |
+
@component.adapter(zope.interface.interfaces.IUtilityRegistration,
|
83 |
zope.publisher.interfaces.browser.IBrowserRequest)
|
84 |
@interface.implementer(IRegistrationDisplay)
|
85 |
class UtilityRegistrationDisplay(object):
|
187 |
|
188 |
form_fields = form.Fields(
|
189 |
schema.Choice(
|
190 |
+
__name__='provided',
|
191 |
+
title=_("Provided interface"),
|
192 |
+
description=_("The interface provided by the utility"),
|
193 |
+
vocabulary="Utility Component Interfaces",
|
194 |
+
required=True,
|
195 |
+
),
|
196 |
schema.TextLine(
|
197 |
+
__name__='name',
|
198 |
+
title=_("Register As"),
|
199 |
+
description=_("The name under which the utility will be known."),
|
200 |
+
required=False,
|
201 |
+
default=u'',
|
202 |
+
missing_value=u''
|
203 |
+
),
|
204 |
schema.Text(
|
205 |
+
__name__='comment',
|
206 |
+
title=_("Comment"),
|
207 |
+
required=False,
|
208 |
+
default=u'',
|
209 |
+
missing_value=u''
|
210 |
+
),
|
211 |
+
)
|
212 |
|
213 |
name = provided = None
|
214 |
|
@@ -34,7 +34,7 @@
|
|
34 |
from zope.traversing.interfaces import ITraversable
|
35 |
|
36 |
def buildSampleFolderTree():
|
37 |
-
"""
|
38 |
Create a tree of folders and return the root::
|
39 |
|
40 |
____________ rootFolder ______________________________
|
34 |
from zope.traversing.interfaces import ITraversable
|
35 |
|
36 |
def buildSampleFolderTree():
|
37 |
+
r"""
|
38 |
Create a tree of folders and return the root::
|
39 |
|
40 |
____________ rootFolder ______________________________
|
@@ -1,6 +1,6 @@
|
|
1 |
[tox]
|
2 |
envlist =
|
3 |
-
py27, pypy, py34, py35, py36
|
4 |
|
5 |
[testenv]
|
6 |
commands =
|
1 |
[tox]
|
2 |
envlist =
|
3 |
+
py27, pypy, py34, py35, py36, py37
|
4 |
|
5 |
[testenv]
|
6 |
commands =
|
NOTE: this package is deprecated. Its functionality has been moved to more reusable packages, namely: zope.component, zope.security, zope.site and zope.componentvocabulary. Please import from there instead.
This package provides various ZCML directives (view, resource) and a user interface related to local component management.
.. contents::
Add support for Python 3.8, 3.9, 3.10, 3.11.
Drop support for Python 2.7, 3.4, 3.5, 3.6.
Remove deprecated:
zope.app.component.getNextUtility
(import from zope.site
)zope.app.component.queryNextUtility
(import from zope.site
)zope.app.component.getNextSiteManager
(no replacement)zope.app.component.queryNextSiteManager
(no replacement)Remove test dependencies on zope.app.testing, zope.app.zcmlfiles, and others.
Remove install dependency on zope.app.form, replaced with direct imports of zope.formlib.
Simplify zope.app.component.testing
to remove the deprecated or
broken functionality in testingNextUtility
and
SiteManagerStub
. PlacefulSetup
is retained (and incorporates
much of what was previously inherited from zope.app.testing
),
although use of zope.component.testing.PlacelessSetup
is
suggested when possible.
Add support for PyPy and Python 3.4, 3.5 and 3.6.
Replaced an undeclared test dependency on zope.app.authentication
with
zope.password
.
Removed unneeded dependencies.
zope.app.securitypolicy
with one on
zope.securitypolicy
.No longer using deprecated zope.testing.doctest
. Use python's build-in
doctest
instead.
Replaced the dependency on zope.deferredimport
with BBB imports.
Added missing BBB import in zope.app.component.metaconfigure
.
Requiring at least zope.component
3.8 where some modules have
moved which are BBB imported here.
Import hooks functionality from zope.component after it was moved there from zope.site.
Import ISite and IPossibleSite from zope.component after they were moved there from zope.location. This lifts the direct dependency on zope.location.
Fix tests using a newer zope.publisher that requires zope.login.
zope.app.interface
.zope.app.component.metadirectives
.IMPORTANT: this package is now empty except for some ZMI definitions
in zope.app.component.browser. Functionality from this package has
been moved to zope.site
, zope.componentvocabulary
and
zope.component
, so preferably import from those locations.
zope.componentvocabulary has the vocabulary implementations that were in zope.app.componentvocabulary now, import them from there for backwards compatibility.
moved zope:resource and zope:view directive implementation and tests over into zope.component [zcml].
zope:defaultView
directive and its
implementation. New directive to set default view is
browser:defaultView
.Make class
directive schemas importable from old location,
raising a deprecation warning. It was moved in the previous release,
but some custom directives could possibly use its schemas.
Deprecate import of ClassDirective to announce about new location.
Change package's mailing list address to zope-dev at zope.org, because zope3-dev at zope.org is now retired.
Adapt to the move of IDefaultViewName from zope.component.interfaces to zope.publisher.interfaces.
Moved the implementation of the <class> directive from this package to
zope.security
. In particular, the module
zope.app.component.contentdirective
has moved to
zope.security.metaconfigure
, and a compatibility import has been
left in its place.
Extracted zope.site
from zope.app.component with backwards
compatibility imports in place. Local site related functionality
is now in zope.site
and packages should import from there.
Remove more deprecated on 3.5 code:
Remove "back35" extras_require as it doesn't make any sense now.
Remove zope.modulealias test dependency as it is not used anywhere.
Deprecate ISite and IPossibleSite imports from zope.app.component.interfaces. They were moved to zope.location.interfaces ages ago. Fix imports in zope.app.component itself.
ZopeSecurityPolicy
deprecation warning.