Mock Version: 2.9 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/python-zope-component.spec'], chrootPath='/var/lib/mock/fedora-rawhide-x86_64-1611949101.297375/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=0uid=1001gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.ua35tk0p:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']unshare_net=TrueprintOutput=True) Using nspawn with args ['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.ua35tk0p:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '70e29f9ab65f40b29eb27ef0f5ece522', '-D', '/var/lib/mock/fedora-rawhide-x86_64-1611949101.297375/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.ua35tk0p:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/python-zope-component.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0'} and shell False Building target platforms: x86_64 Building for target x86_64 setting SOURCE_DATE_EPOCH=1595980800 Wrote: /builddir/build/SRPMS/python-zope-component-4.3.0-15.fc34.src.rpm Child return code was: 0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/python-zope-component.spec'], chrootPath='/var/lib/mock/fedora-rawhide-x86_64-1611949101.297375/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=0uid=1001gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.ua35tk0p:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']unshare_net=TrueprintOutput=True) Using nspawn with args ['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.ua35tk0p:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '377863e5dcd9450f86c80f32ee9a2cb8', '-D', '/var/lib/mock/fedora-rawhide-x86_64-1611949101.297375/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.ua35tk0p:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/python-zope-component.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0'} and shell False Building target platforms: x86_64 Building for target x86_64 setting SOURCE_DATE_EPOCH=1595980800 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.VTHM6Y + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf zope.component-4.3.0 + /usr/bin/gzip -dc /builddir/build/SOURCES/zope.component-4.3.0.tar.gz + /usr/bin/tar -xof - + STATUS=0 + '[' 0 -ne 0 ']' + cd zope.component-4.3.0 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + rm -rf zope.component.egg-info + RPM_EC=0 ++ jobs -p + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.SIclwI + umask 022 + cd /builddir/build/BUILD + cd zope.component-4.3.0 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' + /usr/bin/python3 setup.py build '--executable=/usr/bin/python3 -s' running build running build_py creating build creating build/lib creating build/lib/zope copying src/zope/__init__.py -> build/lib/zope creating build/lib/zope/component copying src/zope/component/zcml.py -> build/lib/zope/component copying src/zope/component/testlayer.py -> build/lib/zope/component copying src/zope/component/testing.py -> build/lib/zope/component copying src/zope/component/standalonetests.py -> build/lib/zope/component copying src/zope/component/security.py -> build/lib/zope/component copying src/zope/component/registry.py -> build/lib/zope/component copying src/zope/component/persistentregistry.py -> build/lib/zope/component copying src/zope/component/interfaces.py -> build/lib/zope/component copying src/zope/component/interface.py -> build/lib/zope/component copying src/zope/component/hooks.py -> build/lib/zope/component copying src/zope/component/hookable.py -> build/lib/zope/component copying src/zope/component/globalregistry.py -> build/lib/zope/component copying src/zope/component/factory.py -> build/lib/zope/component copying src/zope/component/eventtesting.py -> build/lib/zope/component copying src/zope/component/event.py -> build/lib/zope/component copying src/zope/component/_declaration.py -> build/lib/zope/component copying src/zope/component/_compat.py -> build/lib/zope/component copying src/zope/component/_api.py -> build/lib/zope/component copying src/zope/component/__init__.py -> build/lib/zope/component creating build/lib/zope/component/tests copying src/zope/component/tests/test_zcml.py -> build/lib/zope/component/tests copying src/zope/component/tests/test_standalone.py -> build/lib/zope/component/tests copying src/zope/component/tests/test_security.py -> build/lib/zope/component/tests copying src/zope/component/tests/test_registry.py -> build/lib/zope/component/tests copying src/zope/component/tests/test_persistentregistry.py -> build/lib/zope/component/tests copying src/zope/component/tests/test_interface.py -> build/lib/zope/component/tests copying src/zope/component/tests/test_hooks.py -> build/lib/zope/component/tests copying src/zope/component/tests/test_hookable.py -> build/lib/zope/component/tests copying src/zope/component/tests/test_globalregistry.py -> build/lib/zope/component/tests copying src/zope/component/tests/test_factory.py -> build/lib/zope/component/tests copying src/zope/component/tests/test_event.py -> build/lib/zope/component/tests copying src/zope/component/tests/test__declaration.py -> build/lib/zope/component/tests copying src/zope/component/tests/test__api.py -> build/lib/zope/component/tests copying src/zope/component/tests/test___init__.py -> build/lib/zope/component/tests copying src/zope/component/tests/examples.py -> build/lib/zope/component/tests copying src/zope/component/tests/__init__.py -> build/lib/zope/component/tests creating build/lib/zope/component/testfiles copying src/zope/component/testfiles/views.py -> build/lib/zope/component/testfiles copying src/zope/component/testfiles/components.py -> build/lib/zope/component/testfiles copying src/zope/component/testfiles/adapter.py -> build/lib/zope/component/testfiles copying src/zope/component/testfiles/__init__.py -> build/lib/zope/component/testfiles running egg_info writing src/zope.component.egg-info/PKG-INFO writing dependency_links to src/zope.component.egg-info/dependency_links.txt writing namespace_packages to src/zope.component.egg-info/namespace_packages.txt writing requirements to src/zope.component.egg-info/requires.txt writing top-level names to src/zope.component.egg-info/top_level.txt reading manifest file 'src/zope.component.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching '*.dll' found anywhere in distribution warning: no previously-included files matching '*.pyc' found anywhere in distribution warning: no previously-included files matching '*.pyo' found anywhere in distribution warning: no previously-included files matching '*.so' found anywhere in distribution warning: no previously-included files matching 'coverage.xml' found anywhere in distribution writing manifest file 'src/zope.component.egg-info/SOURCES.txt' copying src/zope/component/configure.zcml -> build/lib/zope/component copying src/zope/component/meta.zcml -> build/lib/zope/component copying src/zope/component/testfiles/testlayer.zcml -> build/lib/zope/component/testfiles ++ grep Author: PKG-INFO ++ sed -e 's/Author: //' + COPYRIGHT='Zope Foundation and Contributors' + cat + sphinx-build -b html docs/ html Running Sphinx v3.4.3 making output directory... done building [mo]: targets for 0 po files that are out of date building [html]: targets for 20 source files that are out of date updating environment: [new config] 20 added, 0 changed, 0 removed reading sources... [ 5%] api reading sources... [ 10%] api/adapter reading sources... [ 15%] api/factory reading sources... [ 20%] api/interface reading sources... [ 25%] api/interfaces reading sources... [ 30%] api/persistent reading sources... [ 35%] api/security reading sources... [ 40%] api/sitemanager reading sources... [ 45%] api/utility reading sources... [ 50%] configure reading sources... [ 55%] event reading sources... [ 60%] factory reading sources... [ 65%] hacking reading sources... [ 70%] hooks reading sources... [ 75%] index reading sources... [ 80%] narr reading sources... [ 85%] persistentregistry reading sources... [ 90%] socketexample reading sources... [ 95%] testlayer reading sources... [100%] zcml /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:4: WARNING: Unknown directive type "testsetup". .. testsetup:: from zope.component.testing import setUp setUp() /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:12: WARNING: Unknown directive type "autofunction". .. autofunction:: zope.component.getAdapterInContext /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:14: WARNING: Unknown directive type "autofunction". .. autofunction:: zope.component.queryAdapterInContext /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:24: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.interface import implementer >>> from zope.component.tests.examples import I1 >>> from zope.component.tests.examples import I2 >>> @implementer(I1) ... class Component(object): ... def __conform__(self, iface, default=None): ... if iface == I2: ... return 42 >>> ob = Component() /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:42: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component.globalregistry import BaseGlobalComponents >>> sitemanager = BaseGlobalComponents() /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:50: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component.tests.examples import ConformsToIComponentLookup >>> context = ConformsToIComponentLookup(sitemanager) /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:58: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component import getAdapterInContext >>> from zope.component import queryAdapterInContext >>> getAdapterInContext(ob, I1, context) is ob True >>> queryAdapterInContext(ob, I1, context) is ob True /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:70: WARNING: Unknown directive type "doctest". .. doctest:: >>> getAdapterInContext(ob, I2, context) 42 >>> queryAdapterInContext(ob, I2, context) 42 /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:80: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.interface import Interface >>> class I4(Interface): ... pass >>> getAdapterInContext(ob, I4, context) Traceback (most recent call last): ... ComponentLookupError: (, ) /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:94: WARNING: Unknown directive type "doctest". .. doctest:: >>> queryAdapterInContext(ob, I4, context, 44) 44 /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:102: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component.tests.examples import I3 >>> sitemanager.registerAdapter(lambda x: 43, (I1,), I3, '') >>> getAdapterInContext(ob, I3, context) 43 >>> queryAdapterInContext(ob, I3, context) 43 /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:114: WARNING: Unknown directive type "autofunction". .. autofunction:: zope.component.getAdapter /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:116: WARNING: Unknown directive type "autofunction". .. autofunction:: zope.component.queryAdapter /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:127: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component import getAdapter >>> from zope.component import queryAdapter >>> from zope.component.tests.examples import I2 >>> from zope.component.tests.examples import ob >>> getAdapter(ob, I2, '') Traceback (most recent call last): ... ComponentLookupError: (, , '') >>> queryAdapter(ob, I2, '', '') '' /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:145: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component import getGlobalSiteManager >>> from zope.component.tests.examples import Comp >>> gsm = getGlobalSiteManager() >>> gsm.registerAdapter(Comp, I1, I2, '') Traceback (most recent call last): ... TypeError: the required argument should be a list of interfaces, not a single interface /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:157: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component import getGlobalSiteManager >>> from zope.component.tests.examples import Comp >>> gsm = getGlobalSiteManager() >>> gsm.registerAdapter(Comp, (I1,), I2, '') /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:166: WARNING: Unknown directive type "doctest". .. doctest:: >>> adapted = getAdapter(ob, I2, '') >>> adapted.__class__ is Comp True >>> adapted.context is ob True >>> adapted = queryAdapter(ob, I2, '') >>> adapted.__class__ is Comp True >>> adapted.context is ob True /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:181: WARNING: Unknown directive type "doctest". .. doctest:: >>> getAdapter(ob, I2, 'named') Traceback (most recent call last): ... ComponentLookupError: (, , 'named') >>> queryAdapter(ob, I2, 'named', '') '' /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:194: WARNING: Unknown directive type "doctest". .. doctest:: >>> gsm.registerAdapter(Comp, (I1,), I2, 'named') >>> adapted = getAdapter(ob, I2, 'named') >>> adapted.__class__ is Comp True >>> adapted.context is ob True >>> adapted = queryAdapter(ob, I2, 'named') >>> adapted.__class__ is Comp True >>> adapted.context is ob True /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:215: WARNING: Unknown directive type "doctest". .. doctest:: >>> adapted = I2(ob) >>> adapted.__class__ is Comp True >>> adapted.context is ob True /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:225: WARNING: Unknown directive type "doctest". .. doctest:: >>> I2(object()) Traceback (most recent call last): ... TypeError: ('Could not adapt'... /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:234: WARNING: Unknown directive type "doctest". .. doctest:: >>> marker = object() >>> adapted = I2(object(), marker) >>> adapted is marker True /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:247: WARNING: Unknown directive type "doctest". .. doctest:: >>> gsm.registerAdapter(Comp, (None,), I2, '') >>> adapter = I2(ob) >>> adapter.__class__ is Comp True >>> adapter.context is ob True /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:258: WARNING: Unknown directive type "doctest". .. doctest:: >>> something = object() >>> adapter = I2(something) >>> adapter.__class__ is Comp True >>> adapter.context is something True /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:270: WARNING: Unknown directive type "autofunction". .. autofunction:: zope.component.getMultiAdapter /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:272: WARNING: Unknown directive type "autofunction". .. autofunction:: zope.component.queryMultiAdapter /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:278: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component.tests.examples import Ob2 >>> ob2 = Ob2() /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:287: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component import getMultiAdapter >>> getMultiAdapter((ob, ob2), I3) Traceback (most recent call last): ... ComponentLookupError: ((, ), , u'') /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:300: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component import queryMultiAdapter >>> queryMultiAdapter((ob, ob2), I3, default='') '' /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:311: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.interface import implementer >>> @implementer(I3) ... class DoubleAdapter(object): ... def __init__(self, first, second): ... self.first = first ... self.second = second /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:322: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component import getGlobalSiteManager >>> getGlobalSiteManager().registerAdapter(DoubleAdapter, (I1, I2), I3, '') /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:331: WARNING: Unknown directive type "doctest". .. doctest:: >>> adapter = getMultiAdapter((ob, ob2), I3) >>> adapter.__class__ is DoubleAdapter True >>> adapter.first is ob True >>> adapter.second is ob2 True /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:345: WARNING: Unknown directive type "autofunction". .. autofunction:: zope.component.getAdapters /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:353: WARNING: Unknown directive type "doctest". .. doctest:: >>> class I5(I1): ... pass >>> gsm.registerAdapter(Comp, [I1], I5, '') >>> gsm.registerAdapter(Comp, [None], I5, 'foo') /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:363: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component import getAdapters >>> adapters = sorted(getAdapters((ob,), I5)) >>> [(name, adapter.__class__.__name__) for name, adapter in adapters] [(u'', 'Comp'), (u'foo', 'Comp')] /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:373: WARNING: Unknown directive type "doctest". .. doctest:: >>> gsm.registerAdapter(lambda context: None, [I1], I5, 'nah') >>> adapters = sorted(getAdapters((ob,), I5)) >>> [(name, adapter.__class__.__name__) for name, adapter in adapters] [(u'', 'Comp'), (u'foo', 'Comp')] /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:384: WARNING: Unknown directive type "autofunction". .. autofunction:: zope.component.subscribers /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:389: WARNING: Unknown directive type "autofunction". .. autofunction:: zope.component.handle /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:394: WARNING: Unknown directive type "autofunction". .. autofunction:: zope.component.adapter /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:396: WARNING: Unknown directive type "autofunction". .. autofunction:: zope.component.adaptedBy /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:398: WARNING: Unknown directive type "autofunction". .. autofunction:: zope.component.adapts /builddir/build/BUILD/zope.component-4.3.0/docs/api/adapter.rst:401: WARNING: Unknown directive type "testcleanup". .. testcleanup:: from zope.component.testing import tearDown tearDown() /builddir/build/BUILD/zope.component-4.3.0/docs/api/factory.rst:4: WARNING: Unknown directive type "autofunction". .. autofunction:: zope.component.createObject /builddir/build/BUILD/zope.component-4.3.0/docs/api/factory.rst:6: WARNING: Unknown directive type "autofunction". .. autofunction:: zope.component.getFactoryInterfaces /builddir/build/BUILD/zope.component-4.3.0/docs/api/factory.rst:8: WARNING: Unknown directive type "autofunction". .. autofunction:: zope.component.getFactoriesFor /builddir/build/BUILD/zope.component-4.3.0/docs/api/interface.rst:4: WARNING: Unknown directive type "testsetup". .. testsetup:: from zope.component.testing import setUp setUp() /builddir/build/BUILD/zope.component-4.3.0/docs/api/interface.rst:12: WARNING: Unknown directive type "autofunction". .. autofunction:: zope.component.interface.provideInterface /builddir/build/BUILD/zope.component-4.3.0/docs/api/interface.rst:18: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.interface import Interface >>> from zope.interface.interfaces import IInterface >>> from zope.component.tests.examples import ITestType >>> from zope.component import getGlobalSiteManager >>> gsm = getGlobalSiteManager() >>> class IDemo(Interface): ... pass >>> IInterface.providedBy(IDemo) True >>> ITestType.providedBy(IDemo) False >>> list(gsm.getUtilitiesFor(ITestType)) [] /builddir/build/BUILD/zope.component-4.3.0/docs/api/interface.rst:37: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component.interface import provideInterface >>> provideInterface('', IDemo, ITestType) >>> ITestType.providedBy(IDemo) True >>> interfaces = list(gsm.getUtilitiesFor(ITestType)) >>> [iface.__name__ for (name, iface) in interfaces] ['IDemo'] /builddir/build/BUILD/zope.component-4.3.0/docs/api/interface.rst:49: WARNING: Unknown directive type "doctest". .. doctest:: >>> class IOtherType(IInterface): ... pass >>> provideInterface('', IDemo, IOtherType) >>> ITestType.providedBy(IDemo) True >>> IOtherType.providedBy(IDemo) True >>> interfaces = list(gsm.getUtilitiesFor(ITestType)) >>> [iface.__name__ for (name, iface) in interfaces] ['IDemo'] >>> interfaces = list(gsm.getUtilitiesFor(IOtherType)) >>> [iface.__name__ for (name, iface) in interfaces] ['IDemo'] /builddir/build/BUILD/zope.component-4.3.0/docs/api/interface.rst:65: WARNING: Unknown directive type "testcleanup". .. testcleanup:: from zope.component.testing import tearDown tearDown() /builddir/build/BUILD/zope.component-4.3.0/docs/api/interface.rst:71: WARNING: Unknown directive type "autofunction". .. autofunction:: zope.component.interface.getInterface /builddir/build/BUILD/zope.component-4.3.0/docs/api/interface.rst:73: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.interface import Interface >>> from zope.component.interface import getInterface >>> from zope.component.tests.examples import ITestType >>> from zope.component.tests.examples import IGI >>> IInterface.providedBy(IGI) True >>> ITestType.providedBy(IGI) False >>> getInterface(None, 'zope.component.tests.examples.IGI') Traceback (most recent call last): ... ComponentLookupError: zope.component.tests.examples.interface.IGI >>> provideInterface('', IGI, ITestType) >>> ITestType.providedBy(IGI) True >>> iface = getInterface(None, ... 'zope.component.tests.examples.IGI') >>> iface.__name__ 'IGI' /builddir/build/BUILD/zope.component-4.3.0/docs/api/interface.rst:96: WARNING: Unknown directive type "testcleanup". .. testcleanup:: from zope.component.testing import tearDown tearDown() /builddir/build/BUILD/zope.component-4.3.0/docs/api/interface.rst:102: WARNING: Unknown directive type "autofunction". .. autofunction:: zope.component.interface.queryInterface /builddir/build/BUILD/zope.component-4.3.0/docs/api/interface.rst:104: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.interface import Interface >>> from zope.interface.interfaces import IInterface >>> from zope.component.interface import queryInterface >>> from zope.component.tests.examples import ITestType >>> from zope.component.tests.examples import IQI >>> IInterface.providedBy(IQI) True >>> ITestType.providedBy(IQI) False >>> queryInterface('zope.component.tests.examples.IQI') is None True >>> provideInterface('', IQI, ITestType) >>> ITestType.providedBy(IQI) True >>> iface = queryInterface('zope.component.tests.examples.IQI') >>> iface.__name__ 'IQI' /builddir/build/BUILD/zope.component-4.3.0/docs/api/interface.rst:126: WARNING: Unknown directive type "testcleanup". .. testcleanup:: from zope.component.testing import tearDown tearDown() /builddir/build/BUILD/zope.component-4.3.0/docs/api/interface.rst:132: WARNING: Unknown directive type "autofunction". .. autofunction:: zope.component.interface.searchInterface /builddir/build/BUILD/zope.component-4.3.0/docs/api/interface.rst:134: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.interface import Interface >>> from zope.interface.interfaces import IInterface >>> from zope.component.interface import searchInterface >>> from zope.component.tests.examples import ITestType >>> from zope.component.tests.examples import ISI >>> IInterface.providedBy(ISI) True >>> ITestType.providedBy(ISI) False >>> searchInterface(None, 'zope.component.tests.examples.ISI') [] >>> provideInterface('', ISI, ITestType) >>> ITestType.providedBy(ISI) True >>> searchInterface(None, 'zope.component.tests.examples.ISI') == [ISI] True /builddir/build/BUILD/zope.component-4.3.0/docs/api/interface.rst:154: WARNING: Unknown directive type "testcleanup". .. testcleanup:: from zope.component.testing import tearDown tearDown() /builddir/build/BUILD/zope.component-4.3.0/docs/api/interface.rst:159: WARNING: Unknown directive type "autofunction". .. autofunction:: zope.component.interface.searchInterfaceIds /builddir/build/BUILD/zope.component-4.3.0/docs/api/interface.rst:161: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.interface import Interface >>> from zope.interface.interfaces import IInterface >>> from zope.component.interface import searchInterfaceIds >>> from zope.component.tests.examples import ITestType >>> from zope.component.tests.examples import ISII >>> IInterface.providedBy(ISII) True >>> ITestType.providedBy(ISII) False >>> searchInterfaceIds(None, 'zope.component.tests.examples.ISII') [] >>> provideInterface('', ISII, ITestType) >>> ITestType.providedBy(ISII) True >>> searchInterfaceIds(None, 'zope.component.tests.examples.ISII') [u'zope.component.tests.examples.ISII'] /builddir/build/BUILD/zope.component-4.3.0/docs/api/interface.rst:181: WARNING: Unknown directive type "testcleanup". .. testcleanup:: from zope.component.testing import tearDown tearDown() /builddir/build/BUILD/zope.component-4.3.0/docs/api/interfaces.rst:4: WARNING: Unknown directive type "automodule". .. automodule:: zope.component.interfaces .. autointerface:: IComponentArchitecture :members: :member-order: bysource .. autointerface:: IRegistry :members: :member-order: bysource .. autointerface:: IComponentRegistrationConvenience :members: :member-order: bysource .. autointerface:: IPossibleSite :members: :member-order: bysource .. autointerface:: ISite :members: :member-order: bysource .. autoexception:: Misused .. autointerface:: IFactory :members: :member-order: bysource /builddir/build/BUILD/zope.component-4.3.0/docs/api/persistent.rst:4: WARNING: Unknown directive type "testsetup". .. testsetup:: from zope.component.testing import setUp setUp() /builddir/build/BUILD/zope.component-4.3.0/docs/api/persistent.rst:17: WARNING: Unknown directive type "doctest". .. doctest:: >>> import ZODB.tests.util >>> db = ZODB.tests.util.DB() >>> import transaction >>> t1 = transaction.TransactionManager() >>> c1 = db.open(transaction_manager=t1) >>> r1 = c1.root() >>> t2 = transaction.TransactionManager() >>> c2 = db.open(transaction_manager=t2) >>> r2 = c2.root() /builddir/build/BUILD/zope.component-4.3.0/docs/api/persistent.rst:32: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component.persistentregistry import PersistentComponents >>> from zope.component.tests.examples import I1 >>> from zope.component.tests.examples import I2 >>> from zope.component.tests.examples import U >>> from zope.component.tests.examples import U1 >>> from zope.component.tests.examples import U12 >>> from zope.component.tests.examples import handle1 >>> from zope.component.tests.examples import handle2 >>> from zope.component.tests.examples import handle3 >>> from zope.component.tests.examples import handle4 >>> _ = t1.begin() >>> r1[1] = PersistentComponents('1') >>> t1.commit() >>> _ = t2.begin() >>> r2[2] = PersistentComponents('2', (r2[1], )) >>> t2.commit() >>> _ = t1.begin() >>> r1[3] = PersistentComponents('3', (r1[1], )) >>> t1.commit() >>> _ = t2.begin() >>> r2[4] = PersistentComponents('4', (r2[2], r2[3])) >>> t2.commit() >>> _ = t1.begin() >>> r1[1].__bases__ () >>> r1[2].__bases__ == (r1[1], ) True >>> r1[1].registerUtility(U1(1)) >>> r1[1].queryUtility(I1) U1(1) >>> r1[2].queryUtility(I1) U1(1) >>> t1.commit() >>> _ = t2.begin() >>> r2[1].registerUtility(U1(2)) >>> r2[2].queryUtility(I1) U1(2) >>> r2[4].queryUtility(I1) U1(2) >>> t2.commit() >>> _ = t1.begin() >>> r1[1].registerUtility(U12(1), I2) >>> r1[4].queryUtility(I2) U12(1) >>> t1.commit() >>> _ = t2.begin() >>> r2[3].registerUtility(U12(3), I2) >>> r2[4].queryUtility(I2) U12(3) >>> t2.commit() >>> _ = t1.begin() >>> r1[1].registerHandler(handle1, info="First handler") >>> r1[2].registerHandler(handle2, required=[U]) >>> r1[3].registerHandler(handle3) >>> r1[4].registerHandler(handle4) >>> r1[4].handle(U1(1)) handle1 U1(1) handle3 U1(1) handle2 (U1(1),) handle4 U1(1) >>> t1.commit() >>> _ = t2.begin() >>> r2[4].handle(U1(1)) handle1 U1(1) handle3 U1(1) handle2 (U1(1),) handle4 U1(1) >>> t2.abort() >>> db.close() /builddir/build/BUILD/zope.component-4.3.0/docs/api/persistent.rst:127: WARNING: Unknown directive type "doctest". .. doctest:: >>> import ZODB.tests.util >>> db = ZODB.tests.util.DB() >>> import transaction >>> t1 = transaction.TransactionManager() >>> c1 = db.open(transaction_manager=t1) >>> r1 = c1.root() >>> t2 = transaction.TransactionManager() >>> c2 = db.open(transaction_manager=t2) >>> r2 = c2.root() >>> from zope.component.persistentregistry import PersistentComponents >>> _ = t1.begin() >>> r1[1] = PersistentComponents('1') >>> r1[1].registerHandler(handle1) >>> r1[1].registerSubscriptionAdapter(handle1, provided=I2) >>> _ = r1[1].unregisterHandler(handle1) >>> _ = r1[1].unregisterSubscriptionAdapter(handle1, provided=I2) >>> t1.commit() >>> _ = t1.begin() >>> r1[1].registerHandler(handle1) >>> r1[1].registerSubscriptionAdapter(handle1, provided=I2) >>> t1.commit() >>> _ = t2.begin() >>> len(list(r2[1].registeredHandlers())) 1 >>> len(list(r2[1].registeredSubscriptionAdapters())) 1 >>> t2.abort() /builddir/build/BUILD/zope.component-4.3.0/docs/api/persistent.rst:165: WARNING: Unknown directive type "doctest". .. doctest:: >>> import persistent >>> import transaction >>> from zope.interface import Interface >>> from zope.interface import implements >>> class IFoo(Interface): ... pass >>> class Foo(persistent.Persistent): ... implements(IFoo) ... name = '' ... def __init__(self, name=''): ... self.name = name ... def __repr__(self): ... return 'Foo(%r)' % self.name >>> from zope.component.tests.examples import base >>> from zope.component.tests.examples import clear_base >>> len(base._v_subregistries) 0 >>> import ZODB.tests.util >>> db = ZODB.tests.util.DB() >>> tm1 = transaction.TransactionManager() >>> c1 = db.open(transaction_manager=tm1) >>> from zope.component.persistentregistry import PersistentAdapterRegistry >>> r1 = PersistentAdapterRegistry((base,)) >>> r2 = PersistentAdapterRegistry((r1,)) >>> c1.root()[1] = r1 >>> c1.root()[2] = r2 >>> tm1.commit() >>> r1._p_deactivate() >>> len(base._v_subregistries) 0 >>> tm2 = transaction.TransactionManager() >>> c2 = db.open(transaction_manager=tm2) >>> r1 = c2.root()[1] >>> r2 = c2.root()[2] >>> r1.lookup((), IFoo, '') >>> base.register((), IFoo, '', Foo('')) >>> r1.lookup((), IFoo, '') Foo('') >>> r2.lookup((), IFoo, '1') >>> r1.register((), IFoo, '1', Foo('1')) >>> r2.lookup((), IFoo, '1') Foo('1') >>> r1.lookup((), IFoo, '2') >>> r2.lookup((), IFoo, '2') >>> base.register((), IFoo, '2', Foo('2')) >>> r1.lookup((), IFoo, '2') Foo('2') >>> r2.lookup((), IFoo, '2') Foo('2') >>> db.close() >>> clear_base() /builddir/build/BUILD/zope.component-4.3.0/docs/api/persistent.rst:233: WARNING: Unknown directive type "testcleanup". .. testcleanup:: from zope.component.testing import tearDown tearDown() /builddir/build/BUILD/zope.component-4.3.0/docs/api/security.rst:4: WARNING: Unknown directive type "automodule". .. automodule:: zope.component.security .. autofunction:: securityAdapterFactory /builddir/build/BUILD/zope.component-4.3.0/docs/api/security.rst:11: WARNING: Unknown directive type "doctest". .. doctest:: >>> class Factory(object): ... pass /builddir/build/BUILD/zope.component-4.3.0/docs/api/security.rst:20: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component.security import securityAdapterFactory >>> from zope.security.adapter import LocatingUntrustedAdapterFactory >>> factory = securityAdapterFactory(Factory, 'zope.AnotherPermission', ... locate=False, trusted=False) >>> isinstance(factory, LocatingUntrustedAdapterFactory) True /builddir/build/BUILD/zope.component-4.3.0/docs/api/security.rst:31: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component.security import PublicPermission >>> factory = securityAdapterFactory(Factory, PublicPermission, ... locate=False, trusted=False) >>> factory is Factory True /builddir/build/BUILD/zope.component-4.3.0/docs/api/security.rst:41: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.security.checker import CheckerPublic >>> factory = securityAdapterFactory(Factory, CheckerPublic, ... locate=False, trusted=False) >>> factory is Factory True /builddir/build/BUILD/zope.component-4.3.0/docs/api/security.rst:51: WARNING: Unknown directive type "doctest". .. doctest:: >>> factory = securityAdapterFactory(Factory, None, ... locate=False, trusted=False) >>> factory is Factory True /builddir/build/BUILD/zope.component-4.3.0/docs/api/security.rst:61: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.security.adapter import TrustedAdapterFactory >>> factory = securityAdapterFactory(Factory, None, ... locate=False, trusted=True) >>> isinstance(factory, TrustedAdapterFactory) True /builddir/build/BUILD/zope.component-4.3.0/docs/api/security.rst:71: WARNING: Unknown directive type "doctest". .. doctest:: >>> factory = securityAdapterFactory(Factory, PublicPermission, ... locate=False, trusted=True) >>> isinstance(factory, TrustedAdapterFactory) True /builddir/build/BUILD/zope.component-4.3.0/docs/api/security.rst:80: WARNING: Unknown directive type "doctest". .. doctest:: >>> factory = securityAdapterFactory(Factory, CheckerPublic, ... locate=False, trusted=True) >>> isinstance(factory, TrustedAdapterFactory) True /builddir/build/BUILD/zope.component-4.3.0/docs/api/security.rst:90: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.security.adapter import LocatingTrustedAdapterFactory >>> factory = securityAdapterFactory(Factory, 'zope.AnotherPermission', ... locate=True, trusted=True) >>> isinstance(factory, LocatingTrustedAdapterFactory) True /builddir/build/BUILD/zope.component-4.3.0/docs/api/sitemanager.rst:4: WARNING: Unknown directive type "autofunction". .. autofunction:: zope.component.getGlobalSiteManager The API returns the module-scope global registry: .. doctest:: >>> from zope.component.interfaces import IComponentLookup >>> from zope.component.globalregistry import base >>> from zope.component import getGlobalSiteManager >>> gsm = getGlobalSiteManager() >>> gsm is base True The registry implements the :class:`~zope.component.interfaces.IComponentLookup` interface: .. doctest:: >>> IComponentLookup.providedBy(gsm) True The same registry is returned each time we call the function: .. doctest:: >>> getGlobalSiteManager() is gsm True /builddir/build/BUILD/zope.component-4.3.0/docs/api/sitemanager.rst:32: WARNING: Unknown directive type "autofunction". .. autofunction:: zope.component.getSiteManager(context=None) We don't know anything about the default service manager, except that it is an `IComponentLookup`. .. doctest:: >>> from zope.component import getSiteManager >>> from zope.component.interfaces import IComponentLookup >>> IComponentLookup.providedBy(getSiteManager()) True Calling `getSiteManager()` with no args is equivalent to calling it with a context of `None`. .. doctest:: >>> getSiteManager() is getSiteManager(None) True If the context passed to `getSiteManager()` is not `None`, it is adapted to `IComponentLookup` and this adapter returned. So, we create a context that can be adapted to `IComponentLookup` using the `__conform__` API. Let's create the simplest stub-implementation of a site manager possible: .. doctest:: >>> sitemanager = object() Now create a context that knows how to adapt to our newly created site manager. .. doctest:: >>> from zope.component.tests.examples import ConformsToIComponentLookup >>> context = ConformsToIComponentLookup(sitemanager) Now make sure that the `getSiteManager()` API call returns the correct site manager. .. doctest:: >>> getSiteManager(context) is sitemanager True Using a context that is not adaptable to `IComponentLookup` should fail. .. doctest:: >>> getSiteManager(sitemanager) Traceback (most recent call last): ... ComponentLookupError: ('Could not adapt', , ) /builddir/build/BUILD/zope.component-4.3.0/docs/api/utility.rst:4: WARNING: Unknown directive type "autofunction". .. autofunction:: zope.component.getUtility /builddir/build/BUILD/zope.component-4.3.0/docs/api/utility.rst:6: WARNING: Unknown directive type "autofunction". .. autofunction:: zope.component.queryUtility /builddir/build/BUILD/zope.component-4.3.0/docs/api/utility.rst:16: WARNING: Unknown directive type "testsetup". .. testsetup:: from zope.component.testing import setUp setUp() /builddir/build/BUILD/zope.component-4.3.0/docs/api/utility.rst:21: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component import getUtility >>> from zope.component import queryUtility >>> from zope.component.tests.examples import I1 >>> getUtility(I1) #doctest: +NORMALIZE_WHITESPACE Traceback (most recent call last): ... ComponentLookupError: \ (, '') /builddir/build/BUILD/zope.component-4.3.0/docs/api/utility.rst:34: WARNING: Unknown directive type "doctest". .. doctest:: >>> queryUtility(I1, default='') '' /builddir/build/BUILD/zope.component-4.3.0/docs/api/utility.rst:41: WARNING: Unknown directive type "doctest". .. doctest:: >>> ob = object() >>> from zope.component import getGlobalSiteManager >>> getGlobalSiteManager().registerUtility(ob, I1) /builddir/build/BUILD/zope.component-4.3.0/docs/api/utility.rst:49: WARNING: Unknown directive type "doctest". .. doctest:: >>> getUtility(I1) is ob True >>> queryUtility(I1) is ob True /builddir/build/BUILD/zope.component-4.3.0/docs/api/utility.rst:64: WARNING: Unknown directive type "doctest". .. doctest:: >>> getUtility(I1, name='foo') Traceback (most recent call last): ... ComponentLookupError: (, 'foo') >>> queryUtility(I1, name='foo', default='') '' /builddir/build/BUILD/zope.component-4.3.0/docs/api/utility.rst:77: WARNING: Unknown directive type "doctest". .. doctest:: >>> ob2 = object() >>> getGlobalSiteManager().registerUtility(ob2, I1, name='foo') >>> getUtility(I1, 'foo') is ob2 True >>> queryUtility(I1, 'foo') is ob2 True /builddir/build/BUILD/zope.component-4.3.0/docs/api/utility.rst:89: WARNING: Unknown directive type "autofunction". .. autofunction:: zope.component.getUtilitiesFor /builddir/build/BUILD/zope.component-4.3.0/docs/api/utility.rst:91: WARNING: Unknown directive type "autofunction". .. autofunction:: zope.component.getAllUtilitiesRegisteredFor /builddir/build/BUILD/zope.component-4.3.0/docs/api/utility.rst:98: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component import getUtilitiesFor >>> tuples = list(getUtilitiesFor(I1)) >>> len(tuples) 2 >>> ('', ob) in tuples True >>> ('foo', ob2) in tuples True /builddir/build/BUILD/zope.component-4.3.0/docs/api/utility.rst:113: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.interface import implementer >>> from zope.component.tests.examples import Comp >>> from zope.component.tests.examples import I2 >>> from zope.component.tests.examples import Ob >>> class I11(I1): ... pass >>> @implementer(I11) ... class Ob11(Ob): ... pass >>> ob11 = Ob11() >>> ob_bob = Ob() /builddir/build/BUILD/zope.component-4.3.0/docs/api/utility.rst:131: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component import getGlobalSiteManager >>> gsm = getGlobalSiteManager() >>> gsm.registerUtility(ob, I1) >>> gsm.registerUtility(ob11, I11) >>> gsm.registerUtility(ob_bob, I1, name='bob') >>> gsm.registerUtility(Comp(2), I2) /builddir/build/BUILD/zope.component-4.3.0/docs/api/utility.rst:142: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component import getAllUtilitiesRegisteredFor >>> uts = list(getAllUtilitiesRegisteredFor(I1)) >>> len(uts) 4 >>> ob in uts True >>> ob2 in uts True >>> ob_bob in uts True >>> ob11 in uts True /builddir/build/BUILD/zope.component-4.3.0/docs/api/utility.rst:164: WARNING: Unknown directive type "autofunction". .. autofunction:: zope.component.getNextUtility /builddir/build/BUILD/zope.component-4.3.0/docs/api/utility.rst:166: WARNING: Unknown directive type "autofunction". .. autofunction:: zope.component.queryNextUtility /builddir/build/BUILD/zope.component-4.3.0/docs/api/utility.rst:172: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.interface import Interface >>> from zope.interface import implementer >>> class IMyUtility(Interface): ... pass >>> from zope.component.tests.examples import ConformsToIComponentLookup >>> @implementer(IMyUtility) ... class MyUtility(ConformsToIComponentLookup): ... def __init__(self, id, sm): ... self.id = id ... self.sitemanager = sm ... def __repr__(self): ... return "%s('%s')" % (self.__class__.__name__, self.id) >>> gutil = MyUtility('global', gsm) >>> gsm.registerUtility(gutil, IMyUtility, 'myutil') /builddir/build/BUILD/zope.component-4.3.0/docs/api/utility.rst:193: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.interface.registry import Components >>> sm1 = Components('sm1', bases=(gsm, )) >>> sm1_1 = Components('sm1_1', bases=(sm1, )) /builddir/build/BUILD/zope.component-4.3.0/docs/api/utility.rst:201: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component.interfaces import IComponentLookup >>> util1 = MyUtility('one', sm1) >>> sm1.registerUtility(util1, IMyUtility, 'myutil') >>> IComponentLookup(util1) is sm1 True >>> util1_1 = MyUtility('one-one', sm1_1) >>> sm1_1.registerUtility(util1_1, IMyUtility, 'myutil') >>> IComponentLookup(util1_1) is sm1_1 True /builddir/build/BUILD/zope.component-4.3.0/docs/api/utility.rst:217: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component import getNextUtility >>> getNextUtility(util1_1, IMyUtility, 'myutil') MyUtility('one') /builddir/build/BUILD/zope.component-4.3.0/docs/api/utility.rst:225: WARNING: Unknown directive type "doctest". .. doctest:: >>> getNextUtility(util1, IMyUtility, 'myutil') MyUtility('global') /builddir/build/BUILD/zope.component-4.3.0/docs/api/utility.rst:232: WARNING: Unknown directive type "doctest". .. doctest:: >>> getNextUtility(gutil, IMyUtility, ... 'myutil') #doctest: +NORMALIZE_WHITESPACE Traceback (most recent call last): ... ComponentLookupError: No more utilities for , 'myutil' have been found. /builddir/build/BUILD/zope.component-4.3.0/docs/api/utility.rst:244: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component import queryNextUtility >>> queryNextUtility(gutil, IMyUtility, 'myutil', 'default') 'default' /builddir/build/BUILD/zope.component-4.3.0/docs/api/utility.rst:253: WARNING: Unknown directive type "doctest". .. doctest:: >>> myregistry = Components() /builddir/build/BUILD/zope.component-4.3.0/docs/api/utility.rst:259: WARNING: Unknown directive type "doctest". .. doctest:: >>> custom_util = MyUtility('my_custom_util', myregistry) >>> myregistry.registerUtility(custom_util, IMyUtility, 'my_custom_util') /builddir/build/BUILD/zope.component-4.3.0/docs/api/utility.rst:266: WARNING: Unknown directive type "doctest". .. doctest:: >>> sm1.__bases__ = (myregistry,) + sm1.__bases__ /builddir/build/BUILD/zope.component-4.3.0/docs/api/utility.rst:272: WARNING: Unknown directive type "doctest". .. doctest:: >>> queryNextUtility(sm1, IMyUtility, 'my_custom_util') MyUtility('my_custom_util') >>> queryNextUtility(sm1, IMyUtility, 'myutil') MyUtility('global') /builddir/build/BUILD/zope.component-4.3.0/docs/api/utility.rst:282: WARNING: Unknown directive type "doctest". .. doctest:: >>> queryNextUtility(object(), IMyUtility, 'myutil', 'default') 'default' /builddir/build/BUILD/zope.component-4.3.0/docs/api/utility.rst:287: WARNING: Unknown directive type "testcleanup". .. testcleanup:: from zope.component.testing import tearDown tearDown() /builddir/build/BUILD/zope.component-4.3.0/docs/configure.rst:4: WARNING: Unknown directive type "testsetup". .. testsetup:: from zope.component.testing import setUp setUp() /builddir/build/BUILD/zope.component-4.3.0/docs/configure.rst:12: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.configuration.xmlconfig import XMLConfig >>> import zope.component >>> from zope.component import event >>> from zope.component import registry >>> XMLConfig('configure.zcml', zope.component)() >>> gsm = zope.component.getGlobalSiteManager() >>> registered = list(gsm.registeredHandlers()) >>> len(registered) 5 >>> handlers = [x.handler for x in registered] >>> event.objectEventNotify in handlers True >>> registry.dispatchUtilityRegistrationEvent in handlers True >>> registry.dispatchAdapterRegistrationEvent in handlers True >>> registry.dispatchSubscriptionAdapterRegistrationEvent in handlers True >>> registry.dispatchHandlerRegistrationEvent in handlers True /builddir/build/BUILD/zope.component-4.3.0/docs/configure.rst:38: WARNING: Unknown directive type "testcleanup". .. testcleanup:: from zope.component.testing import tearDown tearDown() /builddir/build/BUILD/zope.component-4.3.0/docs/event.rst:11: WARNING: Unknown directive type "doctest". .. doctest:: >>> import zope.component.event /builddir/build/BUILD/zope.component-4.3.0/docs/event.rst:17: WARNING: Unknown directive type "doctest". .. doctest:: >>> class Event1(object): ... pass >>> class Event2(Event1): ... pass /builddir/build/BUILD/zope.component-4.3.0/docs/event.rst:27: WARNING: Unknown directive type "doctest". .. doctest:: >>> called = [] >>> import zope.component >>> @zope.component.adapter(Event1) ... def handler1(event): ... called.append(1) >>> @zope.component.adapter(Event2) ... def handler2(event): ... called.append(2) /builddir/build/BUILD/zope.component-4.3.0/docs/event.rst:42: WARNING: Unknown directive type "doctest". .. doctest:: >>> zope.component.provideHandler(handler1) >>> zope.component.provideHandler(handler2) /builddir/build/BUILD/zope.component-4.3.0/docs/event.rst:50: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.event import notify >>> notify(Event1()) >>> called [1] >>> del called[:] >>> notify(Event2()) >>> called.sort() >>> called [1, 2] /builddir/build/BUILD/zope.component-4.3.0/docs/event.rst:74: WARNING: Unknown directive type "doctest". .. doctest:: >>> class IUseless(zope.interface.Interface): ... """Useless object""" >>> class UselessObject(object): ... """Useless object""" ... zope.interface.implements(IUseless) /builddir/build/BUILD/zope.component-4.3.0/docs/event.rst:85: WARNING: Unknown directive type "doctest". .. doctest:: >>> class IObjectThrownEvent(zope.component.interfaces.IObjectEvent): ... """An object has been thrown away""" >>> class ObjectThrownEvent(zope.component.interfaces.ObjectEvent): ... """An object has been thrown away""" ... zope.interface.implements(IObjectThrownEvent) /builddir/build/BUILD/zope.component-4.3.0/docs/event.rst:96: WARNING: Unknown directive type "doctest". .. doctest:: >>> hammer = UselessObject() >>> event = ObjectThrownEvent(hammer) /builddir/build/BUILD/zope.component-4.3.0/docs/event.rst:104: WARNING: Unknown directive type "doctest". .. doctest:: >>> zope.component.event.objectEventNotify(event) /builddir/build/BUILD/zope.component-4.3.0/docs/event.rst:110: WARNING: Unknown directive type "doctest". .. doctest:: >>> events = [] >>> def record(*args): #* ... events.append(args) >>> zope.component.provideHandler(record, [IUseless, IObjectThrownEvent]) /builddir/build/BUILD/zope.component-4.3.0/docs/event.rst:120: WARNING: Unknown directive type "doctest". .. doctest:: >>> zope.component.event.objectEventNotify(event) >>> events == [(hammer, event)] True /builddir/build/BUILD/zope.component-4.3.0/docs/event.rst:129: WARNING: Unknown directive type "doctest". .. doctest:: >>> zope.component.provideHandler(zope.component.event.objectEventNotify) /builddir/build/BUILD/zope.component-4.3.0/docs/event.rst:135: WARNING: Unknown directive type "doctest". .. doctest:: >>> class ToolBox(dict): ... def __delitem__(self, key): ... notify(ObjectThrownEvent(self[key])) ... return super(ToolBox,self).__delitem__(key) >>> container = ToolBox() /builddir/build/BUILD/zope.component-4.3.0/docs/event.rst:146: WARNING: Unknown directive type "doctest". .. doctest:: >>> container['Red Hammer'] = hammer /builddir/build/BUILD/zope.component-4.3.0/docs/event.rst:152: WARNING: Unknown directive type "doctest". .. doctest:: >>> class Veto(Exception): ... pass >>> def callback(item, event): ... assert(item == event.object) ... raise Veto /builddir/build/BUILD/zope.component-4.3.0/docs/event.rst:163: WARNING: Unknown directive type "doctest". .. doctest:: >>> zope.component.provideHandler(callback, [IUseless, IObjectThrownEvent]) /builddir/build/BUILD/zope.component-4.3.0/docs/event.rst:169: WARNING: Unknown directive type "doctest". .. doctest:: >>> del container['Red Hammer'] ... # doctest: +NORMALIZE_WHITESPACE Traceback (most recent call last): ... raise Veto Veto /builddir/build/BUILD/zope.component-4.3.0/docs/factory.rst:8: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.interface import Interface >>> class IFunction(Interface): ... pass >>> class IKlass(Interface): ... pass >>> from zope.interface import implements >>> class Klass(object): ... implements(IKlass) ... ... def __init__(self, *args, **kw): #* ... self.args = args ... self.kw = kw >>> from zope.component.factory import Factory >>> factory = Factory(Klass, 'Klass', 'Klassier') >>> factory2 = Factory(lambda x: x, 'Func', 'Function') >>> factory3 = Factory(lambda x: x, 'Func', 'Function', (IFunction,)) /builddir/build/BUILD/zope.component-4.3.0/docs/factory.rst:38: WARNING: Unknown directive type "doctest". .. doctest:: >>> factory = Factory(Klass, 'Klass', 'Klassier') /builddir/build/BUILD/zope.component-4.3.0/docs/factory.rst:44: WARNING: Unknown directive type "doctest". .. doctest:: >>> kl = factory(1, 2, foo=3) /builddir/build/BUILD/zope.component-4.3.0/docs/factory.rst:50: WARNING: Unknown directive type "doctest". .. doctest:: >>> kl.__class__ /builddir/build/BUILD/zope.component-4.3.0/docs/factory.rst:57: WARNING: Unknown directive type "doctest". .. doctest:: >>> kl.args (1, 2) >>> kl.kw {'foo': 3} >>> factory2(3) 3 >>> factory3(3) 3 /builddir/build/BUILD/zope.component-4.3.0/docs/factory.rst:73: WARNING: Unknown directive type "doctest". .. doctest:: >>> factory.title 'Klass' >>> factory.description 'Klassier' >>> factory2.title 'Func' >>> factory2.description 'Function' >>> factory3.title 'Func' >>> factory3.description 'Function' /builddir/build/BUILD/zope.component-4.3.0/docs/factory.rst:92: WARNING: Unknown directive type "doctest". .. doctest:: >>> implemented = factory.getInterfaces() >>> implemented.isOrExtends(IKlass) True >>> list(implemented) [] >>> implemented2 = factory2.getInterfaces() >>> list(implemented2) [] >>> implemented3 = factory3.getInterfaces() >>> list(implemented3) [] /builddir/build/BUILD/zope.component-4.3.0/docs/factory.rst:112: WARNING: Unknown directive type "doctest". .. doctest:: >>> import zope.component >>> factory = Factory(Klass, 'Klass', 'Klassier') >>> gsm = zope.component.getGlobalSiteManager() >>> from zope.component.interfaces import IFactory >>> gsm.registerUtility(factory, IFactory, 'klass') /builddir/build/BUILD/zope.component-4.3.0/docs/factory.rst:124: WARNING: Unknown directive type "doctest". .. doctest:: >>> kl = zope.component.createObject('klass', 1, 2, foo=3) >>> isinstance(kl, Klass) True >>> kl.args (1, 2) >>> kl.kw {'foo': 3} /builddir/build/BUILD/zope.component-4.3.0/docs/factory.rst:137: WARNING: Unknown directive type "doctest". .. doctest:: >>> implemented = zope.component.getFactoryInterfaces('klass') >>> implemented.isOrExtends(IKlass) True >>> [iface for iface in implemented] [] /builddir/build/BUILD/zope.component-4.3.0/docs/factory.rst:148: WARNING: Unknown directive type "doctest". .. doctest:: >>> [(name, fac.__class__) for name, fac in ... zope.component.getFactoriesFor(IKlass)] [(u'klass', )] /builddir/build/BUILD/zope.component-4.3.0/docs/hooks.rst:14: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component.hooks import getSite >>> print getSite() None /builddir/build/BUILD/zope.component-4.3.0/docs/hooks.rst:23: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component.hooks import getSiteManager >>> getSiteManager() /builddir/build/BUILD/zope.component-4.3.0/docs/hooks.rst:33: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.interface.registry import Components >>> class Site(object): ... def __init__(self): ... self.registry = Components('components') ... def getSiteManager(self): ... return self.registry >>> from zope.component.hooks import setSite >>> site1 = Site() >>> setSite(site1) /builddir/build/BUILD/zope.component-4.3.0/docs/hooks.rst:48: WARNING: Unknown directive type "doctest". .. doctest:: >>> getSite() is site1 True >>> getSiteManager() is site1.registry True /builddir/build/BUILD/zope.component-4.3.0/docs/hooks.rst:57: WARNING: Unknown directive type "doctest". .. doctest:: >>> site2 = Site() >>> site2.registry is not site1.registry True >>> setSite(site2) >>> getSite() is site2 True >>> getSiteManager() is site2.registry True /builddir/build/BUILD/zope.component-4.3.0/docs/hooks.rst:71: WARNING: Unknown directive type "doctest". .. doctest:: >>> setSite() >>> print getSite() None >>> getSiteManager() /builddir/build/BUILD/zope.component-4.3.0/docs/hooks.rst:86: WARNING: Unknown directive type "doctest". .. doctest:: >>> import zope.component.hooks >>> print getSite() None >>> with zope.component.hooks.site(site2): ... getSite() is site2 True >>> print getSite() None /builddir/build/BUILD/zope.component-4.3.0/docs/hooks.rst:100: WARNING: Unknown directive type "doctest". .. doctest:: >>> print getSite() None >>> with zope.component.hooks.site(site2): ... getSite() is site2 ... raise ValueError('An error in the body') Traceback (most recent call last): ... ValueError: An error in the body >>> print getSite() None /builddir/build/BUILD/zope.component-4.3.0/docs/narr.rst:15: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope import interface >>> class IGreeter(interface.Interface): ... def greet(): ... "say hello" >>> class Greeter: ... interface.implements(IGreeter) ... ... def __init__(self, other="world"): ... self.other = other ... ... def greet(self): ... print "Hello", self.other /builddir/build/BUILD/zope.component-4.3.0/docs/narr.rst:34: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope import component >>> greet = Greeter('bob') >>> component.provideUtility(greet, IGreeter, 'robert') /builddir/build/BUILD/zope.component-4.3.0/docs/narr.rst:44: WARNING: Unknown directive type "doctest". .. doctest:: >>> component.queryUtility(IGreeter, 'robert').greet() Hello bob >>> component.getUtility(IGreeter, 'robert').greet() Hello bob /builddir/build/BUILD/zope.component-4.3.0/docs/narr.rst:54: WARNING: Unknown directive type "doctest". .. doctest:: >>> component.queryUtility(IGreeter, 'ted') >>> component.queryUtility(IGreeter, 'ted', 42) 42 >>> component.getUtility(IGreeter, 'ted') ... # doctest: +ELLIPSIS Traceback (most recent call last): ... ComponentLookupError: (, 'ted') /builddir/build/BUILD/zope.component-4.3.0/docs/narr.rst:68: WARNING: Unknown directive type "doctest". .. doctest:: >>> ted = Greeter('ted') >>> component.provideUtility(ted, name='ted') >>> component.queryUtility(IGreeter, 'ted').greet() Hello ted /builddir/build/BUILD/zope.component-4.3.0/docs/narr.rst:77: WARNING: Unknown directive type "doctest". .. doctest:: >>> world = Greeter() >>> component.provideUtility(world) >>> component.queryUtility(IGreeter).greet() Hello world /builddir/build/BUILD/zope.component-4.3.0/docs/narr.rst:93: WARNING: Unknown directive type "doctest". .. doctest:: >>> class IPerson(interface.Interface): ... name = interface.Attribute("Name") >>> class PersonGreeter: ... ... component.adapts(IPerson) ... interface.implements(IGreeter) ... ... def __init__(self, person): ... self.person = person ... ... def greet(self): ... print "Hello", self.person.name /builddir/build/BUILD/zope.component-4.3.0/docs/narr.rst:115: WARNING: Unknown directive type "doctest". .. doctest:: >>> list(component.adaptedBy(PersonGreeter)) == [IPerson] True /builddir/build/BUILD/zope.component-4.3.0/docs/narr.rst:122: WARNING: Unknown directive type "doctest". .. doctest:: >>> component.adaptedBy(Greeter()) is None True /builddir/build/BUILD/zope.component-4.3.0/docs/narr.rst:132: WARNING: Unknown directive type "doctest". .. doctest:: >>> component.provideAdapter(PersonGreeter) /builddir/build/BUILD/zope.component-4.3.0/docs/narr.rst:140: WARNING: Unknown directive type "doctest". .. doctest:: >>> class Person: ... interface.implements(IPerson) ... ... def __init__(self, name): ... self.name = name >>> IGreeter(Person("Sally")).greet() Hello Sally /builddir/build/BUILD/zope.component-4.3.0/docs/narr.rst:154: WARNING: Unknown directive type "doctest". .. doctest:: >>> class BobPersonGreeter(PersonGreeter): ... name = 'Bob' ... def greet(self): ... print "Hello", self.person.name, "my name is", self.name >>> component.provideAdapter( ... BobPersonGreeter, [IPerson], IGreeter, 'bob') /builddir/build/BUILD/zope.component-4.3.0/docs/narr.rst:166: WARNING: Unknown directive type "doctest". .. doctest:: >>> class TedPersonGreeter(BobPersonGreeter): ... name = "Ted" >>> component.provideAdapter( ... factory=TedPersonGreeter, adapts=[IPerson], ... provides=IGreeter, name='ted') /builddir/build/BUILD/zope.component-4.3.0/docs/narr.rst:177: WARNING: Unknown directive type "doctest". .. doctest:: >>> component.queryAdapter(Person("Sally"), IGreeter, 'bob').greet() Hello Sally my name is Bob >>> component.getAdapter(Person("Sally"), IGreeter, 'ted').greet() Hello Sally my name is Ted /builddir/build/BUILD/zope.component-4.3.0/docs/narr.rst:188: WARNING: Unknown directive type "doctest". .. doctest:: >>> component.queryAdapter(Person("Sally"), IGreeter, 'frank') >>> component.queryAdapter(Person("Sally"), IGreeter, 'frank', 42) 42 >>> component.getAdapter(Person("Sally"), IGreeter, 'frank') ... # doctest: +ELLIPSIS Traceback (most recent call last): ... ComponentLookupError: (...Person...>, <...IGreeter>, 'frank') /builddir/build/BUILD/zope.component-4.3.0/docs/narr.rst:201: WARNING: Unknown directive type "doctest". .. doctest:: >>> class TwoPersonGreeter: ... ... component.adapts(IPerson, IPerson) ... interface.implements(IGreeter) ... ... def __init__(self, person, greeter): ... self.person = person ... self.greeter = greeter ... ... def greet(self): ... print "Hello", self.person.name ... print "my name is", self.greeter.name >>> component.provideAdapter(TwoPersonGreeter) /builddir/build/BUILD/zope.component-4.3.0/docs/narr.rst:227: WARNING: Unknown directive type "doctest". .. doctest:: >>> component.queryMultiAdapter((Person("Sally"), Person("Bob")), ... IGreeter).greet() Hello Sally my name is Bob /builddir/build/BUILD/zope.component-4.3.0/docs/narr.rst:238: WARNING: Unknown directive type "doctest". .. doctest:: >>> class IJob(interface.Interface): ... "A job" >>> @interface.implementer(IJob) ... class Job: ... pass >>> @interface.implementer(IJob) ... @component.adapter(IPerson) ... def personJob(person): ... return getattr(person, 'job', None) /builddir/build/BUILD/zope.component-4.3.0/docs/narr.rst:257: WARNING: Unknown directive type "doctest". .. doctest:: >>> component.provideAdapter(personJob) >>> sally = Person("Sally") >>> IJob(sally) # doctest: +ELLIPSIS Traceback (most recent call last): ... TypeError: ('Could not adapt', ... /builddir/build/BUILD/zope.component-4.3.0/docs/narr.rst:269: WARNING: Unknown directive type "doctest". .. doctest:: >>> job = Job() >>> sally.job = job >>> IJob(sally) is job True /builddir/build/BUILD/zope.component-4.3.0/docs/narr.rst:286: WARNING: Unknown directive type "doctest". .. doctest:: >>> class IValidate(interface.Interface): ... def validate(ob): ... """Determine whether the object is valid ... ... Return a string describing a validation problem. ... An empty string is returned to indicate that the ... object is valid. ... """ /builddir/build/BUILD/zope.component-4.3.0/docs/narr.rst:299: WARNING: Unknown directive type "doctest". .. doctest:: >>> class IDocument(interface.Interface): ... summary = interface.Attribute("Document summary") ... body = interface.Attribute("Document text") >>> class Document: ... interface.implements(IDocument) ... def __init__(self, summary, body): ... self.summary, self.body = summary, body /builddir/build/BUILD/zope.component-4.3.0/docs/narr.rst:314: WARNING: Unknown directive type "doctest". .. doctest:: >>> class SingleLineSummary: ... component.adapts(IDocument) ... interface.implements(IValidate) ... ... def __init__(self, doc): ... self.doc = doc ... ... def validate(self): ... if '\n' in self.doc.summary: ... return 'Summary should only have one line' ... else: ... return '' /builddir/build/BUILD/zope.component-4.3.0/docs/narr.rst:331: WARNING: Unknown directive type "doctest". .. doctest:: >>> class AdequateLength: ... component.adapts(IDocument) ... interface.implements(IValidate) ... ... def __init__(self, doc): ... self.doc = doc ... ... def validate(self): ... if len(self.doc.body) < 1000: ... return 'too short' ... else: ... return '' /builddir/build/BUILD/zope.component-4.3.0/docs/narr.rst:348: WARNING: Unknown directive type "doctest". .. doctest:: >>> component.provideSubscriptionAdapter(SingleLineSummary) >>> component.provideSubscriptionAdapter(AdequateLength) /builddir/build/BUILD/zope.component-4.3.0/docs/narr.rst:355: WARNING: Unknown directive type "doctest". .. doctest:: >>> doc = Document("A\nDocument", "blah") >>> [adapter.validate() ... for adapter in component.subscribers([doc], IValidate) ... if adapter.validate()] ['Summary should only have one line', 'too short'] >>> doc = Document("A\nDocument", "blah" * 1000) >>> [adapter.validate() ... for adapter in component.subscribers([doc], IValidate) ... if adapter.validate()] ['Summary should only have one line'] >>> doc = Document("A Document", "blah") >>> [adapter.validate() ... for adapter in component.subscribers([doc], IValidate) ... if adapter.validate()] ['too short'] /builddir/build/BUILD/zope.component-4.3.0/docs/narr.rst:391: WARNING: Unknown directive type "doctest". .. doctest:: >>> import datetime >>> def documentCreated(event): ... event.doc.created = datetime.datetime.utcnow() /builddir/build/BUILD/zope.component-4.3.0/docs/narr.rst:408: WARNING: Unknown directive type "doctest". .. doctest:: >>> class IDocumentCreated(interface.Interface): ... doc = interface.Attribute("The document that was created") >>> class DocumentCreated: ... interface.implements(IDocumentCreated) ... ... def __init__(self, doc): ... self.doc = doc /builddir/build/BUILD/zope.component-4.3.0/docs/narr.rst:421: WARNING: Unknown directive type "doctest". .. doctest:: >>> @component.adapter(IDocumentCreated) ... def documentCreated(event): ... event.doc.created = datetime.datetime.utcnow() /builddir/build/BUILD/zope.component-4.3.0/docs/narr.rst:431: WARNING: Unknown directive type "doctest". .. doctest:: >>> component.provideHandler(documentCreated) /builddir/build/BUILD/zope.component-4.3.0/docs/narr.rst:438: WARNING: Unknown directive type "doctest". .. doctest:: >>> component.handle(DocumentCreated(doc)) >>> doc.created.__class__.__name__ 'datetime' /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:44: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.interface import Interface, implements >>> class IGermanSocket(Interface): ... pass >>> class Socket(object): ... def __repr__(self): ... return '' %self.__class__.__name__ >>> class GermanSocket(Socket): ... """German wall socket.""" ... implements(IGermanSocket) /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:61: WARNING: Unknown directive type "doctest". .. doctest:: >>> class IUSSocket(Interface): ... pass /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:69: WARNING: Unknown directive type "doctest". .. doctest:: >>> class GermanToUSSocketAdapter(Socket): ... implements(IUSSocket) ... __used_for__ = IGermanSocket ... ... def __init__(self, socket): ... self.context = socket /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:89: WARNING: Unknown directive type "doctest". .. doctest:: >>> import zope.component >>> gsm = zope.component.getGlobalSiteManager() >>> gsm.registerAdapter(GermanToUSSocketAdapter, (IGermanSocket,), IUSSocket) /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:102: WARNING: Unknown directive type "doctest". .. doctest:: >>> bathroomDE = GermanSocket() >>> IGermanSocket.providedBy(bathroomDE) True /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:110: WARNING: Unknown directive type "doctest". .. doctest:: >>> bathroomUS = zope.component.getAdapter(bathroomDE, IUSSocket, '') /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:116: WARNING: Unknown directive type "doctest". .. doctest:: >>> IUSSocket.providedBy(bathroomUS) True /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:126: WARNING: Unknown directive type "doctest". .. doctest:: >>> class ICzechSocket(Interface): ... pass >>> class CzechSocket(Socket): ... implements(ICzechSocket) >>> czech = CzechSocket() /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:139: WARNING: Unknown directive type "doctest". .. doctest:: >>> zope.component.getAdapter(czech, IUSSocket, '') \ ... #doctest: +NORMALIZE_WHITESPACE Traceback (most recent call last): ... ComponentLookupError: (, , '') /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:151: WARNING: Unknown directive type "doctest". .. doctest:: >>> marker = object() >>> socket = zope.component.queryAdapter(czech, IUSSocket, '', marker) >>> socket is marker True /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:172: WARNING: Unknown directive type "doctest". .. doctest:: >>> class GermanToUSSocketAdapterAndTransformer(object): ... implements(IUSSocket) ... __used_for__ = IGermanSocket ... ... def __init__(self, socket): ... self.context = socket /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:184: WARNING: Unknown directive type "doctest". .. doctest:: >>> gsm.registerAdapter(GermanToUSSocketAdapter, ... (IGermanSocket,), IUSSocket, 'shaver',) >>> gsm.registerAdapter(GermanToUSSocketAdapterAndTransformer, ... (IGermanSocket,), IUSSocket, 'dvd') /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:193: WARNING: Unknown directive type "doctest". .. doctest:: >>> socket = zope.component.getAdapter(bathroomDE, IUSSocket, 'shaver') >>> socket.__class__ is GermanToUSSocketAdapter True >>> socket = zope.component.getAdapter(bathroomDE, IUSSocket, 'dvd') >>> socket.__class__ is GermanToUSSocketAdapterAndTransformer True /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:205: WARNING: Unknown directive type "doctest". .. doctest:: >>> zope.component.getAdapter(bathroomDE, IUSSocket, 'mp3') \ ... #doctest: +NORMALIZE_WHITESPACE Traceback (most recent call last): ... ComponentLookupError: (, , 'mp3') /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:220: WARNING: Unknown directive type "doctest". .. doctest:: >>> sockets = list(zope.component.getAdapters((bathroomDE,), IUSSocket)) >>> len(sockets) 3 >>> names = [name for name, socket in sockets] >>> names.sort() >>> names [u'', u'dvd', u'shaver'] /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:243: WARNING: Unknown directive type "doctest". .. doctest:: >>> class IUSGroundedSocket(IUSSocket): ... pass /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:251: WARNING: Unknown directive type "doctest". .. doctest:: >>> class IGrounder(Interface): ... pass >>> class Grounder(object): ... implements(IGrounder) ... def __repr__(self): ... return '' /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:264: WARNING: Unknown directive type "doctest". .. doctest:: >>> class GroundedGermanToUSSocketAdapter(object): ... implements(IUSGroundedSocket) ... __used_for__ = (IGermanSocket, IGrounder) ... def __init__(self, socket, grounder): ... self.socket, self.grounder = socket, grounder /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:275: WARNING: Unknown directive type "doctest". .. doctest:: >>> gsm.registerAdapter(GroundedGermanToUSSocketAdapter, ... (IGermanSocket, IGrounder), IUSGroundedSocket, 'mp3') /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:282: WARNING: Unknown directive type "doctest". .. doctest:: >>> grounder = Grounder() /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:288: WARNING: Unknown directive type "doctest". .. doctest:: >>> livingroom = GermanSocket() /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:294: WARNING: Unknown directive type "doctest". .. doctest:: >>> socket = zope.component.getMultiAdapter((livingroom, grounder), ... IUSGroundedSocket, 'mp3') /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:299: WARNING: Unknown directive type "doctest". .. doctest:: >>> socket.__class__ is GroundedGermanToUSSocketAdapter True >>> socket.socket is livingroom True >>> socket.grounder is grounder True /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:310: WARNING: Unknown directive type "doctest". .. doctest:: >>> zope.component.getMultiAdapter((livingroom, grounder), ... IUSGroundedSocket, 'dvd') \ ... #doctest: +NORMALIZE_WHITESPACE Traceback (most recent call last): ... ComponentLookupError: ((, ), , 'dvd') /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:323: WARNING: Unknown directive type "doctest". .. doctest:: >>> socket = zope.component.queryMultiAdapter( ... (livingroom, grounder), IUSGroundedSocket, 'dvd', marker) >>> socket is marker True /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:343: WARNING: Unknown directive type "doctest". .. doctest:: >>> class IFire(Interface): ... pass >>> class Fire(object): ... implements(IFire) >>> fire = Fire() /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:355: WARNING: Unknown directive type "doctest". .. doctest:: >>> class IFireExtinguisher(Interface): ... def extinguish(): ... pass >>> class FireExtinguisher(object): ... def __init__(self, fire): ... pass ... def extinguish(self): ... "Place extinguish code here." ... print 'Used ' + self.__class__.__name__ + '.' /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:370: WARNING: Unknown directive type "doctest". .. doctest:: >>> class PowderExtinguisher(FireExtinguisher): ... pass >>> gsm.registerSubscriptionAdapter(PowderExtinguisher, ... (IFire,), IFireExtinguisher) >>> class Blanket(FireExtinguisher): ... pass >>> gsm.registerSubscriptionAdapter(Blanket, (IFire,), IFireExtinguisher) >>> class SprinklerSystem(FireExtinguisher): ... pass >>> gsm.registerSubscriptionAdapter(SprinklerSystem, ... (IFire,), IFireExtinguisher) /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:388: WARNING: Unknown directive type "doctest". .. doctest:: >>> extinguishers = zope.component.subscribers((fire,), IFireExtinguisher) >>> extinguishers.sort() >>> for extinguisher in extinguishers: ... extinguisher.extinguish() Used Blanket. Used PowderExtinguisher. Used SprinklerSystem. /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:401: WARNING: Unknown directive type "doctest". .. doctest:: >>> zope.component.subscribers((object(),), IFireExtinguisher) [] /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:430: WARNING: Unknown directive type "doctest". .. doctest:: >>> class Generator(object): ... implements(IUSSocket) ... def __repr__(self): ... return '' >>> generator = Generator() /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:442: WARNING: Unknown directive type "doctest". .. doctest:: >>> gsm.registerUtility(generator, IUSSocket) /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:448: WARNING: Unknown directive type "doctest". .. doctest:: >>> utility = zope.component.getUtility(IUSSocket) >>> utility is generator True /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:458: WARNING: Unknown directive type "doctest". .. doctest:: >>> zope.component.getUtility(IGermanSocket) Traceback (most recent call last): ... ComponentLookupError: (, '') /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:467: WARNING: Unknown directive type "doctest". .. doctest:: >>> default = object() >>> utility = zope.component.queryUtility(IGermanSocket, default=default) >>> utility is default True /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:493: WARNING: Unknown directive type "doctest". .. doctest:: >>> class SolarPanel(object): ... implements(IUSSocket) ... def __repr__(self): ... return '' >>> panel = SolarPanel() /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:504: WARNING: Unknown directive type "doctest". .. doctest:: >>> gsm.registerUtility(panel, IUSSocket, 'Solar Panel') /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:510: WARNING: Unknown directive type "doctest". .. doctest:: >>> utility = zope.component.getUtility(IUSSocket, 'Solar Panel') >>> utility is panel True /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:518: WARNING: Unknown directive type "doctest". .. doctest:: >>> zope.component.getUtility(IUSSocket, 'Wind Mill') Traceback (most recent call last): ... ComponentLookupError: (, 'Wind Mill') /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:527: WARNING: Unknown directive type "doctest". .. doctest:: >>> default = object() >>> utility = zope.component.queryUtility(IUSSocket, 'Wind Mill', ... default=default) >>> utility is default True /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:538: WARNING: Unknown directive type "doctest". .. doctest:: >>> utils = list(zope.component.getUtilitiesFor(IUSSocket)) >>> utils.sort() >>> utils #doctest: +NORMALIZE_WHITESPACE [(u'', ), (u'Solar Panel', )] /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:552: WARNING: Unknown directive type "doctest". .. doctest:: >>> utils = list(zope.component.getAllUtilitiesRegisteredFor(IUSSocket)) >>> utils.sort() >>> utils [, ] /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:577: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component.factory import Factory >>> factory = Factory(SolarPanel, ... 'Solar Panel', ... 'This factory creates a solar panel.') /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:588: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component.interfaces import IFactory >>> gsm.registerUtility(factory, IFactory, 'SolarPanel') /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:595: WARNING: Unknown directive type "doctest". .. doctest:: >>> ifaces = zope.component.getFactoryInterfaces('SolarPanel') >>> IUSSocket in ifaces True /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:603: WARNING: Unknown directive type "doctest". .. doctest:: >>> ifaces2 = factory.getInterfaces() >>> ifaces is ifaces2 True /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:611: WARNING: Unknown directive type "doctest". .. doctest:: >>> panel = zope.component.createObject('SolarPanel') >>> panel.__class__ is SolarPanel True /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:624: WARNING: Unknown directive type "doctest". .. doctest:: >>> gsm.registerUtility(Factory(Generator), IFactory, 'Generator') /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:631: WARNING: Unknown directive type "doctest". .. doctest:: >>> factories = zope.component.getFactoriesFor(IUSSocket) >>> factories = [(name, factory.__class__) for name, factory in factories] >>> factories.sort() >>> factories #doctest: +NORMALIZE_WHITESPACE [(u'Generator', ), (u'SolarPanel', )] /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:653: WARNING: Unknown directive type "doctest". .. doctest:: >>> gsm = zope.component.getGlobalSiteManager() >>> from zope.component import globalSiteManager >>> gsm is globalSiteManager True >>> from zope.component.interfaces import IComponentLookup >>> IComponentLookup.providedBy(gsm) True >>> from zope.component.interfaces import IComponents >>> IComponents.providedBy(gsm) True /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:671: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component.globalregistry import BaseGlobalComponents >>> sm = BaseGlobalComponents() /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:679: WARNING: Unknown directive type "doctest". .. doctest:: >>> class Context(object): ... def __init__(self, sm): ... self.sm = sm ... def __conform__(self, interface): ... if interface.isOrExtends(IComponentLookup): ... return self.sm /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:690: WARNING: Unknown directive type "doctest". .. doctest:: >>> context = Context(sm) >>> context.sm is sm True /builddir/build/BUILD/zope.component-4.3.0/docs/socketexample.rst:698: WARNING: Unknown directive type "doctest". .. doctest:: >>> lsm = zope.component.getSiteManager(context) >>> lsm is sm True /builddir/build/BUILD/zope.component-4.3.0/docs/testlayer.rst:18: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component.testlayer import LayerBase >>> class OurLayer(LayerBase): ... def setUp(self): ... super(OurLayer, self).setUp() ... print "setUp called" ... def tearDown(self): ... super(OurLayer, self).tearDown() ... print "tearDown called" ... def testSetUp(self): ... super(OurLayer, self).testSetUp() ... print "testSetUp called" ... def testTearDown(self): ... super(OurLayer, self).testTearDown() ... print "testTearDown called" /builddir/build/BUILD/zope.component-4.3.0/docs/testlayer.rst:43: WARNING: Unknown directive type "doctest". .. doctest:: >>> import zope.component >>> layer = OurLayer(zope.component) /builddir/build/BUILD/zope.component-4.3.0/docs/testlayer.rst:50: WARNING: Unknown directive type "doctest". .. doctest:: >>> import unittest >>> class TestCase(unittest.TestCase): ... layer = layer ... ... def testFoo(self): ... print "testFoo" >>> suite = unittest.TestSuite() >>> suite.addTest(unittest.makeSuite(TestCase)) >>> from zope.testrunner.runner import Runner >>> runner = Runner(args=[], found_suites=[suite]) >>> succeeded = runner.run() Running zope.component.OurLayer tests: Set up zope.component.OurLayer setUp called in ... seconds. testSetUp called testFoo testTearDown called Ran 1 tests with 0 failures, 0 errors and 0 skipped in ... seconds. Tearing down left over layers: Tear down zope.component.OurLayer tearDown called in ... seconds. /builddir/build/BUILD/zope.component-4.3.0/docs/testlayer.rst:80: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component.testlayer import ZCMLFileLayer >>> import zope.component.testfiles >>> zcml_file_layer = ZCMLFileLayer( ... zope.component.testfiles, ... 'testlayer.zcml') >>> class TestCase(unittest.TestCase): ... layer = zcml_file_layer ... ... def testFoo(self): ... # we should now have the adapter registered ... from zope import component ... from zope.component.testfiles import components ... self.assert_(isinstance( ... components.IApp2(components.content), components.Comp2)) /builddir/build/BUILD/zope.component-4.3.0/docs/testlayer.rst:100: WARNING: Unknown directive type "doctest". .. doctest:: >>> suite = unittest.TestSuite() >>> suite.addTest(unittest.makeSuite(TestCase)) >>> runner = Runner(args=[], found_suites=[suite]) >>> succeeded = runner.run() Running zope.component.testfiles.ZCMLFileLayer tests: Set up zope.component.testfiles.ZCMLFileLayer in ... seconds. Ran 1 tests with 0 failures, 0 errors and 0 skipped in ... seconds. Tearing down left over layers: Tear down zope.component.testfiles.ZCMLFileLayer in ... seconds. /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:16: WARNING: Unknown directive type "doctest". .. doctest:: >>> from cStringIO import StringIO >>> from zope.configuration.xmlconfig import xmlconfig >>> def runSnippet(snippet): ... template = """\ ... ... %s ... """ ... xmlconfig(StringIO(template % snippet)) /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:34: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component.testfiles.adapter import A1, A2, A3, Handler >>> from zope.component.testfiles.adapter import I1, I2, I3, IS >>> from zope.component.testfiles.components import IContent, Content, Comp, comp /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:43: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component.tests.examples import clearZCML >>> clearZCML() >>> from zope.component.testfiles.components import IApp >>> IApp(Content(), None) is None True /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:53: WARNING: Unknown directive type "doctest". .. doctest:: >>> runSnippet(''' ... ''') >>> IApp(Content()).__class__ /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:70: WARNING: Unknown directive type "doctest". .. doctest:: >>> import zope.component >>> from zope.component.tests.examples import clearZCML >>> clearZCML() >>> zope.component.queryAdapter(Content(), IApp, 'test') is None True >>> runSnippet(''' ... ''') >>> zope.component.getAdapter(Content(), IApp, 'test').__class__ /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:97: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> runSnippet(''' ... ''') /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:112: WARNING: Unknown directive type "doctest". .. doctest:: >>> content = Content() >>> a3 = IApp(content) >>> a3.__class__ is A3 True >>> a2 = a3.context[0] >>> a2.__class__ is A2 True >>> a1 = a2.context[0] >>> a1.__class__ is A1 True >>> a1.context[0] is content True /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:132: WARNING: Unknown directive type "doctest". .. doctest:: >>> runSnippet(''' ... ''') Traceback (most recent call last): ... ZopeXMLConfigurationError: File "", line 4.2-8.8 ValueError: No factory specified /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:154: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> IApp(Content(), None) is None True >>> runSnippet(''' ... ''') >>> IApp(Content()).__class__ /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:169: WARNING: Unknown directive type "doctest". .. doctest:: >>> runSnippet(''' ... ''') Traceback (most recent call last): ... ZopeXMLConfigurationError: File "", line 4.2-7.8 TypeError: Missing 'provides' attribute /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:184: WARNING: Unknown directive type "doctest". .. doctest:: >>> runSnippet(''' ... ''') Traceback (most recent call last): ... ZopeXMLConfigurationError: File "", line 4.2-7.8 TypeError: Missing 'provides' attribute /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:207: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> runSnippet(''' ... ''') >>> content = Content() >>> a1 = zope.component.getAdapter(content, I1, '') >>> isinstance(a1, A1) True /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:225: WARNING: Unknown directive type "doctest". .. doctest:: >>> import zope.interface >>> class MyContent: ... zope.interface.implements(IContent) >>> zope.component.getAdapter(MyContent(), I1, '') # doctest: +ELLIPSIS Traceback (most recent call last): ... ComponentLookupError: ... /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:241: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> runSnippet(''' ... ''') >>> content = Content() >>> a1 = A1() >>> a2 = A2() >>> a3 = zope.component.queryMultiAdapter((content, a1, a2), I3) >>> a3.__class__ is A3 True >>> a3.context == (content, a1, a2) True /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:265: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> runSnippet(''' ... ''') >>> a3 = zope.component.queryMultiAdapter((), I3) >>> a3.__class__ is A3 True >>> a3.context == () True /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:284: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> runSnippet(''' ... ''') >>> a3 = zope.component.queryMultiAdapter((content, a1, a2), I3) >>> a3.__class__ is A3 True >>> a3.context == (content, a1, a2) True /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:298: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> runSnippet(''' ... ''') Traceback (most recent call last): ... ZopeXMLConfigurationError: File "", line 4.2-11.8 ValueError: Can't use multiple factories and multiple for /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:317: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> runSnippet(''' ... ''') Traceback (most recent call last): ... ZopeXMLConfigurationError: File "", line 4.2-9.8 ValueError: Can't use multiple factories and multiple for /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:339: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> IApp(Content(), None) is None True >>> import zope.security >>> from zope.configuration.xmlconfig import XMLConfig >>> XMLConfig('meta.zcml', zope.security)() >>> runSnippet(''' ... ... ''') /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:364: WARNING: Unknown directive type "doctest". .. doctest:: >>> IApp(Content()).__class__ >>> type(IApp(Content())) /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:375: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> IApp(Content(), None) is None True >>> runSnippet(''' ... ''') >>> from zope.security.checker import ProxyFactory >>> adapter = ProxyFactory(IApp(Content())) >>> from zope.security.proxy import getTestProxyItems >>> items = [item[0] for item in getTestProxyItems(adapter)] >>> items ['a', 'f'] >>> from zope.security.proxy import removeSecurityProxy >>> removeSecurityProxy(adapter).__class__ is Comp True /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:403: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> runSnippet(''' ... ''') >>> adapter = ProxyFactory(IApp(Content())) >>> [item[0] for item in getTestProxyItems(adapter)] ['a', 'f'] >>> removeSecurityProxy(adapter).__class__ is Comp True /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:420: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> runSnippet(''' ... ''') >>> content = Content() >>> a1 = A1() >>> a2 = A2() >>> a3 = ProxyFactory(zope.component.queryMultiAdapter((content, a1, a2), I3)) >>> a3.__class__ == A3 True >>> [item[0] for item in getTestProxyItems(a3)] ['f1', 'f2', 'f3'] /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:446: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> runSnippet(''' ... ''') Traceback (most recent call last): ... ConfigurationExecutionError: exceptions.ValueError: ('Undefined permission id', 'zope.UndefinedPermission') in: File "", line 4.2-9.8 Could not read source. /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:471: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> runSnippet(''' ... ''') /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:484: WARNING: Unknown directive type "doctest". .. doctest:: >>> ob = Content() >>> type(I1(ob)) is A1 True /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:493: WARNING: Unknown directive type "doctest". .. doctest:: >>> p = ProxyFactory(ob) >>> a = I1(p) >>> type(a) /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:503: WARNING: Unknown directive type "doctest". .. doctest:: >>> a = removeSecurityProxy(a) >>> type(a) is A1 True >>> a.context[0] is ob True /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:513: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> XMLConfig('meta.zcml', zope.security)() >>> runSnippet(''' ... ... ''') /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:533: WARNING: Unknown directive type "doctest". .. doctest:: >>> ob = Content() >>> type(I1(ob)) is A1 True /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:542: WARNING: Unknown directive type "doctest". .. doctest:: >>> p = ProxyFactory(ob) >>> a = I1(p) >>> type(a) /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:552: WARNING: Unknown directive type "doctest". .. doctest:: >>> a = removeSecurityProxy(a) >>> type(a) >>> a.context[0] is ob True /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:563: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> runSnippet(''' ... ''') >>> ob = Content() >>> p = ProxyFactory(ob) >>> a = I1(p) >>> type(a) >>> a = removeSecurityProxy(a) >>> type(a) is A1 True /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:588: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> runSnippet(''' ... ''') >>> ob = Content() >>> p = ProxyFactory(ob) >>> a = I1(p) >>> type(a) >>> a = removeSecurityProxy(a) >>> type(a) /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:618: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> runSnippet(''' ... ''') >>> content = Content() >>> a1 = A1() >>> subscribers = zope.component.subscribers((content, a1), IS) >>> a3 = subscribers[0] >>> a3.__class__ is A3 True >>> a3.context == (content, a1) True /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:642: WARNING: Unknown directive type "doctest". .. doctest:: >>> sm = zope.component.getSiteManager() >>> doc = [reg.info for reg in sm.registeredSubscriptionAdapters() ... if reg.provided is IS][0] >>> print doc File "", line 4.2-9.8 Could not read source. /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:656: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> runSnippet(''' ... ... ''') >>> subscribers = zope.component.subscribers((content, a1), IS) >>> len(subscribers) 2 >>> sorted([a.__class__.__name__ for a in subscribers]) ['A2', 'A3'] /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:687: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> runSnippet(''' ... ''') >>> content = Content() >>> a2 = A2() >>> subscribers = zope.component.subscribers((content, a1, a2), IS) >>> a3 = subscribers[0] >>> a3.__class__ is A3 True >>> a3.context == (content, a1, a2) True /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:709: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> runSnippet(''' ... ''') >>> sm = zope.component.getSiteManager() >>> a3 = sm.adapters.subscriptions((IContent, I1, I2), None)[0] >>> a3 is A3 True /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:723: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> runSnippet(''' ... ''') >>> subs = list(zope.component.subscribers((Content(),), I1)) >>> isinstance(subs[0], A1) True /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:740: WARNING: Unknown directive type "doctest". .. doctest:: >>> list(zope.component.subscribers((MyContent(),), I1)) [] /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:752: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> XMLConfig('meta.zcml', zope.security)() >>> runSnippet(''' ... ... ''') >>> subscribers = zope.component.subscribers((content, a1), IS) >>> a3 = subscribers[0] >>> a3.__class__ is A3 True >>> type(a3) >>> a3.context == (content, a1) True /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:788: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> runSnippet(''' ... ''') /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:802: WARNING: Unknown directive type "doctest". .. doctest:: >>> subscribers = zope.component.subscribers((content, a1), IS) >>> a3 = subscribers[0] >>> a3.__class__ is A3 True >>> a3.context == (content, a1) True >>> type(a3) is A3 True looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 5%] api writing output... [ 10%] api/adapter /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:816: WARNING: Unknown directive type "doctest". .. doctest:: >>> p = ProxyFactory(content) >>> a3 = zope.component.subscribers((p, a1), IS)[0] >>> type(a3) /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:825: WARNING: Unknown directive type "doctest". .. doctest:: >>> removeSecurityProxy(a3).context[0] is content True >>> type(removeSecurityProxy(a3)) is A3 True /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:835: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> runSnippet(''' ... ''') /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:850: WARNING: Unknown directive type "doctest". .. doctest:: >>> subscribers = zope.component.subscribers((content, a1), IS) >>> a3 = subscribers[0] >>> a3.__class__ is A3 True >>> a3.context == (content, a1) True >>> type(a3) is A3 True /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:863: WARNING: Unknown directive type "doctest". .. doctest:: >>> p = ProxyFactory(content) >>> a3 = zope.component.subscribers((p, a1), IS)[0] >>> type(a3) >>> removeSecurityProxy(a3).context[0] is content True /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:877: WARNING: Unknown directive type "doctest". .. doctest:: >>> type(removeSecurityProxy(a3)) /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:888: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> runSnippet(''' ... ''') /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:900: WARNING: Unknown directive type "doctest". .. doctest:: >>> list(zope.component.subscribers((content, a1), None)) [] >>> content.args == ((a1,),) True /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:918: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> zope.component.queryUtility(IApp) is None True /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:926: WARNING: Unknown directive type "doctest". .. doctest:: >>> runSnippet(''' ... ''') >>> zope.component.getUtility(IApp) is comp True /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:942: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> zope.component.queryUtility(IApp, 'test') is None True /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:950: WARNING: Unknown directive type "doctest". .. doctest:: >>> runSnippet(''' ... ''') >>> zope.component.getUtility(IApp, 'test') is comp True /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:966: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> zope.component.queryUtility(IApp) is None True >>> runSnippet(''' ... ''') >>> zope.component.getUtility(IApp).__class__ is Comp True /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:986: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> zope.component.queryUtility(IApp) is None True >>> runSnippet(''' ... ''') >>> zope.component.getUtility(IApp) is comp True /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:1000: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> runSnippet(''' ... ''') Traceback (most recent call last): ... ZopeXMLConfigurationError: File "", line 4.2-4.61 TypeError: Missing 'provides' attribute /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:1013: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> runSnippet(''' ... ''') Traceback (most recent call last): ... ZopeXMLConfigurationError: File "", line 4.2-4.61 TypeError: Missing 'provides' attribute /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:1025: WARNING: Unknown directive type "doctest". .. doctest:: >>> clearZCML() >>> runSnippet(''' ... ''') >>> zope.component.getUtility(IApp).__class__ is Comp True >>> runSnippet(''' ... ''') Traceback (most recent call last): ... ZopeXMLConfigurationError: File "", line 4.2-4.59 TypeError: Missing 'provides' attribute >>> clearZCML() >>> runSnippet(''' ... ''') Traceback (most recent call last): ... ZopeXMLConfigurationError: File "", line 4.2-4.59 TypeError: Missing 'provides' attribute /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:1129: WARNING: Unknown directive type "doctest". .. doctest:: >>> import re, pprint >>> atre = re.compile(' at [0-9a-fA-Fx]+') >>> class Context(object): ... actions = () ... def action(self, discriminator, callable, args): ... self.actions += ((discriminator, callable, args), ) ... def __repr__(self): ... stream = StringIO() ... pprinter = pprint.PrettyPrinter(stream=stream, width=60) ... pprinter.pprint(self.actions) ... r = stream.getvalue() ... return (''.join(atre.split(r))).strip() >>> context = Context() /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:1147: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.interface import Interface >>> class I(Interface): ... pass /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:1155: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component.tests.examples import ITestType >>> ITestType.providedBy(I) False /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:1163: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.component.zcml import interface >>> interface(context, I, ITestType) >>> context ((None, , ('', , )),) /builddir/build/BUILD/zope.component-4.3.0/docs/zcml.rst:1176: WARNING: Unknown directive type "doctest". .. doctest:: >>> from zope.interface.interfaces import IInterface >>> ITestType.extends(IInterface) True >>> IInterface.providedBy(I) True writing output... [ 15%] api/factory writing output... [ 20%] api/interface writing output... [ 25%] api/interfaces writing output... [ 30%] api/persistent writing output... [ 35%] api/security writing output... [ 40%] api/sitemanager writing output... [ 45%] api/utility writing output... [ 50%] configure writing output... [ 55%] event writing output... [ 60%] factory writing output... [ 65%] hacking writing output... [ 70%] hooks writing output... [ 75%] index writing output... [ 80%] narr writing output... [ 85%] persistentregistry writing output... [ 90%] socketexample writing output... [ 95%] testlayer writing output... [100%] zcml generating indices... genindex done writing additional pages... search done copying static files... done copying extra files... done dumping search index in English (code: en)... done dumping object inventory... done build succeeded, 307 warnings. The HTML pages are in html. + rm -fr html/.buildinfo html/.doctrees + RPM_EC=0 ++ jobs -p + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.Xf1PjS + umask 022 + cd /builddir/build/BUILD + '[' /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64 '!=' / ']' + rm -rf /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64 ++ dirname /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64 + mkdir -p /builddir/build/BUILDROOT + mkdir /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64 + cd zope.component-4.3.0 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' + /usr/bin/python3 setup.py install -O1 --skip-build --root /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64 running install running install_lib Skipping installation of /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/__init__.py (namespace package) copying zope/component/meta.zcml -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component copying zope/component/configure.zcml -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component copying zope/component/__init__.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component copying zope/component/_api.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component copying zope/component/_compat.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component copying zope/component/_declaration.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component copying zope/component/event.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component copying zope/component/eventtesting.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component copying zope/component/factory.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component copying zope/component/globalregistry.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component copying zope/component/hookable.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component copying zope/component/hooks.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component copying zope/component/interface.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component copying zope/component/interfaces.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component copying zope/component/persistentregistry.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component copying zope/component/registry.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component copying zope/component/security.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component copying zope/component/standalonetests.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component copying zope/component/testing.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component copying zope/component/testlayer.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component copying zope/component/zcml.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component copying zope/component/testfiles/testlayer.zcml -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/testfiles copying zope/component/testfiles/__init__.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/testfiles copying zope/component/testfiles/adapter.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/testfiles copying zope/component/testfiles/components.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/testfiles copying zope/component/testfiles/views.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/testfiles copying zope/component/tests/__init__.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests copying zope/component/tests/examples.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests copying zope/component/tests/test___init__.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests copying zope/component/tests/test__api.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests copying zope/component/tests/test__declaration.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests copying zope/component/tests/test_event.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests copying zope/component/tests/test_factory.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests copying zope/component/tests/test_globalregistry.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests copying zope/component/tests/test_hookable.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests copying zope/component/tests/test_hooks.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests copying zope/component/tests/test_interface.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests copying zope/component/tests/test_persistentregistry.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests copying zope/component/tests/test_registry.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests copying zope/component/tests/test_security.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests copying zope/component/tests/test_standalone.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests copying zope/component/tests/test_zcml.py -> /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/__init__.py to __init__.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/_api.py to _api.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/_compat.py to _compat.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/_declaration.py to _declaration.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/event.py to event.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/eventtesting.py to eventtesting.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/factory.py to factory.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/globalregistry.py to globalregistry.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/hookable.py to hookable.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/hooks.py to hooks.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/interface.py to interface.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/interfaces.py to interfaces.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/persistentregistry.py to persistentregistry.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/registry.py to registry.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/security.py to security.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/standalonetests.py to standalonetests.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/testing.py to testing.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/testlayer.py to testlayer.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/zcml.py to zcml.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/testfiles/__init__.py to __init__.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/testfiles/adapter.py to adapter.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/testfiles/components.py to components.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/testfiles/views.py to views.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests/__init__.py to __init__.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests/examples.py to examples.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests/test___init__.py to test___init__.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests/test__api.py to test__api.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests/test__declaration.py to test__declaration.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests/test_event.py to test_event.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests/test_factory.py to test_factory.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests/test_globalregistry.py to test_globalregistry.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests/test_hookable.py to test_hookable.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests/test_hooks.py to test_hooks.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests/test_interface.py to test_interface.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests/test_persistentregistry.py to test_persistentregistry.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests/test_registry.py to test_registry.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests/test_security.py to test_security.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests/test_standalone.py to test_standalone.cpython-39.pyc byte-compiling /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/tests/test_zcml.py to test_zcml.cpython-39.pyc writing byte-compilation script '/tmp/tmpp_26sjvx.py' /usr/bin/python3 /tmp/tmpp_26sjvx.py removing /tmp/tmpp_26sjvx.py running install_egg_info running egg_info writing src/zope.component.egg-info/PKG-INFO writing dependency_links to src/zope.component.egg-info/dependency_links.txt writing namespace_packages to src/zope.component.egg-info/namespace_packages.txt writing requirements to src/zope.component.egg-info/requires.txt writing top-level names to src/zope.component.egg-info/top_level.txt reading manifest file 'src/zope.component.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching '*.dll' found anywhere in distribution warning: no previously-included files matching '*.pyc' found anywhere in distribution warning: no previously-included files matching '*.pyo' found anywhere in distribution warning: no previously-included files matching '*.so' found anywhere in distribution warning: no previously-included files matching 'coverage.xml' found anywhere in distribution writing manifest file 'src/zope.component.egg-info/SOURCES.txt' Copying src/zope.component.egg-info to /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope.component-4.3.0-py3.9.egg-info Installing /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope.component-4.3.0-py3.9-nspkg.pth running install_scripts + rm -rfv /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/bin/__pycache__ + /usr/lib/rpm/find-debuginfo.sh -j2 --strict-build-id -m -i --build-id-seed 4.3.0-15.fc34 --unique-debug-suffix -4.3.0-15.fc34.x86_64 --unique-debug-src-base python-zope-component-4.3.0-15.fc34.x86_64 --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 110000000 -S debugsourcefiles.list /builddir/build/BUILD/zope.component-4.3.0 find: 'debug': No such file or directory + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-ldconfig + /usr/lib/rpm/brp-compress + /usr/lib/rpm/redhat/brp-strip-lto /usr/bin/strip + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/redhat/brp-python-bytecompile '' 1 0 Bytecompiling .py files below /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9 using /usr/bin/python3.9 + /usr/lib/rpm/brp-python-hardlink + /usr/lib/rpm/redhat/brp-mangle-shebangs Processing files: python3-zope-component-4.3.0-15.fc34.noarch warning: File not found: /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/lib/python3.9/site-packages/zope/component/*.txt Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.8G6MBw + umask 022 + cd /builddir/build/BUILD + cd zope.component-4.3.0 + DOCDIR=/builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/share/doc/python3-zope-component + export LC_ALL=C + LC_ALL=C + export DOCDIR + /usr/bin/mkdir -p /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/share/doc/python3-zope-component + cp -pr CHANGES.rst /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/share/doc/python3-zope-component + cp -pr COPYRIGHT.txt /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/share/doc/python3-zope-component + cp -pr README.rst /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/share/doc/python3-zope-component + cp -pr html/ /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/share/doc/python3-zope-component + RPM_EC=0 ++ jobs -p + exit 0 Executing(%license): /bin/sh -e /var/tmp/rpm-tmp.NvLzKT + umask 022 + cd /builddir/build/BUILD + cd zope.component-4.3.0 + LICENSEDIR=/builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/share/licenses/python3-zope-component + export LC_ALL=C + LC_ALL=C + export LICENSEDIR + /usr/bin/mkdir -p /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/share/licenses/python3-zope-component + cp -pr LICENSE.txt /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64/usr/share/licenses/python3-zope-component + RPM_EC=0 ++ jobs -p + exit 0 Provides: python-zope-component = 4.3.0-15.fc34 python3-zope-component = 4.3.0-15.fc34 python3.9-zope-component = 4.3.0-15.fc34 python3.9dist(zope-component) = 4.3 python3.9dist(zope.component) = 4.3 python3dist(zope-component) = 4.3 python3dist(zope.component) = 4.3 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PartialHardlinkSets) <= 4.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires: python(abi) = 3.9 python3.9dist(setuptools) python3.9dist(zope-event) python3.9dist(zope-interface) >= 4.1 Obsoletes: python-zope-component < 4.3.0-15.fc34 Checking for unpackaged file(s): /usr/lib/rpm/check-files /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64 Wrote: /builddir/build/RPMS/python3-zope-component-4.3.0-15.fc34.noarch.rpm Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.0SJpBz + umask 022 + cd /builddir/build/BUILD + cd zope.component-4.3.0 + /usr/bin/rm -rf /builddir/build/BUILDROOT/python-zope-component-4.3.0-15.fc34.x86_64 + RPM_EC=0 ++ jobs -p + exit 0 Child return code was: 0