--- a/buildout.cfg Tue Dec 11 09:38:24 2018 +0100
+++ b/buildout.cfg Fri Dec 14 18:32:37 2018 +0100
@@ -96,4 +96,4 @@
eggs = pyams_utils [test]
[versions]
-pyams_utils = 0.1.24.1
+pyams_utils = 0.1.25
--- a/docs/HISTORY.txt Tue Dec 11 09:38:24 2018 +0100
+++ b/docs/HISTORY.txt Fri Dec 14 18:32:37 2018 +0100
@@ -1,6 +1,10 @@
Changelog
=========
+0.1.25
+------
+ - updated "factory_config" decorator so that decorated class automatically implements the interface provided by factory
+
0.1.24.1
--------
- added 'order' attribute to INode interface
--- a/setup.py Tue Dec 11 09:38:24 2018 +0100
+++ b/setup.py Fri Dec 14 18:32:37 2018 +0100
@@ -25,7 +25,7 @@
README = os.path.join(DOCS, 'README.txt')
HISTORY = os.path.join(DOCS, 'HISTORY.txt')
-version = '0.1.24.1'
+version = '0.1.25'
long_description = open(README).read() + '\n\n' + open(HISTORY).read()
tests_require = [
--- a/src/pyams_utils.egg-info/PKG-INFO Tue Dec 11 09:38:24 2018 +0100
+++ b/src/pyams_utils.egg-info/PKG-INFO Fri Dec 14 18:32:37 2018 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: pyams-utils
-Version: 0.1.24.1
+Version: 0.1.25
Summary: Utility functions and classes for PyAMS
Home-page: http://www.ztfy.org
Author: Thierry Florac
@@ -47,6 +47,10 @@
Changelog
=========
+ 0.1.25
+ ------
+ - updated "factory_config" decorator so that decorated class automatically implements the interface provided by factory
+
0.1.24.1
--------
- added 'order' attribute to INode interface
--- a/src/pyams_utils/attr.py Tue Dec 11 09:38:24 2018 +0100
+++ b/src/pyams_utils/attr.py Fri Dec 14 18:32:37 2018 +0100
@@ -12,16 +12,11 @@
__docformat__ = 'restructuredtext'
-
-# import standard library
-
-# import interfaces
+from pyramid.exceptions import NotFound
+from zope.interface import Interface
from zope.traversing.interfaces import ITraversable
-# import packages
from pyams_utils.adapter import ContextAdapter, adapter_config
-from pyramid.exceptions import NotFound
-from zope.interface import Interface
@adapter_config(name='attr', context=Interface, provides=ITraversable)
@@ -33,10 +28,12 @@
/path/to/object/++attr++name
- Whare *name* is the name of the requested attribute
+ Where *name* is the name of the requested attribute
"""
def traverse(self, name, furtherpath=None):
+ if '.' in name:
+ name = name.split('.', 1)
try:
return getattr(self.context, name)
except AttributeError: