[Python-modules-commits] [django-pipeline] 01/06: Import django-pipeline_1.6.8.orig.tar.gz

Brian May bam at moszumanska.debian.org
Wed Apr 6 02:59:52 UTC 2016


This is an automated email from the git hooks/post-receive script.

bam pushed a commit to branch master
in repository django-pipeline.

commit a6e05d2f0d2ddbb4a6554def26c0571761315ab3
Author: Brian May <bam at debian.org>
Date:   Wed Apr 6 12:50:01 2016 +1000

    Import django-pipeline_1.6.8.orig.tar.gz
---
 AUTHORS                           |  2 ++
 HISTORY.rst                       | 12 +++++++
 PKG-INFO                          | 16 +++++++--
 README.rst                        |  2 +-
 django_pipeline.egg-info/PKG-INFO | 16 +++++++--
 docs/conf.py                      |  2 +-
 pipeline/compilers/__init__.py    |  7 ++--
 pipeline/templatetags/pipeline.py | 75 +++++++++++++++++++++++++++++----------
 setup.cfg                         |  2 +-
 setup.py                          |  2 +-
 10 files changed, 106 insertions(+), 30 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 5a2228f..62f4982 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -12,6 +12,7 @@ or just made Pipeline more awesome.
  * Alexander Pugachev <alexander.pugachev at gmail.com>
  * Alexis Svinartchouk <zvin at free.fr>
  * Allard Stijnman <a.g.stijnman at gmail.com>
+ * Alvin Mites <alvin at mitesdesign.com>
  * Andreas Cederström <andreas at klydd.se>
  * Andrew Choi <andrew at choi.com>
  * Andy Kish <agkish at gmail.com>
@@ -35,6 +36,7 @@ or just made Pipeline more awesome.
  * Christofer Bertonha <christoferbertonha at gmail.com>
  * Christopher Dilorenzo <dilorenzo.christopher at gmail.com>
  * Collin Stedman <cstedman at princeton.edu>
+ * Corey Farwell <coreyf at rwell.org>
  * Corrado Primier <cp at corradoprimier.it>
  * Danielle Madeley <danielle at madeley.id.au>
  * David Charbonnier <d.charbonnier at oxys.net>
diff --git a/HISTORY.rst b/HISTORY.rst
index 3e00b82..0fe40ed 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -3,6 +3,18 @@
 History
 =======
 
+1.6.8
+=====
+
+* Made templatetags easier to subclass for special rendering behavior. Thanks
+  to Christian Hammond.
+* Updated the link to readthedocs. Thanks to Corey Farwell.
+* Fixed some log messages to correctly refer to the new PIPELINE settings
+  tructure. Thanks to Alvin Mites.
+* Changed file outdated checks to use os.path methods directly, avoiding
+  potential SuspiciousFileOperation errors which could appear with some django
+  storage configurations.
+
 1.6.7
 =====
 
diff --git a/PKG-INFO b/PKG-INFO
index ec6ba3c..50eb357 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: django-pipeline
-Version: 1.6.7
+Version: 1.6.8
 Summary: Pipeline is an asset packaging library for Django.
 Home-page: https://github.com/jazzband/django-pipeline
 Author: Timothée Peignier
@@ -34,7 +34,7 @@ Description: Pipeline
         -------------
         
         For documentation, usage, and examples, see :
-        http://django-pipeline.readthedocs.org
+        https://django-pipeline.readthedocs.org
         
         
         .. :changelog:
@@ -42,6 +42,18 @@ Description: Pipeline
         History
         =======
         
+        1.6.8
+        =====
+        
+        * Made templatetags easier to subclass for special rendering behavior. Thanks
+          to Christian Hammond.
+        * Updated the link to readthedocs. Thanks to Corey Farwell.
+        * Fixed some log messages to correctly refer to the new PIPELINE settings
+          tructure. Thanks to Alvin Mites.
+        * Changed file outdated checks to use os.path methods directly, avoiding
+          potential SuspiciousFileOperation errors which could appear with some django
+          storage configurations.
+        
         1.6.7
         =====
         
diff --git a/README.rst b/README.rst
index ed0b2ed..6274a3d 100644
--- a/README.rst
+++ b/README.rst
@@ -26,4 +26,4 @@ Documentation
 -------------
 
 For documentation, usage, and examples, see :
-http://django-pipeline.readthedocs.org
+https://django-pipeline.readthedocs.org
diff --git a/django_pipeline.egg-info/PKG-INFO b/django_pipeline.egg-info/PKG-INFO
index ec6ba3c..50eb357 100644
--- a/django_pipeline.egg-info/PKG-INFO
+++ b/django_pipeline.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: django-pipeline
-Version: 1.6.7
+Version: 1.6.8
 Summary: Pipeline is an asset packaging library for Django.
 Home-page: https://github.com/jazzband/django-pipeline
 Author: Timothée Peignier
@@ -34,7 +34,7 @@ Description: Pipeline
         -------------
         
         For documentation, usage, and examples, see :
-        http://django-pipeline.readthedocs.org
+        https://django-pipeline.readthedocs.org
         
         
         .. :changelog:
@@ -42,6 +42,18 @@ Description: Pipeline
         History
         =======
         
+        1.6.8
+        =====
+        
+        * Made templatetags easier to subclass for special rendering behavior. Thanks
+          to Christian Hammond.
+        * Updated the link to readthedocs. Thanks to Corey Farwell.
+        * Fixed some log messages to correctly refer to the new PIPELINE settings
+          tructure. Thanks to Alvin Mites.
+        * Changed file outdated checks to use os.path methods directly, avoiding
+          potential SuspiciousFileOperation errors which could appear with some django
+          storage configurations.
+        
         1.6.7
         =====
         
diff --git a/docs/conf.py b/docs/conf.py
index ac7ed1e..3d3a4b5 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -51,7 +51,7 @@ copyright = u'2011-2014, Timothée Peignier'
 # The short X.Y version.
 version = '1.6'
 # The full version, including alpha/beta/rc tags.
-release = '1.6.7'
+release = '1.6.8'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
diff --git a/pipeline/compilers/__init__.py b/pipeline/compilers/__init__.py
index a7a512d..f9f7526 100644
--- a/pipeline/compilers/__init__.py
+++ b/pipeline/compilers/__init__.py
@@ -79,11 +79,12 @@ class CompilerBase(object):
         return '.'.join((path[0], extension))
 
     def is_outdated(self, infile, outfile):
-        if not self.storage.exists(outfile):
+        if not os.path.exists(outfile):
             return True
+
         try:
-            return self.storage.modified_time(infile) > self.storage.modified_time(outfile)
-        except (OSError, NotImplementedError):
+            return os.path.getmtime(infile) > os.path.getmtime(outfile)
+        except OSError:
             return True
 
 
diff --git a/pipeline/templatetags/pipeline.py b/pipeline/templatetags/pipeline.py
index 9a81eba..b9fdea2 100644
--- a/pipeline/templatetags/pipeline.py
+++ b/pipeline/templatetags/pipeline.py
@@ -54,29 +54,66 @@ class PipelineMixin(object):
             pass
 
     def render_compressed(self, package, package_name, package_type):
+        """Render HTML for the package.
+
+        If ``PIPELINE_ENABLED`` is ``True``, this will render the package's
+        output file (using :py:meth:`render_compressed_output`). Otherwise,
+        this will render the package's source files (using
+        :py:meth:`render_compressed_sources`).
+
+        Subclasses can override this method to provide custom behavior for
+        determining what to render.
+        """
         if settings.PIPELINE_ENABLED:
-            method = getattr(self, "render_{0}".format(package_type))
-            return method(package, package.output_filename)
+            return self.render_compressed_output(package, package_name,
+                                                 package_type)
         else:
-            if settings.PIPELINE_COLLECTOR_ENABLED:
-                default_collector.collect(self.request)
+            return self.render_compressed_sources(package, package_name,
+                                                  package_type)
+
+    def render_compressed_output(self, package, package_name, package_type):
+        """Render HTML for using the package's output file.
+
+        Subclasses can override this method to provide custom behavior for
+        rendering the output file.
+        """
+        method = getattr(self, 'render_{0}'.format(package_type))
+
+        return method(package, package.output_filename)
+
+    def render_compressed_sources(self, package, package_name, package_type):
+        """Render HTML for using the package's list of source files.
 
-            packager = Packager()
-            method = getattr(self, "render_individual_{0}".format(package_type))
+        Each source file will first be collected, if
+        ``PIPELINE_COLLECTOR_ENABLED`` is ``True``.
+
+        If there are any errors compiling any of the source files, an
+        ``SHOW_ERRORS_INLINE`` is ``True``, those errors will be shown at
+        the top of the page.
+
+        Subclasses can override this method to provide custom behavior for
+        rendering the source files.
+        """
+        if settings.PIPELINE_COLLECTOR_ENABLED:
+            default_collector.collect(self.request)
+
+        packager = Packager()
+        method = getattr(self, 'render_individual_{0}'.format(package_type))
+
+        try:
+            paths = packager.compile(package.paths)
+        except CompilerError as e:
+            if settings.SHOW_ERRORS_INLINE:
+                method = getattr(self, 'render_error_{0}'.format(
+                    package_type))
 
-            try:
-                paths = packager.compile(package.paths)
-            except CompilerError as e:
-                if settings.SHOW_ERRORS_INLINE:
-                    method = getattr(self, 'render_error_{0}'.format(
-                        package_type))
+                return method(package_name, e)
+            else:
+                raise
 
-                    return method(package_name, e)
-                else:
-                    raise
+        templates = packager.pack_templates(package)
 
-            templates = packager.pack_templates(package)
-            return method(package, paths, templates=templates)
+        return method(package, paths, templates=templates)
 
     def render_error(self, package_type, package_name, e):
         return render_to_string('pipeline/compile_error.html', Context({
@@ -98,7 +135,7 @@ class StylesheetNode(PipelineMixin, template.Node):
         try:
             package = self.package_for(package_name, 'css')
         except PackageNotFound:
-            logger.warn("Package %r is unknown. Check PIPELINE_CSS in your settings.", package_name)
+            logger.warn("Package %r is unknown. Check PIPELINE['STYLESHEETS'] in your settings.", package_name)
             return ''  # fail silently, do not return anything if an invalid group is specified
         return self.render_compressed(package, package_name, 'css')
 
@@ -131,7 +168,7 @@ class JavascriptNode(PipelineMixin, template.Node):
         try:
             package = self.package_for(package_name, 'js')
         except PackageNotFound:
-            logger.warn("Package %r is unknown. Check PIPELINE_JS in your settings.", package_name)
+            logger.warn("Package %r is unknown. Check PIPELINE['JAVASCRIPT'] in your settings.", package_name)
             return ''  # fail silently, do not return anything if an invalid group is specified
         return self.render_compressed(package, package_name, 'js')
 
diff --git a/setup.cfg b/setup.cfg
index 6c71b61..9a777d0 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -2,7 +2,7 @@
 universal = 1
 
 [egg_info]
-tag_build = 
 tag_date = 0
+tag_build = 
 tag_svn_revision = 0
 
diff --git a/setup.py b/setup.py
index 7e07d73..fccb40b 100644
--- a/setup.py
+++ b/setup.py
@@ -10,7 +10,7 @@ if (sys.version_info[0], sys.version_info[1]) < (3, 2):
 
 setup(
     name='django-pipeline',
-    version='1.6.7',
+    version='1.6.8',
     description='Pipeline is an asset packaging library for Django.',
     long_description=io.open('README.rst', encoding='utf-8').read() + '\n\n' +
         io.open('HISTORY.rst', encoding='utf-8').read(),

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/django-pipeline.git



More information about the Python-modules-commits mailing list