Skip to content

Commit 07c70e7

Browse files
committed
Add support for Django 5.2, as well as test against 5.2
1 parent 047894f commit 07c70e7

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
fail-fast: false
1111
matrix:
1212
python-version: ['3.9', '3.10', '3.11', '3.12', 'pypy-3.10']
13-
django-version: ['4.1', '4.2', '5.0', '5.1', 'main']
13+
django-version: ['4.1', '4.2', '5.0', '5.1', '5.2', 'main']
1414
exclude:
1515
- python-version: '3.9'
1616
django-version: '5.0'

pipeline/finders.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
class PipelineFinder(BaseStorageFinder):
1919
storage = staticfiles_storage
2020

21-
def find(self, path, all=False):
21+
def find(self, path, **kwargs):
2222
if not settings.PIPELINE_ENABLED:
23-
return super().find(path, all)
23+
return super().find(path, **kwargs)
2424
else:
2525
return []
2626

@@ -29,15 +29,17 @@ def list(self, ignore_patterns):
2929

3030

3131
class ManifestFinder(BaseFinder):
32-
def find(self, path, all=False):
32+
def find(self, path, **kwargs):
3333
"""
3434
Looks for files in PIPELINE.STYLESHEETS and PIPELINE.JAVASCRIPT
3535
"""
36+
match_all = kwargs.get("find_all", kwargs.get("all", False))
37+
3638
matches = []
3739
for elem in chain(settings.STYLESHEETS.values(), settings.JAVASCRIPT.values()):
3840
if normpath(elem["output_filename"]) == normpath(path):
3941
match = safe_join(settings.PIPELINE_ROOT, path)
40-
if not all:
42+
if not match_all:
4143
return match
4244
matches.append(match)
4345
return matches
@@ -47,7 +49,7 @@ def list(self, *args):
4749

4850

4951
class CachedFileFinder(BaseFinder):
50-
def find(self, path, all=False):
52+
def find(self, path, **kwargs):
5153
"""
5254
Work out the uncached name of the file and look that up instead
5355
"""
@@ -56,7 +58,7 @@ def find(self, path, all=False):
5658
except ValueError:
5759
return []
5860
path = ".".join((start, extn))
59-
return find(path, all=all) or []
61+
return find(path, **kwargs) or []
6062

6163
def list(self, *args):
6264
return []

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ classifiers = [
1919
"Framework :: Django :: 4.2",
2020
"Framework :: Django :: 5.0",
2121
"Framework :: Django :: 5.1",
22+
"Framework :: Django :: 5.2",
2223
"Intended Audience :: Developers",
2324
"License :: OSI Approved :: MIT License",
2425
"Operating System :: OS Independent",

tox.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ DJANGO =
2222
4.2: dj42
2323
5.0: dj50
2424
5.1: dj51
25+
5.2: dj52
2526
main: djmain
2627

2728
[testenv]
@@ -38,6 +39,7 @@ deps =
3839
dj42: Django>=4.2,<4.3
3940
dj50: Django>=5.0,<5.1
4041
dj51: Django>=5.1,<5.2
42+
dj52: Django>=5.2,<5.3
4143
djmain: https://github.com/django/django/archive/main.tar.gz
4244
jinja2
4345
coverage

0 commit comments

Comments
 (0)