Hello community,
here is the log from the commit of package python-django-pipeline for
openSUSE:Leap:15.2 checked in at 2020-02-23 16:47:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-django-pipeline (Old)
and /work/SRC/openSUSE:Leap:15.2/.python-django-pipeline.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-django-pipeline"
Sun Feb 23 16:47:26 2020 rev:3 rq:776576 version:1.7.0
Changes:
--------
---
/work/SRC/openSUSE:Leap:15.2/python-django-pipeline/python-django-pipeline.changes
2020-01-15 15:48:39.703433490 +0100
+++
/work/SRC/openSUSE:Leap:15.2/.python-django-pipeline.new.26092/python-django-pipeline.changes
2020-02-23 16:47:27.086318333 +0100
@@ -1,0 +2,9 @@
+Thu Jan 9 08:42:28 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Update to 1.7.0:
+ * Apply an optimization to save time during development. Thank to @blankser
+ * Edit setup.py to follow the recommendation of the documentation. Thank to
@shaneikennedy
+ * Add tests for Django 3.0 and Python 3.8
+ * Add alternatives imports for django.utils.six, who has been removed in
Django 3.0
+
+-------------------------------------------------------------------
Old:
----
django-pipeline-1.6.14.tar.gz
New:
----
django-pipeline-1.7.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-django-pipeline.spec ++++++
--- /var/tmp/diff_new_pack.MOOzWU/_old 2020-02-23 16:47:27.454319041 +0100
+++ /var/tmp/diff_new_pack.MOOzWU/_new 2020-02-23 16:47:27.466319064 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-django-pipeline
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,13 +12,13 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-django-pipeline
-Version: 1.6.14
+Version: 1.7.0
Release: 0
Summary: An asset packaging library for Django
License: MIT
@@ -28,17 +28,18 @@
Patch0: django-pipeline-setpcfg.patch
BuildRequires: %{python_module Django >= 1.11}
BuildRequires: %{python_module Jinja2}
+BuildRequires: %{python_module jsmin}
BuildRequires: %{python_module setuptools}
-BuildRequires: sqlite3
+BuildRequires: %{python_module slimit}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
-BuildRequires: python2-futures
+BuildRequires: python2-futures >= 2.1.3
BuildRequires: python2-mock
-Requires: python-Jinja2
Requires: python-Django >= 1.11
+Requires: python-Jinja2
BuildArch: noarch
%ifpython2
-Requires: python2-futures
+Requires: python2-futures >= 2.1.3
%endif
%python_subpackages
@@ -49,7 +50,7 @@
%prep
%setup -q -n django-pipeline-%{version}
-%patch0 -p1
+#%%patch0 -p1
%build
%python_build
@@ -58,10 +59,8 @@
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
-# The tests quite spectaculary fail on newer django releases, upstream must fix
-#%check
-#export DJANGO_SETTINGS_MODULE=tests.settings
-#%%python_exec setup.py test
+%check
+%python_expand %{_bindir}/django-admin.py-%{$python_bin_suffix} test tests
--settings=tests.settings --pythonpath=`pwd`
%files %{python_files}
%license LICENSE
++++++ django-pipeline-1.6.14.tar.gz -> django-pipeline-1.7.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-pipeline-1.6.14/AUTHORS
new/django-pipeline-1.7.0/AUTHORS
--- old/django-pipeline-1.6.14/AUTHORS 2018-01-14 22:17:37.000000000 +0100
+++ new/django-pipeline-1.7.0/AUTHORS 2020-01-05 03:59:08.000000000 +0100
@@ -27,6 +27,7 @@
* Brawaga <[email protected]>
* Brian Montgomery <[email protected]>
* Bryan Chow <[email protected]>
+ * Buky <[email protected]>
* Caio Ariede <[email protected]>
* Camilo Nova <[email protected]>
* Carl Meyer <[email protected]>
@@ -67,6 +68,7 @@
* Josh Braegger <[email protected]>
* Joshua Kehn <[email protected]>
* Julien Hartmann <[email protected]>
+ * Kevin Fox <[email protected]> (@KFoxder)
* Kristian Glass <[email protected]>
* Kyle MacFarlane <[email protected]>
* Leonardo Orozco <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-pipeline-1.6.14/CONTRIBUTING.rst
new/django-pipeline-1.7.0/CONTRIBUTING.rst
--- old/django-pipeline-1.6.14/CONTRIBUTING.rst 2016-03-01 05:57:48.000000000
+0100
+++ new/django-pipeline-1.7.0/CONTRIBUTING.rst 2020-01-05 03:59:08.000000000
+0100
@@ -17,3 +17,26 @@
Otherwise, if you simply wants to suggest a feature or report a bug, create an
issue :
https://github.com/jazzband/django-pipeline/issues
+
+
+Running tests
+=============
+
+We use tox to run the test suite on different versions locally (and travis-ci
+to automate the check for PRs).
+
+To tun the test suite locally, please make sure your python environment has
+tox and django installed::
+
+ python3.7 -m pip install tox
+
+Since we use a number of node.js tools, one should first install the node
+depencies. We reccomend using
[nvm](https://github.com/nvm-sh/nvm#installation-and-update) , tl;dr::
+
+ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh |
bash
+ nvm install node
+ nvm use node
+
+And then simply execute tox to run the whole test matrix::
+
+ tox
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-pipeline-1.6.14/HISTORY.rst
new/django-pipeline-1.7.0/HISTORY.rst
--- old/django-pipeline-1.6.14/HISTORY.rst 2018-01-22 02:15:35.000000000
+0100
+++ new/django-pipeline-1.7.0/HISTORY.rst 2020-01-05 03:59:08.000000000
+0100
@@ -3,6 +3,16 @@
History
=======
+1.7.0
+=====
+
+Release the last major version of django-pipeline working on Python 2.
+* Thank you for all the modifications made since version 1.6.14, which we
cannot quote.
+* Apply an optimization to save time during development. Thank to @blankser
+* Edit setup.py to follow the recommendation of the documentation. Thank to
@shaneikennedy
+* Add tests for Django 3.0 and Python 3.8
+* Add alternatives imports for django.utils.six, who has been removed in
Django 3.0
+
1.6.14
======
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-pipeline-1.6.14/PKG-INFO
new/django-pipeline-1.7.0/PKG-INFO
--- old/django-pipeline-1.6.14/PKG-INFO 2018-01-22 02:26:04.000000000 +0100
+++ new/django-pipeline-1.7.0/PKG-INFO 2020-01-05 04:21:55.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: django-pipeline
-Version: 1.6.14
+Version: 1.7.0
Summary: Pipeline is an asset packaging library for Django.
Home-page: https://github.com/jazzband/django-pipeline
Author: Timothée Peignier
@@ -25,6 +25,11 @@
:alt: PYPI
:target: https://badge.fury.io/py/django-pipeline
+ .. image::
https://readthedocs.org/projects/django-pipeline/badge/?version=latest
+ :alt: Documentation Status
+ :target:
https://django-pipeline.readthedocs.io/en/latest/?badge=latest
+
+
Pipeline is an asset packaging library for Django, providing both CSS
and
JavaScript concatenation and compression, built-in JavaScript template
support,
and optional data-URI image and font embedding.
@@ -50,6 +55,16 @@
History
=======
+ 1.7.0
+ =====
+
+ Release the last major version of django-pipeline working on Python 2.
+ * Thank you for all the modifications made since version 1.6.14, which
we cannot quote.
+ * Apply an optimization to save time during development. Thank to
@blankser
+ * Edit setup.py to follow the recommendation of the documentation.
Thank to @shaneikennedy
+ * Add tests for Django 3.0 and Python 3.8
+ * Add alternatives imports for django.utils.six, who has been removed
in Django 3.0
+
1.6.14
======
@@ -169,21 +184,20 @@
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
-Classifier: Framework :: Django :: 1.6
-Classifier: Framework :: Django :: 1.7
-Classifier: Framework :: Django :: 1.8
-Classifier: Framework :: Django :: 1.9
-Classifier: Framework :: Django :: 1.10
Classifier: Framework :: Django :: 1.11
+Classifier: Framework :: Django :: 2.0
+Classifier: Framework :: Django :: 2.2
+Classifier: Framework :: Django :: 3.0
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Utilities
Classifier: Topic :: Software Development :: Libraries :: Python Modules
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-pipeline-1.6.14/README.rst
new/django-pipeline-1.7.0/README.rst
--- old/django-pipeline-1.6.14/README.rst 2018-01-14 22:17:37.000000000
+0100
+++ new/django-pipeline-1.7.0/README.rst 2020-01-05 03:59:08.000000000
+0100
@@ -17,6 +17,11 @@
:alt: PYPI
:target: https://badge.fury.io/py/django-pipeline
+.. image::
https://readthedocs.org/projects/django-pipeline/badge/?version=latest
+ :alt: Documentation Status
+ :target: https://django-pipeline.readthedocs.io/en/latest/?badge=latest
+
+
Pipeline is an asset packaging library for Django, providing both CSS and
JavaScript concatenation and compression, built-in JavaScript template support,
and optional data-URI image and font embedding.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/django-pipeline-1.6.14/django_pipeline.egg-info/PKG-INFO
new/django-pipeline-1.7.0/django_pipeline.egg-info/PKG-INFO
--- old/django-pipeline-1.6.14/django_pipeline.egg-info/PKG-INFO
2018-01-22 02:26:03.000000000 +0100
+++ new/django-pipeline-1.7.0/django_pipeline.egg-info/PKG-INFO 2020-01-05
04:21:54.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: django-pipeline
-Version: 1.6.14
+Version: 1.7.0
Summary: Pipeline is an asset packaging library for Django.
Home-page: https://github.com/jazzband/django-pipeline
Author: Timothée Peignier
@@ -25,6 +25,11 @@
:alt: PYPI
:target: https://badge.fury.io/py/django-pipeline
+ .. image::
https://readthedocs.org/projects/django-pipeline/badge/?version=latest
+ :alt: Documentation Status
+ :target:
https://django-pipeline.readthedocs.io/en/latest/?badge=latest
+
+
Pipeline is an asset packaging library for Django, providing both CSS
and
JavaScript concatenation and compression, built-in JavaScript template
support,
and optional data-URI image and font embedding.
@@ -50,6 +55,16 @@
History
=======
+ 1.7.0
+ =====
+
+ Release the last major version of django-pipeline working on Python 2.
+ * Thank you for all the modifications made since version 1.6.14, which
we cannot quote.
+ * Apply an optimization to save time during development. Thank to
@blankser
+ * Edit setup.py to follow the recommendation of the documentation.
Thank to @shaneikennedy
+ * Add tests for Django 3.0 and Python 3.8
+ * Add alternatives imports for django.utils.six, who has been removed
in Django 3.0
+
1.6.14
======
@@ -169,21 +184,20 @@
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
-Classifier: Framework :: Django :: 1.6
-Classifier: Framework :: Django :: 1.7
-Classifier: Framework :: Django :: 1.8
-Classifier: Framework :: Django :: 1.9
-Classifier: Framework :: Django :: 1.10
Classifier: Framework :: Django :: 1.11
+Classifier: Framework :: Django :: 2.0
+Classifier: Framework :: Django :: 2.2
+Classifier: Framework :: Django :: 3.0
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Utilities
Classifier: Topic :: Software Development :: Libraries :: Python Modules
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/django-pipeline-1.6.14/django_pipeline.egg-info/SOURCES.txt
new/django-pipeline-1.7.0/django_pipeline.egg-info/SOURCES.txt
--- old/django-pipeline-1.6.14/django_pipeline.egg-info/SOURCES.txt
2018-01-22 02:26:03.000000000 +0100
+++ new/django-pipeline-1.7.0/django_pipeline.egg-info/SOURCES.txt
2020-01-05 04:21:54.000000000 +0100
@@ -28,6 +28,7 @@
pipeline/__init__.py
pipeline/collector.py
pipeline/conf.py
+pipeline/decorator.py
pipeline/exceptions.py
pipeline/finders.py
pipeline/forms.py
@@ -68,7 +69,6 @@
pipeline/templates/pipeline/js.jinja
pipeline/templatetags/__init__.py
pipeline/templatetags/pipeline.py
-tests/.DS_Store
tests/__init__.py
tests/models.py
tests/settings.py
@@ -116,9 +116,6 @@
tests/assets/templates/photo/detail.jst
tests/assets/templates/photo/list.jst
tests/assets/templates/video/detail.jst
-tests/static/screen.css
-tests/static/scripts.js
-tests/static/scripts_async.js
tests/templates/empty.html
tests/templates/index.html
tests/tests/__init__.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/django-pipeline-1.6.14/django_pipeline.egg-info/requires.txt
new/django-pipeline-1.7.0/django_pipeline.egg-info/requires.txt
--- old/django-pipeline-1.6.14/django_pipeline.egg-info/requires.txt
2018-01-22 02:26:03.000000000 +0100
+++ new/django-pipeline-1.7.0/django_pipeline.egg-info/requires.txt
2020-01-05 04:21:54.000000000 +0100
@@ -1,3 +1,3 @@
-[:python_version<"3"]
+[:python_version < "3"]
futures>=2.1.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-pipeline-1.6.14/docs/installation.rst
new/django-pipeline-1.7.0/docs/installation.rst
--- old/django-pipeline-1.6.14/docs/installation.rst 2016-03-01
05:57:48.000000000 +0100
+++ new/django-pipeline-1.7.0/docs/installation.rst 2020-01-05
03:59:08.000000000 +0100
@@ -29,7 +29,7 @@
.. note::
- You need to use ``Django>=1.7`` to be able to use this version of pipeline.
+ You need to use ``Django>=1.11`` to be able to use this version of pipeline.
.. _GitHub: http://github.com/jazzband/django-pipeline
.. _PyPI: http://pypi.python.org/pypi/django-pipeline
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-pipeline-1.6.14/pipeline/collector.py
new/django-pipeline-1.7.0/pipeline/collector.py
--- old/django-pipeline-1.6.14/pipeline/collector.py 2017-01-15
21:06:25.000000000 +0100
+++ new/django-pipeline-1.7.0/pipeline/collector.py 2020-01-05
03:59:08.000000000 +0100
@@ -7,7 +7,11 @@
import django
from django.contrib.staticfiles import finders
from django.contrib.staticfiles.storage import staticfiles_storage
-from django.utils import six
+try:
+ from django.utils.six import iterkeys
+except ImportError:
+ iterkeys = iter
+
from pipeline.finders import PipelineFinder
@@ -57,7 +61,7 @@
if files and len(files) == len(found_files):
break
- return six.iterkeys(found_files)
+ return iterkeys(found_files)
def copy_file(self, path, prefixed_path, source_storage):
# Delete the target file if needed or break
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/django-pipeline-1.6.14/pipeline/compilers/__init__.py
new/django-pipeline-1.7.0/pipeline/compilers/__init__.py
--- old/django-pipeline-1.6.14/pipeline/compilers/__init__.py 2018-01-14
22:17:37.000000000 +0100
+++ new/django-pipeline-1.7.0/pipeline/compilers/__init__.py 2020-01-05
03:59:08.000000000 +0100
@@ -9,7 +9,11 @@
from django.contrib.staticfiles.storage import staticfiles_storage
from django.core.files.base import ContentFile
from django.utils.encoding import smart_bytes
-from django.utils.six import string_types, text_type
+try:
+ from django.utils.six import string_types, text_type
+except ImportError:
+ string_types = (str,)
+ text_type = str
from pipeline.conf import settings
from pipeline.exceptions import CompilerError
@@ -36,9 +40,10 @@
infile = self.storage.path(input_path)
except NotImplementedError:
infile = finders.find(input_path)
+ project_infile = finders.find(input_path)
outfile = compiler.output_path(infile,
compiler.output_extension)
- outdated = compiler.is_outdated(infile, outfile)
- compiler.compile_file(infile, outfile,
+ outdated = compiler.is_outdated(project_infile, outfile)
+ compiler.compile_file(project_infile, outfile,
outdated=outdated, force=force,
**compiler_options)
@@ -116,7 +121,7 @@
# The first element in argument_list is the program that will be
executed; if it is '', then
# a PermissionError will be raised. Thus empty arguments are filtered
out from argument_list
- argument_list = filter(None, argument_list)
+ argument_list = list(filter(None, argument_list))
stdout = None
try:
# We always catch stdout in a file, but we may not have a use for
it.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/django-pipeline-1.6.14/pipeline/compressors/__init__.py
new/django-pipeline-1.7.0/pipeline/compressors/__init__.py
--- old/django-pipeline-1.6.14/pipeline/compressors/__init__.py 2018-01-14
22:17:37.000000000 +0100
+++ new/django-pipeline-1.7.0/pipeline/compressors/__init__.py 2020-01-05
03:59:08.000000000 +0100
@@ -10,7 +10,10 @@
from django.contrib.staticfiles.storage import staticfiles_storage
from django.utils.encoding import smart_bytes, force_text
-from django.utils.six import string_types
+try:
+ from django.utils.six import string_types
+except ImportError:
+ string_types = (str,)
from pipeline.conf import settings
from pipeline.exceptions import CompressorError
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-pipeline-1.6.14/pipeline/conf.py
new/django-pipeline-1.7.0/pipeline/conf.py
--- old/django-pipeline-1.6.14/pipeline/conf.py 2016-08-30 01:49:19.000000000
+0200
+++ new/django-pipeline-1.7.0/pipeline/conf.py 2020-01-05 03:59:08.000000000
+0100
@@ -2,17 +2,16 @@
from __future__ import unicode_literals
import os
-import collections
+from collections import MutableMapping
import shlex
from django.conf import settings as _settings
+from django.core.signals import setting_changed
+from django.dispatch import receiver
try:
- from django.core.signals import setting_changed
+ from django.utils.six import string_types
except ImportError:
- # Django < 1.8
- from django.test.signals import setting_changed
-from django.dispatch import receiver
-from django.utils.six import string_types
+ string_types = (str,)
DEFAULTS = {
@@ -91,7 +90,7 @@
}
-class PipelineSettings(collections.MutableMapping):
+class PipelineSettings(MutableMapping):
"""
Container object for pipeline settings
"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-pipeline-1.6.14/pipeline/decorator.py
new/django-pipeline-1.7.0/pipeline/decorator.py
--- old/django-pipeline-1.6.14/pipeline/decorator.py 1970-01-01
01:00:00.000000000 +0100
+++ new/django-pipeline-1.7.0/pipeline/decorator.py 2020-01-05
03:59:08.000000000 +0100
@@ -0,0 +1,23 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+"""
+ This code is a part of django.utils.six on
https://github.com/django/django/blob/stable/2.2.x/django/utils/six.py removed
form Django 3.0
+ To keep the backward compatibility between python 2 and 3 the decorator
need to be used as well, during the time we find a proper way to
+ handle MetaClass overwright working on both versions (or dropping python 2
support).
+"""
+
+def add_metaclass(metaclass):
+ """Class decorator for creating a class with a metaclass."""
+ def wrapper(cls):
+ orig_vars = cls.__dict__.copy()
+ slots = orig_vars.get('__slots__')
+ if slots is not None:
+ if isinstance(slots, str):
+ slots = [slots]
+ for slots_var in slots:
+ orig_vars.pop(slots_var)
+ orig_vars.pop('__dict__', None)
+ orig_vars.pop('__weakref__', None)
+ return metaclass(cls.__name__, cls.__bases__, orig_vars)
+ return wrapper
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-pipeline-1.6.14/pipeline/forms.py
new/django-pipeline-1.7.0/pipeline/forms.py
--- old/django-pipeline-1.6.14/pipeline/forms.py 2018-01-14
22:17:37.000000000 +0100
+++ new/django-pipeline-1.7.0/pipeline/forms.py 2020-01-05 03:59:08.000000000
+0100
@@ -3,8 +3,13 @@
from __future__ import unicode_literals
from django.contrib.staticfiles.storage import staticfiles_storage
-from django.utils import six
from django.utils.functional import cached_property
+try:
+ from django.utils.six import iteritems, add_metaclass
+except ImportError:
+ from .decorator import add_metaclass
+ def iteritems(dictionary):
+ return dictionary.items()
from .collector import default_collector
from .conf import settings
@@ -168,7 +173,7 @@
media_type='css',
extra_files=extra_files.get(media_target,
[])))
- for media_target, media_packages in six.iteritems(css_packages)
+ for media_target, media_packages in iteritems(css_packages)
)
def _get_js_files(cls, extra_files):
@@ -233,7 +238,7 @@
return source_files
[email protected]_metaclass(PipelineFormMediaMetaClass)
+@add_metaclass(PipelineFormMediaMetaClass)
class PipelineFormMedia(object):
"""Base class for form or widget Media classes that use Pipeline packages.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-pipeline-1.6.14/pipeline/middleware.py
new/django-pipeline-1.7.0/pipeline/middleware.py
--- old/django-pipeline-1.6.14/pipeline/middleware.py 2016-12-17
23:45:36.000000000 +0100
+++ new/django-pipeline-1.7.0/pipeline/middleware.py 2020-01-05
03:59:08.000000000 +0100
@@ -6,11 +6,7 @@
from pipeline.conf import settings
-try:
- # Support for Django 1.10 new MIDDLEWARE setting
- from django.utils.deprecation import MiddlewareMixin
-except ImportError: # Django < 1.10
- MiddlewareMixin = object
+from django.utils.deprecation import MiddlewareMixin
class MinifyHTMLMiddleware(MiddlewareMixin):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/django-pipeline-1.6.14/pipeline/templates/pipeline/css.html
new/django-pipeline-1.7.0/pipeline/templates/pipeline/css.html
--- old/django-pipeline-1.6.14/pipeline/templates/pipeline/css.html
2015-09-22 03:22:19.000000000 +0200
+++ new/django-pipeline-1.7.0/pipeline/templates/pipeline/css.html
2020-01-05 03:59:08.000000000 +0100
@@ -1 +1 @@
-<link href="{{ url }}" rel="stylesheet" type="{{ type }}"{% if media %}
media="{{ media }}"{% endif %}{% if title %} title="{{ title|default:"all"
}}"{% endif %}{% if charset %} charset="{{ charset }}"{% endif %} />
\ No newline at end of file
+<link href="{{ url }}" rel="stylesheet" type="{{ type }}" media="{{
media|default:"all" }}"{% if title %} title="{{ title }}"{% endif %}{% if
charset %} charset="{{ charset }}"{% endif %} />
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-pipeline-1.6.14/setup.cfg
new/django-pipeline-1.7.0/setup.cfg
--- old/django-pipeline-1.6.14/setup.cfg 2018-01-22 02:26:04.000000000
+0100
+++ new/django-pipeline-1.7.0/setup.cfg 2020-01-05 04:21:55.000000000 +0100
@@ -7,5 +7,4 @@
[egg_info]
tag_build =
tag_date = 0
-tag_svn_revision = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-pipeline-1.6.14/setup.py
new/django-pipeline-1.7.0/setup.py
--- old/django-pipeline-1.6.14/setup.py 2018-01-22 02:14:55.000000000 +0100
+++ new/django-pipeline-1.7.0/setup.py 2020-01-05 04:20:37.000000000 +0100
@@ -6,7 +6,7 @@
setup(
name='django-pipeline',
- version='1.6.14',
+ version='1.7.0',
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(),
@@ -16,7 +16,7 @@
license='MIT',
packages=find_packages(exclude=['tests', 'tests.tests']),
zip_safe=False,
- extras_require={ ':python_version<"3"': ['futures>=2.1.3'] },
+ install_requires=['futures >= 2.1.3;python_version<"3"'],
include_package_data=True,
keywords=('django pipeline asset compiling concatenation compression'
' packaging'),
@@ -24,21 +24,20 @@
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Framework :: Django',
- 'Framework :: Django :: 1.6',
- 'Framework :: Django :: 1.7',
- 'Framework :: Django :: 1.8',
- 'Framework :: Django :: 1.9',
- 'Framework :: Django :: 1.10',
'Framework :: Django :: 1.11',
+ 'Framework :: Django :: 2.0',
+ 'Framework :: Django :: 2.2',
+ 'Framework :: Django :: 3.0',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
+ 'Programming Language :: Python :: 3.7',
+ 'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Utilities',
'Topic :: Software Development :: Libraries :: Python Modules',
Binary files old/django-pipeline-1.6.14/tests/.DS_Store and
new/django-pipeline-1.7.0/tests/.DS_Store differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/django-pipeline-1.6.14/tests/assets/compressors/yuglify.js
new/django-pipeline-1.7.0/tests/assets/compressors/yuglify.js
--- old/django-pipeline-1.6.14/tests/assets/compressors/yuglify.js
2016-04-06 06:05:47.000000000 +0200
+++ new/django-pipeline-1.7.0/tests/assets/compressors/yuglify.js
2020-01-05 03:59:08.000000000 +0100
@@ -1 +1 @@
-(function(){(function(){window.concat=function(){console.log(arguments)}})(),function(){window.cat=function(){console.log("hello
world")}}()}).call(this);
+(function(){!function(){window.concat=function(){console.log(arguments)}}(),function(){window.cat=function(){console.log("hello
world")}}()}).call(this);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-pipeline-1.6.14/tests/settings.py
new/django-pipeline-1.7.0/tests/settings.py
--- old/django-pipeline-1.6.14/tests/settings.py 2018-01-14
22:17:37.000000000 +0100
+++ new/django-pipeline-1.7.0/tests/settings.py 2020-01-05 03:59:08.000000000
+0100
@@ -19,6 +19,7 @@
INSTALLED_APPS = [
'django.contrib.contenttypes',
+ 'django.contrib.messages',
'django.contrib.sites',
'django.contrib.sessions',
'django.contrib.staticfiles',
@@ -28,17 +29,16 @@
'tests.tests'
]
-MIDDLEWARE_CLASSES = (
- 'django.contrib.sessions.middleware.SessionMiddleware',
- 'django.contrib.auth.middleware.AuthenticationMiddleware'
-)
ROOT_URLCONF = 'tests.urls'
-MIDDLEWARE_CLASSES = (
+MIDDLEWARE = [
+ 'django.contrib.sessions.middleware.SessionMiddleware',
+ 'django.contrib.auth.middleware.AuthenticationMiddleware',
+ 'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.common.CommonMiddleware',
- 'django.middleware.csrf.CsrfViewMiddleware'
-)
+ 'django.middleware.csrf.CsrfViewMiddleware',
+]
MEDIA_URL = '/media/'
@@ -70,6 +70,28 @@
'pipeline/css/urls.css'
),
'output_filename': 'screen.css'
+ },
+ 'screen_media': {
+ 'source_filenames': (
+ 'pipeline/css/first.css',
+ 'pipeline/css/second.css',
+ 'pipeline/css/urls.css'
+ ),
+ 'output_filename': 'screen_media.css',
+ 'extra_context': {
+ 'media': 'screen and (min-width:500px)',
+ },
+ },
+ 'screen_title': {
+ 'source_filenames': (
+ 'pipeline/css/first.css',
+ 'pipeline/css/second.css',
+ 'pipeline/css/urls.css'
+ ),
+ 'output_filename': 'screen_title.css',
+ 'extra_context': {
+ 'title': 'Default Style',
+ },
}
},
'JAVASCRIPT': {
@@ -155,7 +177,7 @@
PIPELINE.update({
'CLOSURE_BINARY': [
JAVA_EXE_PATH, '-jar',
- os.path.join(NODE_MODULES_PATH, 'google-closure-compiler',
'compiler.jar')],
+ os.path.join(NODE_MODULES_PATH, 'google-closure-compiler-java',
'compiler.jar')],
'YUI_BINARY': [
JAVA_EXE_PATH, '-jar',
glob.glob(os.path.join(NODE_MODULES_PATH, 'yuicompressor',
'build', '*.jar'))[0]]
@@ -172,6 +194,7 @@
'OPTIONS': {
'context_processors': [
'django.contrib.auth.context_processors.auth',
+ 'django.contrib.messages.context_processors.messages',
]
}
},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-pipeline-1.6.14/tests/static/scripts.js
new/django-pipeline-1.7.0/tests/static/scripts.js
--- old/django-pipeline-1.6.14/tests/static/scripts.js 2016-01-03
08:10:48.000000000 +0100
+++ new/django-pipeline-1.7.0/tests/static/scripts.js 1970-01-01
01:00:00.000000000 +0100
@@ -1,3 +0,0 @@
-(function() {
-
-}).call(this);
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-pipeline-1.6.14/tests/static/scripts_async.js
new/django-pipeline-1.7.0/tests/static/scripts_async.js
--- old/django-pipeline-1.6.14/tests/static/scripts_async.js 2016-01-03
08:10:48.000000000 +0100
+++ new/django-pipeline-1.7.0/tests/static/scripts_async.js 1970-01-01
01:00:00.000000000 +0100
@@ -1,3 +0,0 @@
-(function() {
-
-}).call(this);
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-pipeline-1.6.14/tests/tests/test_forms.py
new/django-pipeline-1.7.0/tests/tests/test_forms.py
--- old/django-pipeline-1.6.14/tests/tests/test_forms.py 2018-01-14
22:17:37.000000000 +0100
+++ new/django-pipeline-1.7.0/tests/tests/test_forms.py 2020-01-05
03:59:08.000000000 +0100
@@ -2,7 +2,6 @@
from django.forms import Media
from django.test import TestCase
-from django.utils import six
from pipeline.forms import PipelineFormMedia
from ..utils import pipeline_settings
@@ -76,21 +75,23 @@
'print': ['/static/print.min.css'],
})
self.assertEqual(MyMedia.css, media._css)
- self.assertEqual(
- list(media.render_css()),
- [
- '<link href="%s" type="text/css" media="all" '
- 'rel="stylesheet" />' % path
- for path in (
- '/static/extra1.css',
- '/static/extra2.css',
- '/static/styles1.min.css',
- '/static/styles2.min.css',
- )
- ] + [
- '<link href="/static/print.min.css" type="text/css" '
- 'media="print" rel="stylesheet" />'
- ])
+ expected_regex = [
+ r'<link href="%s" type="text/css" media="all" '
+ 'rel="stylesheet"( /)?>' % path
+ for path in (
+ '/static/extra1.css',
+ '/static/extra2.css',
+ '/static/styles1.min.css',
+ '/static/styles2.min.css',
+ )
+ ] + [
+ r'<link href="/static/print.min.css" type="text/css" '
+ 'media="print" rel="stylesheet"( /)?>'
+ ]
+ for rendered_node, expected_node in zip(
+ media.render_css(), expected_regex
+ ):
+ self.assertRegex(rendered_node, expected_node)
@pipeline_settings(PIPELINE_ENABLED=False)
def test_css_packages_with_pipeline_disabled(self):
@@ -120,22 +121,25 @@
'print': ['pipeline/css/urls.css'],
})
self.assertEqual(MyMedia.css, media._css)
- self.assertEqual(
- list(media.render_css()),
- [
- '<link href="%s" type="text/css" media="all" '
- 'rel="stylesheet" />' % path
- for path in (
- '/static/extra1.css',
- '/static/extra2.css',
- '/static/pipeline/css/first.css',
- '/static/pipeline/css/second.css',
- '/static/pipeline/css/unicode.css',
- )
- ] + [
- '<link href="/static/pipeline/css/urls.css" type="text/css" '
- 'media="print" rel="stylesheet" />'
- ])
+
+ expected_regex = [
+ '<link href="%s" type="text/css" media="all" '
+ 'rel="stylesheet"( /)?>' % path
+ for path in (
+ '/static/extra1.css',
+ '/static/extra2.css',
+ '/static/pipeline/css/first.css',
+ '/static/pipeline/css/second.css',
+ '/static/pipeline/css/unicode.css',
+ )
+ ] + [
+ '<link href="/static/pipeline/css/urls.css" type="text/css" '
+ 'media="print" rel="stylesheet"( /)?>'
+ ]
+ for rendered_node, expected_node in zip(
+ media.render_css(), expected_regex
+ ):
+ self.assertRegex(rendered_node, expected_node)
@pipeline_settings(PIPELINE_ENABLED=True)
def test_js_packages_with_pipeline_enabled(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/django-pipeline-1.6.14/tests/tests/test_middleware.py
new/django-pipeline-1.7.0/tests/tests/test_middleware.py
--- old/django-pipeline-1.6.14/tests/tests/test_middleware.py 2015-09-22
03:22:19.000000000 +0200
+++ new/django-pipeline-1.7.0/tests/tests/test_middleware.py 2020-01-05
03:59:08.000000000 +0100
@@ -1,6 +1,12 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
+try:
+ from mock import patch
+except ImportError:
+ from unittest.mock import patch # noqa
+
+from django.core.exceptions import MiddlewareNotUsed
from django.test import TestCase
from django.http import HttpRequest, HttpResponse
@@ -34,3 +40,9 @@
response = MinifyHTMLMiddleware().process_response(self.req, self.resp)
self.assertIn('text/plain', response['Content-Type'])
self.assertIn(self.whitespace, response.content)
+
+ @patch('pipeline.middleware.settings.PIPELINE_ENABLED', False)
+ def test_middleware_not_used(self):
+ self.resp['Content-Type'] = 'text/plain; charset=UTF-8'
+
+ self.assertRaises(MiddlewareNotUsed, MinifyHTMLMiddleware)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-pipeline-1.6.14/tests/tests/test_storage.py
new/django-pipeline-1.7.0/tests/tests/test_storage.py
--- old/django-pipeline-1.6.14/tests/tests/test_storage.py 2018-01-14
22:17:37.000000000 +0100
+++ new/django-pipeline-1.7.0/tests/tests/test_storage.py 2020-01-05
03:59:08.000000000 +0100
@@ -6,11 +6,7 @@
from django.test import TestCase
from django.test.utils import override_settings
-try:
- from django.test.utils import modify_settings
-except ImportError:
- # Django < 1.7
- from tests.utils import modify_settings
+from django.test.utils import modify_settings
from pipeline.collector import default_collector
from pipeline.storage import PipelineStorage
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-pipeline-1.6.14/tests/tests/test_template.py
new/django-pipeline-1.7.0/tests/tests/test_template.py
--- old/django-pipeline-1.6.14/tests/tests/test_template.py 2016-03-01
05:57:48.000000000 +0100
+++ new/django-pipeline-1.7.0/tests/tests/test_template.py 2020-01-05
03:59:08.000000000 +0100
@@ -56,11 +56,19 @@
def test_compressed_empty(self):
rendered = self.render_template(u"""{% load pipeline %}{% stylesheet
"unknow" %}""")
- self.assertEqual(u"", rendered)
+ self.assertEqual(u'', rendered)
def test_compressed_css(self):
rendered = self.render_template(u"""{% load pipeline %}{% stylesheet
"screen" %}""")
- self.assertEqual(u'<link href="/static/screen.css" rel="stylesheet"
type="text/css" />', rendered)
+ self.assertEqual(u'<link href="/static/screen.css" rel="stylesheet"
type="text/css" media="all" />', rendered)
+
+ def test_compressed_css_media(self):
+ rendered = self.render_template(u"""{% load pipeline %}{% stylesheet
"screen_media" %}""")
+ self.assertEqual(u'<link href="/static/screen_media.css"
rel="stylesheet" type="text/css" media="screen and (min-width:500px)" />',
rendered)
+
+ def test_compressed_css_title(self):
+ rendered = self.render_template(u"""{% load pipeline %}{% stylesheet
"screen_title" %}""")
+ self.assertEqual(u'<link href="/static/screen_title.css"
rel="stylesheet" type="text/css" media="all" title="Default Style" />',
rendered)
def test_compressed_js(self):
rendered = self.render_template(u"""{% load pipeline %}{% javascript
"scripts" %}""")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-pipeline-1.6.14/tests/utils.py
new/django-pipeline-1.7.0/tests/utils.py
--- old/django-pipeline-1.6.14/tests/utils.py 2016-12-17 23:45:36.000000000
+0100
+++ new/django-pipeline-1.7.0/tests/utils.py 2020-01-05 03:59:08.000000000
+0100
@@ -1,14 +1,8 @@
import os
import django
-from django.conf import settings
-from django.utils import six
-try:
- from django.test import override_settings
-except ImportError:
- # Django < 1.7
- from django.test.utils import override_settings
+from django.test import override_settings
def _(path):
@@ -24,51 +18,3 @@
# so we must do the same.
super(pipeline_settings, self).__init__()
self.options = {'PIPELINE': kwargs}
-
-
-# Django < 1.7 (copy-pasted from Django 1.7)
-class modify_settings(override_settings):
- """
- Like override_settings, but makes it possible to append, prepend or remove
- items instead of redefining the entire list.
- """
- def __init__(self, *args, **kwargs):
- if args:
- # Hack used when instantiating from SimpleTestCase._pre_setup.
- assert not kwargs
- self.operations = args[0]
- else:
- assert not args
- self.operations = list(kwargs.items())
-
- def save_options(self, test_func):
- if test_func._modified_settings is None:
- test_func._modified_settings = self.operations
- else:
- # Duplicate list to prevent subclasses from altering their parent.
- test_func._modified_settings = list(
- test_func._modified_settings) + self.operations
-
- def enable(self):
- self.options = {}
- for name, operations in self.operations:
- try:
- # When called from SimpleTestCase._pre_setup, values may be
- # overridden several times; cumulate changes.
- value = self.options[name]
- except KeyError:
- value = list(getattr(settings, name, []))
- for action, items in operations.items():
- # items my be a single value or an iterable.
- if isinstance(items, six.string_types):
- items = [items]
- if action == 'append':
- value = value + [item for item in items if item not in
value]
- elif action == 'prepend':
- value = [item for item in items if item not in value] +
value
- elif action == 'remove':
- value = [item for item in value if item not in items]
- else:
- raise ValueError("Unsupported action: %s" % action)
- self.options[name] = value
- super(modify_settings, self).enable()