Skip to content

Commit 7abbc54

Browse files
Start working on 3.0
- BREAKING: The minimum supported Django version is now 3.2 (other versions may work, but are not tested) - BREAKING: Drop support for Python 3.7 and below - BREAKING: Drop support for Ruby-based Sass compiler
1 parent 26fab45 commit 7abbc54

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+84
-620
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v4.3.0
5+
rev: v4.4.0
66
hooks:
77
- id: check-ast
88
- id: check-merge-conflict
@@ -14,14 +14,14 @@ repos:
1414
- id: trailing-whitespace
1515
- repo: https://github.com/charliermarsh/ruff-pre-commit
1616
# Ruff version.
17-
rev: 'v0.0.198'
17+
rev: 'v0.0.285'
1818
hooks:
1919
- id: ruff
2020
# Respect `exclude` and `extend-exclude` settings.
21-
args: ["--force-exclude", "--fix"]
21+
args: ["--fix"]
2222
exclude: ^docs/.*
2323
- repo: https://github.com/psf/black
24-
rev: 22.10.0
24+
rev: 23.7.0
2525
hooks:
2626
- id: black
2727
- repo: https://github.com/keewis/blackdoc
@@ -30,11 +30,11 @@ repos:
3030
- id: blackdoc
3131
files: ^docs/.*\.rst$
3232
- repo: https://github.com/shellcheck-py/shellcheck-py
33-
rev: v0.8.0.4
33+
rev: v0.9.0.5
3434
hooks:
3535
- id: shellcheck
3636
- repo: https://github.com/codespell-project/codespell
37-
rev: v2.2.2
37+
rev: v2.2.5
3838
hooks:
3939
- id: codespell
4040
files: ^docs/.*\.rst$
@@ -44,7 +44,7 @@ repos:
4444
- id: woke-from-source
4545
files: ^docs/.*\.rst$
4646
- repo: https://github.com/jackdewinter/pymarkdown
47-
rev: v0.9.8
47+
rev: v0.9.12
4848
hooks:
4949
- id: pymarkdown
5050
args: [--disable-rules, MD041, scan]

.readthedocs.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@
55
# Required
66
version: 2
77

8-
# Build documentation in the docs/ directory with Sphinx
9-
sphinx:
10-
configuration: docs/conf.py
8+
build:
9+
os: ubuntu-22.04
10+
tools:
11+
python: "3"
1112

12-
# Optionally set the version of Python and requirements required to build your docs
1313
python:
14-
version: 3
1514
install:
1615
- method: pip
1716
path: .
17+
18+
# Build documentation in the docs/ directory with Sphinx
19+
sphinx:
20+
configuration: docs/conf.py

CHANGES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
## Changelog
22

3+
### 3.0
4+
5+
- BREAKING: The minimum supported Django version is now 3.2
6+
(other versions may work, but are not tested)
7+
- BREAKING: Drop support for Python 3.7 and below
8+
- BREAKING: Drop support for Ruby-based Sass compiler
9+
310
### 2.4
411

512
#### Deprecation

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
1-
FROM andreyfedoseev/django-static-precompiler:18.04-2
1+
FROM andreyfedoseev/django-static-precompiler:20.04-1
22
ARG DEBIAN_FRONTEND=noninteractive
33
ENV TZ=Etc/UTC
44
RUN apt update && \
55
apt install software-properties-common -y && \
66
add-apt-repository ppa:deadsnakes/ppa -y && \
77
apt install -y \
8-
python3.6-dev \
98
python3.8-dev \
109
python3.9-dev \
1110
python3.9-distutils \
1211
python3.10-dev \
1312
python3.10-distutils \
1413
python3.11-dev \
1514
python3.11-distutils \
15+
python3.12-dev \
16+
python3.12-distutils \
1617
python3-pip \
1718
sqlite3
1819
RUN mkdir /app
1920
WORKDIR /app
2021
ADD requirements-*.txt /app/
2122
RUN pip3 install -r requirements-test.txt
2223
ADD . /app/
23-
RUN pip3 install -e .[libsass]
24+
RUN pip3 install .[libsass]

Dockerfile-base

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
FROM ubuntu:18.04
2-
MAINTAINER Andrey Fedoseev <[email protected]>
3-
RUN apt-get update && apt-get install -y autoconf libtool ruby-dev npm wget
1+
FROM ubuntu:20.04
2+
MAINTAINER Andrey Fedoseev <[email protected]>
3+
ENV DEBIAN_FRONTEND=noninteractive
4+
RUN apt update && apt install -y autoconf libtool npm wget
45
RUN ln -s /usr/bin/nodejs /usr/local/bin/node
56
RUN npm install -g [email protected]
67
RUN npm install -g [email protected]
78
RUN npm install -g [email protected]
89
RUN npm install -g [email protected]
910
RUN npm install -g [email protected]
1011
RUN npm install -g [email protected]
11-
RUN gem install sass -v 3.4.22
12-
RUN gem install compass -v 1.0.1
13-
RUN wget -O /tmp/dart-sass.tar.gz https://github.com/sass/dart-sass/releases/download/1.56.1/dart-sass-1.56.1-linux-x64.tar.gz && \
12+
RUN wget -O /tmp/dart-sass.tar.gz https://github.com/sass/dart-sass/releases/download/1.66.0/dart-sass-1.66.0-linux-x64.tar.gz && \
1413
tar -xzf /tmp/dart-sass.tar.gz -C /opt && \
1514
rm -rf /tmp/dart-sass.tar.gz
15+
ENV PATH="/opt/dart-sass:${PATH}"

docs/compiler-settings.rst

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -119,55 +119,6 @@ Example:
119119
SASS / SCSS
120120
===========
121121

122-
Ruby-based (legacy) SASS compiler.
123-
124-
``executable``
125-
Path to SASS compiler executable. Default: "sass".
126-
127-
``sourcemap_enabled``
128-
Boolean. Set to ``True`` to enable source maps. Default: ``False``.
129-
130-
``compass_enabled``
131-
Boolean. Whether to use compass or not. Compass must be installed in your system.
132-
Run ``sass --compass`` and if no error is shown it means that compass is installed.
133-
134-
``load_paths``
135-
List of additional directories to look imported files (``--load-path`` command line option). Default: ``None``.
136-
137-
``precision``
138-
How many digits of precision to use when outputting decimal numbers. Default: ``None``.
139-
Set this to 8 or more if you compile Bootstrap.
140-
141-
``output_style``
142-
Output style. Default: ``None``.
143-
Can be nested, compact, compressed, or expanded.
144-
145-
Example:
146-
147-
.. code-block:: python
148-
149-
STATIC_PRECOMPILER_COMPILERS = (
150-
(
151-
"static_precompiler.compilers.SCSS",
152-
{
153-
"executable": "/usr/bin/sass",
154-
"sourcemap_enabled": True,
155-
"compass_enabled": True,
156-
"load_paths": ["/path"],
157-
"precision": 8,
158-
"output_style": "compressed",
159-
},
160-
),
161-
)
162-
163-
164-
Dart Sass
165-
=========
166-
167-
Dart Sass is the current implementation of SASS.
168-
169-
.. note:: Dart Sass compiler is not enabled by default. See the example below for how to enable it.
170-
171122
Options:
172123

173124
``sourcemap_enabled``

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@
5151
# built documents.
5252
#
5353
# The short X.Y version.
54-
version = "2.4"
54+
version = "3.0"
5555
# The full version, including alpha/beta/rc tags.
56-
release = version
56+
release = "3.0a1"
5757

5858
# The language for content autogenerated by Sphinx. Refer to documentation
5959
# for a list of supported languages.

docs/general-settings.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ General settings
2323
2424
STATIC_PRECOMPILER_COMPILERS = (
2525
("static_precompiler.compilers.CoffeeScript", {"executable": "/usr/bin/coffeescript"}),
26-
("static_precompiler.compilers.SCSS", {"compass_enabled": True}),
26+
("static_precompiler.compilers.SCSS", {"load_paths": ["/some/path"]}),
2727
)
2828
2929

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ line-length = 120
77

88
[tool.ruff]
99
select = ["F", "E", "W", "I", "YTT", "B", "C4", "T10", "SIM", "ERA", "RUF", "UP"]
10-
ignore = ["RUF001"]
10+
ignore = ["RUF001", "RUF012"]
1111
line-length = 120
12-
target-version = "py36"
12+
target-version = "py38"
1313

1414
[tool.ruff.isort]
1515
known-first-party = ["static_precompiler"]
1616

1717
[tool.mypy]
18-
python_version = "3.6"
18+
python_version = "3.8"
1919
plugins = ["mypy_django_plugin.main"]
2020

2121
[[tool.mypy.overrides]]

setup.cfg

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = django-static-precompiler
3-
version = 2.4
3+
version = 3.0a1
44
author = Andrey Fedoseev
55
author_email = [email protected]
66
description =
@@ -15,18 +15,16 @@ project_urls =
1515
Documentation = https://django-static-precompiler.readthedocs.io/
1616
classifiers =
1717
Development Status :: 5 - Production/Stable
18-
Framework :: Django :: 2
1918
Framework :: Django :: 3
2019
Framework :: Django :: 4
2120
Intended Audience :: Developers
2221
License :: OSI Approved :: BSD License
2322
Operating System :: OS Independent
24-
Programming Language :: Python :: 3.6
25-
Programming Language :: Python :: 3.7
2623
Programming Language :: Python :: 3.8
2724
Programming Language :: Python :: 3.9
2825
Programming Language :: Python :: 3.10
2926
Programming Language :: Python :: 3.11
27+
Programming Language :: Python :: 3.12
3028
Topic :: Internet :: WWW/HTTP
3129
keywords =
3230
sass
@@ -45,9 +43,9 @@ keywords =
4543
package_dir =
4644
= src
4745
packages = find:
48-
python_requires = >=3.6
46+
python_requires = >=3.8
4947
install_requires =
50-
Django>=2.0
48+
Django>=3.2
5149
tests_require =
5250
pytest
5351
pytest-django

0 commit comments

Comments
 (0)