[Zope-Checkins] CVS: Zope3/lib/python/Zope/ComponentArchitecture - GlobalAdapterService.py:1.1.2.2 GlobalResourceService.py:1.1.2.2 GlobalViewService.py:1.1.2.2 IToIRegistry.py:1.1.4.18

Jim Fulton jim@zope.com
Thu, 23 May 2002 14:01:51 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/ComponentArchitecture
In directory cvs.zope.org:/tmp/cvs-serv26429/lib/python/Zope/ComponentArchitecture

Modified Files:
      Tag: Zope-3x-branch
	GlobalAdapterService.py GlobalResourceService.py 
	GlobalViewService.py IToIRegistry.py 
Log Message:
This all started with wanting to be able to use url;view in a ZPT path. :)

That lead me to:

- Massive traversal refactoring.

  Namespace handling is now centralized in Zope.App.Traversing. 

- ZPT refactoring, including some renaming that touches pretty much everything. :)

  - The application specific ZPT support was moved into
    Zope.App.PageTemplate. 

  - To get page template files (for use in views):

    from Zope.App.PageTemplate import ViewPageTemplateFile

  - Fixed up security so that ZPT expressions only have access to 
    safe builtins and so that modules namespace does imports safely.

  - Got ZPTPage working!

- renaming url to absolute_url and got absolute_url to work in paths.

- Cleaned up the (as yet unused) RestrictedInterpreter module in
  Zope.Security. In particular, changed to use a separate
  RestrictedBuiltins module.



=== Zope3/lib/python/Zope/ComponentArchitecture/GlobalAdapterService.py 1.1.2.1 => 1.1.2.2 ===
 # the global adapter service instance (see component.zcml )
 adapterService = GlobalAdapterService()
-
+provideAdapter = adapterService.provideAdapter
 
 
 
@@ -75,4 +75,4 @@
 # Register our cleanup with Testing.CleanUp to make writing unit tests simpler.
 from Zope.Testing.CleanUp import addCleanUp
 addCleanUp(_clear)
-del addCleanUp
\ No newline at end of file
+del addCleanUp


=== Zope3/lib/python/Zope/ComponentArchitecture/GlobalResourceService.py 1.1.2.1 => 1.1.2.2 ===
     
 resourceService = GlobalResourceService()
-
-
-
-
+provideResource = resourceService.provideResource
 _clear             = resourceService._clear
 
 


=== Zope3/lib/python/Zope/ComponentArchitecture/GlobalViewService.py 1.1.2.1 => 1.1.2.2 ===
     
 viewService = GlobalViewService()
-
-
-
-
-
+provideView = viewService.provideView
+setDefaultViewName = viewService.setDefaultViewName
 _clear         = viewService._clear
 
 


=== Zope3/lib/python/Zope/ComponentArchitecture/IToIRegistry.py 1.1.4.17 => 1.1.4.18 ===
         Also registers superinterfaces of the provided interface,
         stopping when the registry already has a component
-        that provides a more general interface.
+        that provides a more general interface or when the Base is Interface.
         '''
         reg = self._reg
         reg[(require, provide)] = (primary_provide, c)