diff piecrust/sources/base.py @ 989:8adc27285d93

bake: Big pass on bake performance. - Reduce the amount of data passed between processes. - Make inter-process data simple objects to make it easier to test with alternatives to pickle. - Make sources have the basic requirement to be able to find a content item from an item spec (path). - Make Hoedown the default Markdown formatter.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 19 Nov 2017 14:29:17 -0800
parents ef224cce343c
children a6618fdab37e
line wrap: on
line diff
--- a/piecrust/sources/base.py	Fri Nov 03 23:14:56 2017 -0700
+++ b/piecrust/sources/base.py	Sun Nov 19 14:29:17 2017 -0800
@@ -106,9 +106,6 @@
         if self._page_cache is not None:
             return self._page_cache
 
-        if self.app.env.abort_source_use:
-            raise AbortedSourceUseError()
-
         getter = self.app.getPage
         self._page_cache = [getter(self, i) for i in self.getAllContents()]
         return self._page_cache
@@ -143,13 +140,13 @@
         raise NotImplementedError(
             "'%s' doesn't implement 'getRelatedContents'." % self.__class__)
 
-    def findGroup(self, rel_spec):
+    def findContentFromSpec(self, spec):
         raise NotImplementedError(
-            "'%s' doesn't implement 'findGroup'." % self.__class__)
+            "'%s' doesn't implement 'findContentFromSpec'." % self.__class__)
 
-    def findContent(self, route_params):
+    def findContentFromRoute(self, route_params):
         raise NotImplementedError(
-            "'%s' doesn't implement 'findContent'." % self.__class__)
+            "'%s' doesn't implement 'findContentFromRoute'." % self.__class__)
 
     def getSupportedRouteParameters(self):
         raise NotImplementedError(