Skip to content

Commit b340b77

Browse files
TheBukyTheBuky
TheBuky
authored and
TheBuky
committed
Django-Pipeline 2.0.2
1 parent 44eeb9d commit b340b77

File tree

8 files changed

+27
-12
lines changed

8 files changed

+27
-12
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,4 @@ or just made Pipeline more awesome.
121121
* Wismill
122122
* Zachary Kazanski <[email protected]>
123123
* Zenobius Jiricek <[email protected]>
124+
* Zeus Kronion

HISTORY.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33
History
44
=======
55

6+
2.0.2
7+
=====
8+
9+
* Fix Middleware to properly decode HTML. Thank to @gatsinski
10+
* Keep mimetypes as str. Thank to @benspaulding
11+
* Based on #642 add 'NonPackagingPipelineManifestStorage' and update
12+
the documentation: **storages.rst**. Thank to @kronion
13+
* Remove futures from pipeline **setup.py** requirements.
14+
615
2.0.1
716
=====
817

docs/storages.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ to use it configure ``STATICFILES_STORAGE`` like so ::
1515

1616
And if you want versioning use ::
1717

18-
STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
18+
STATICFILES_STORAGE = 'pipeline.storage.PipelineManifestStorage'
1919

2020
There is also non-packing storage available, that allows you to run ``collectstatic`` command
2121
without packaging your assets. Useful for production when you don't want to run compressor or compilers ::
@@ -24,7 +24,7 @@ without packaging your assets. Useful for production when you don't want to run
2424

2525
Also available if you want versioning ::
2626

27-
STATICFILES_STORAGE = 'pipeline.storage.NonPackagingPipelineCachedStorage'
27+
STATICFILES_STORAGE = 'pipeline.storage.NonPackagingPipelineManifestStorage'
2828

2929
If you use staticfiles with ``DEBUG = False`` (i.e. for integration tests
3030
with `Selenium <http://docs.seleniumhq.org/>`_) you should install the finder

pipeline/conf.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@
7171
'LESS_ARGUMENTS': '',
7272

7373
'MIMETYPES': (
74-
(str('text/coffeescript'), str('.coffee')),
75-
(str('text/less'), str('.less')),
76-
(str('text/javascript'), str('.js')),
77-
(str('text/x-sass'), str('.sass')),
78-
(str('text/x-scss'), str('.scss'))
74+
(('text/coffeescript'), ('.coffee')),
75+
(('text/less'), ('.less')),
76+
(('text/javascript'), ('.js')),
77+
(('text/x-sass'), ('.sass')),
78+
(('text/x-scss'), ('.scss'))
7979
),
8080

8181
'EMBED_MAX_IMAGE_SIZE': 32700,

pipeline/middleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def __init__(self, *args, **kwargs):
1616
def process_response(self, request, response):
1717
if response.has_header('Content-Type') and 'text/html' in response['Content-Type']:
1818
try:
19-
response.content = minify_html(response.content.decode().strip())
19+
response.content = minify_html(response.content.decode('utf-8').strip())
2020
response['Content-Length'] = str(len(response.content))
2121
except DjangoUnicodeDecodeError:
2222
pass

pipeline/storage.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,18 @@ class NonPackagingPipelineStorage(NonPackagingMixin, PipelineStorage):
9191

9292

9393
class PipelineCachedStorage(PipelineMixin, CachedStaticFilesStorage):
94+
# Deprecated since Django 2.2
95+
pass
96+
97+
98+
class NonPackagingPipelineCachedStorage(NonPackagingMixin, PipelineCachedStorage):
99+
# Deprecated since Django 2.2
94100
pass
95101

96102

97103
class PipelineManifestStorage(PipelineMixin, ManifestStaticFilesStorage):
98104
pass
99105

100106

101-
class NonPackagingPipelineCachedStorage(NonPackagingMixin, PipelineCachedStorage):
107+
class NonPackagingPipelineManifestStorage(NonPackagingMixin, ManifestStaticFilesStorage):
102108
pass

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
setup(
88
name='django-pipeline',
9-
version='2.0.1',
9+
version='2.0.2',
1010
description='Pipeline is an asset packaging library for Django.',
1111
long_description=io.open('README.rst', encoding='utf-8').read() + '\n\n' +
1212
io.open('HISTORY.rst', encoding='utf-8').read(),
@@ -16,7 +16,7 @@
1616
license='MIT',
1717
packages=find_packages(exclude=['tests', 'tests.tests']),
1818
zip_safe=False,
19-
install_requires=['futures >= 2.1.3;python_version<"3.6"'],
19+
install_requires=['python_version<"3.6"'],
2020
include_package_data=True,
2121
keywords=('django pipeline asset compiling concatenation compression'
2222
' packaging'),

tests/tests/test_utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# -*- coding: utf-8 -*-
2-
from __future__ import unicode_literals
32

43
import mimetypes
54

0 commit comments

Comments
 (0)