Skip to content

Commit 47e7a67

Browse files
committed
Merge remote-tracking branch 'upstream/main' into docs/tutorial-cleanup
2 parents 720507d + ec1da18 commit 47e7a67

File tree

14 files changed

+42
-26
lines changed

14 files changed

+42
-26
lines changed

.github/workflows/codecov.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,34 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] # latest release minus two
19+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] # latest release minus two
2020
requirements-file: [
2121
dj42_cms311.txt,
2222
dj42_cms41.txt,
2323
dj50_cms41.txt,
2424
dj51_cms41.txt,
2525
dj52_cms50.txt,
26+
dj60_cms50.txt,
2627
]
2728
os: [
2829
ubuntu-latest,
2930
]
3031
exclude:
31-
- python-version: "3.9"
32+
# Python 3.14 only works with Django 5.2+
33+
- python-version: "3.14"
34+
requirements-file: dj42_cms311.txt
35+
- python-version: "3.14"
36+
requirements-file: dj42_cms41.txt
37+
- python-version: "3.14"
3238
requirements-file: dj50_cms41.txt
33-
- python-version: "3.9"
39+
- python-version: "3.14"
3440
requirements-file: dj51_cms41.txt
35-
- python-version: "3.9"
36-
requirements-file: dj52_cms50.txt
41+
# Python 3.10 and 3.11 only supported until Django 5.2
3742
- python-version: "3.10"
38-
requirements-file: dj52_cms50.txt
43+
requirements-file: dj60_cms50.txt
44+
- python-version: "3.11"
45+
requirements-file: dj60_cms50.txt
46+
# Python 3.12 and 3.13 don't support Django 4.2 with CMS 3.11
3947
- python-version: "3.12"
4048
requirements-file: dj42_cms311.txt
4149
- python-version: "3.13"
@@ -53,7 +61,8 @@ jobs:
5361
- name: Install dependencies
5462
run: |
5563
sudo apt install libcairo2-dev pkg-config python3-dev
56-
pip install -U -r tests/requirements/${{ matrix.requirements-file }}
64+
python -m pip install --upgrade pip uv
65+
uv pip install --system -r tests/requirements/${{ matrix.requirements-file }}
5766
- name: Run coverage
5867
run: |
5968
coverage run -m pytest

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repos:
1212
rev: v3.20.0
1313
hooks:
1414
- id: pyupgrade
15-
args: ["--py39-plus"]
15+
args: ["--py310-plus"]
1616

1717
- repo: https://github.com/adamchainz/django-upgrade
1818
rev: "1.29.0"
@@ -33,6 +33,6 @@ repos:
3333
- flake8-logging-format
3434

3535
- repo: https://github.com/tox-dev/pyproject-fmt
36-
rev: v2.7.0
36+
rev: v2.11.0
3737
hooks:
3838
- id: pyproject-fmt

djangocms_frontend/component_base.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import importlib
2-
import typing
32

43
from django import forms
54
from django.apps import apps
@@ -212,11 +211,11 @@ def get_registration(cls) -> tuple[type, type, list[type]]:
212211
)
213212

214213
@classproperty
215-
def _component_meta(cls) -> typing.Optional[type]:
214+
def _component_meta(cls) -> type | None:
216215
return getattr(cls, "Meta", None)
217216

218217
@classmethod
219-
def _generate_fieldset(cls) -> list[tuple[typing.Optional[str], dict]]:
218+
def _generate_fieldset(cls) -> list[tuple[str | None, dict]]:
220219
return [(None, {"fields": cls.declared_fields.keys()})]
221220

222221
def get_short_description(self) -> str:

djangocms_frontend/static/djangocms_frontend/css/base.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

djangocms_frontend/templatetags/frontend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def render_tag(self, context, slot_name, nodelist):
156156

157157

158158
class DummyPlugin:
159-
def __init__(self, nodelist, plugin_type, slot_name: typing.Optional[str] = None) -> "DummyPlugin":
159+
def __init__(self, nodelist, plugin_type, slot_name: str | None = None) -> "DummyPlugin":
160160
self.nodelist = nodelist
161161
self.plugin_type = (f"{plugin_type}{slot_name.capitalize()}Plugin") if slot_name else "DummyPlugin"
162162
if slot_name is None:

private/sass/components/_tabs.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ form ul.djangocms-frontend.nav.nav-pills {
99
margin: 0 !important;
1010
padding: 0;
1111
display: flex;
12+
flex-wrap: wrap;
1213
&:not(:has(> li:nth-child(2))) {
1314
// Hide single tab
1415
display: none;

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ license = "BSD-3-Clause"
1111
authors = [
1212
{ name = "Fabian Braun", email = "fsbraun@gmx.de" },
1313
]
14-
requires-python = ">=3.9"
14+
requires-python = ">=3.10"
1515
classifiers = [
1616
"Development Status :: 5 - Production/Stable",
1717
"Framework :: Django",
@@ -24,11 +24,11 @@ classifiers = [
2424
"Framework :: Django CMS :: 4.1",
2525
"Framework :: Django CMS :: 5.0",
2626
"Programming Language :: Python :: 3 :: Only",
27-
"Programming Language :: Python :: 3.9",
2827
"Programming Language :: Python :: 3.10",
2928
"Programming Language :: Python :: 3.11",
3029
"Programming Language :: Python :: 3.12",
3130
"Programming Language :: Python :: 3.13",
31+
"Programming Language :: Python :: 3.14",
3232
]
3333
dynamic = [ "version" ]
3434
dependencies = [

tests/fixtures.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def create_page(self, title, **kwargs):
7979
return create_page(title=title, **kwargs)
8080

8181
def get_placeholders(self, page):
82-
from cms.models import Placeholder, PageContent
82+
from cms.models import PageContent, Placeholder
8383
page_content = PageContent.admin_manager.latest_content().get(language=self.language, page=self.page)
8484
return Placeholder.objects.get_for_obj(page_content)
8585

tests/grid/test_forms.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
from django.test import TestCase
22

3-
from djangocms_frontend.contrib.grid.forms import (
4-
GridColumnForm,
5-
GridRowForm,
6-
GridContainerForm)
3+
from djangocms_frontend.contrib.grid.forms import GridColumnForm, GridContainerForm, GridRowForm
74

85

96
class GridFormTestCase(TestCase):

tests/requirements/dj60_cms50.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
-r base.txt
2+
3+
Django>=6.0a1,<6.1
4+
django-cms>=5.0,<5.1
5+
djangocms-versioning>=2.4
6+

0 commit comments

Comments
 (0)