pypi package 'zope-app-component'

Popularity: Low
Description: Local Zope Component Support
Installation: pip install zope-app-component
Last version: 5.0 (Download)
Homepage: https://github.com/zopefoundation/zope.app.component
Size: 30.44 kB
License: ZPL 2.1
Keywords: zope, component, architecture, local

Activity

Last modified: February 21, 2023 7:44 AM (a month ago)
Versions released in one year: 1
Weekly downloads: 88
04/03/202206/19/202209/04/202211/20/202202/05/202307014021028001234released versions / week
  • Versions released
  • Weekly downloads

What's new in version 4.1.0

Delta between version 4.0.0 and version 4.1.0

Source: Github
Commits:
  • 430102fb309370f8132187a3e84301de6f951eff, May 2, 2017 1:52 PM:
    Back to development: 4.0.1
  • 446ccfeba33979575619526b4d2941bff273929a, October 18, 2018 9:58 PM:
    Switch to new Framework :: Zope :: 3 classifier
    
    See https://github.com/zopefoundation/z3c.authviewlet/pull/6#discussion_r226414566
    for the background behind this.
  • 77b4c3ed7796fc6cefa28ce2f999c92be1a581d1, October 21, 2018 3:48 PM:
    Add Python 3.7 and fix deprecation warnings.
    
    Fixes #2
  • f89853538a7d6815ec92f00150123dc20d83dc2b, October 22, 2018 12:35 PM:
    Merge pull request #3 from zopefoundation/issue2
    
    Add Python 3.7 and fix deprecation warnings.
  • 2532eca3bd439643f346aab6f17b294fe27ebd8e, October 22, 2018 12:36 PM:
    Preparing release 4.1.0
Files changed:
.travis.yml CHANGED
@@ -5,7 +5,13 @@ python:
5
  - 3.4
6
  - 3.5
7
  - 3.6
8
- - pypy-5.4.1
 
 
 
 
 
 
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
 
CHANGES.rst CHANGED
@@ -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
 
setup.py CHANGED
@@ -58,7 +58,7 @@ def read(*rnames):
58
  ]
59
 
60
  setup(name='zope.app.component',
61
- version='4.0.0',
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 :: Zope3',
87
  ],
88
- url='http://github.com/zopefoundation/zope.app.component',
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'},
src/zope/app/component/browser/registration.py CHANGED
@@ -69,7 +69,7 @@ def registrations(self):
69
  return registrations
70
 
71
  def update(self):
72
- registrations = dict([(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,7 +79,7 @@ def __call__(self):
79
  self.update()
80
  return self.render()
81
 
82
- @component.adapter(zope.component.interfaces.IUtilityRegistration,
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
- __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
 
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
 
src/zope/app/component/testing.py CHANGED
@@ -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 ______________________________
tox.ini CHANGED
@@ -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 =

Readme

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::

======= CHANGES

5.0 (2023-02-21)

  • 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)

4.1.0 (2018-10-22)

  • Add support for Python 3.7.

4.0.0 (2017-05-02)

  • 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.

3.9.3 (2011-07-27)

  • Replaced an undeclared test dependency on zope.app.authentication with zope.password.

  • Removed unneeded dependencies.

3.9.2 (2010-09-17)

  • Replaced a testing dependency on zope.app.securitypolicy with one on zope.securitypolicy.

3.9.1 (2010-09-01)

  • No longer using deprecated zope.testing.doctest. Use python's build-in doctest instead.

  • Replaced the dependency on zope.deferredimport with BBB imports.

3.9.0 (2010-07-19)

  • 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.

3.8.4 (2010-01-08)

  • 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.

3.8.3 (2009-07-11)

  • Removed unnecessary dependency on zope.app.interface.

3.8.2 (2009-05-22)

  • Fix missing import in zope.app.component.metadirectives.

3.8.1 (2009-05-21)

  • Add deprecation note.

3.8.0 (2009-05-21)

  • 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].

3.7.0 (2009-04-01)

  • Removed deprecated zope:defaultView directive and its implementation. New directive to set default view is browser:defaultView.

3.6.1 (2009-03-12)

  • 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.

3.6.0 (2009-01-31)

  • 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:

    • zope.app.component.fields module that was pointing to the removed back35's LayerField.
    • zope.app.component.interface module that was moved to zope.component.interface ages ago.
    • zope:content and zope:localUtility directives.
    • zope:factory directive.
    • deprecated imports in zope.component.metaconfigure
    • browser:tool directive and all zope.component.browser meta.zcml stuff.
  • 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.

3.5.0 (2008-10-13)

  • Remove deprecated code slated for removal on 3.5.

3.4.1 (2007-10-31)

  • Resolve ZopeSecurityPolicy deprecation warning.

3.4.0 (2007-10-11)

  • Initial release independent of the main Zope tree.