Grokcore-component

Latest version: v3.0.2

Safety actively analyzes 630254 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 4

2.0

----------------

* Use a newer version of Martian that has better support for
inheritance. This is demonstrated in ``tests/inherit``.

* The ``ContextGrokker`` and the ``scan.py`` module have gone away
thanks the newer Martian.

* Directive implementations (in their factory method) should *not*
bind directives. Directive binding cannot take place at import time,
but only at grok time. Binding directives during import time (when
directives are executed) can lead to change problems. (we noticed
this during our refactoring to use the new Martian).

* Use 1.0b1 versions.cfg in Grok's release info instead of a local
copy; a local copy for all grokcore packages is just too hard to
maintain.

1.7

----------------

* Add missing provider, global_adapter, implementsOnly, classProvides() to
the module interface so that they are included in __all__

1.6

----------------

* Add convenience imports for implementsOnly() and classProvides() class
declarations form zope.interface.

* Add support for registering global adapters at module level::

grok.global_adapter(factory, (IAdapted1, IAdapted2,), IProvided, name=u"name")

Only 'factory' is required. If only a single interface is adapted, the
second argument may be a single interface instead of a tuple. If the
component has declared adapted/provided interfaces, the second and third
arguments may be omitted.

* Add support for an provider decorator to let a function directly provide
an interface::

grok.provider(IFoo, IBar)
def some_function():
...

This is equivalent to doing alsoProvides(some_function, IFoo, IBar).

* Add support for named adapters with the adapter decorator::

grok.adapter(IAdaptedOne, IAdaptedTwo, name=u"foo")
def some_function(one, two):
...

1.5.1

------------------

* The ``IGrokcoreComponentAPI`` interface was missing declarations for
the ``title`` and ``description`` directives.

1.5

----------------

* Fix https://bugs.launchpad.net/grok/+bug/242353: grokcore.component
contains old-style test setup. There is no `register_all_tests`
method in grokcore.component.testing anymore. Use z3c.testsetup
instead.

* Allow functions that have been marked with grok.subscribe also be
registered with ``zope.component.provideHandler()`` manually. This
is useful for unit tests where you may not want to grok a whole
module.

* Document grokcore.component's public API in an interface,
``IGrokcoreComponentAPI``. When you now do::

from grokcore.component import *

only the items documented in that interface will be imported into
your local namespace.

1.4

----------------

* Ported class grokkers to make use of further improvements in Martian.
This requires Martian 0.10.

Page 3 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.