Commit a0db3de
Modernize Python and Django support: Drop Python 3.9, add Python 3.14 and Django 6.0 (#489)
* Drop Python 3.9 support, add Python 3.14 and Django 6.0 support
- Update pyproject.toml: requires-python >= 3.10, add classifiers for Python 3.10-3.14 and Django 6.0
- Update tox.ini: remove py39, add py310, py312, py313, py314
- Update GitHub Actions workflows: add Python 3.14 and Django 6.0 test configurations
- Add dj60_cms50.txt requirements file for Django 6.0 testing
- Add exclusions to prevent Python 3.14 from running against older Django versions
Amp-Thread-ID: https://ampcode.com/threads/T-cdf01cfa-6da3-4851-9a9b-0c7a2c181c37
Co-authored-by: Amp <[email protected]>
* Modernize type annotations for Python 3.10+
- Replace typing.Union[X, Y] with X | Y syntax (PEP 604)
- Replace typing.Optional[X] with X | None syntax
- Remove unnecessary typing imports where Optional/Union were the only imports
- Updated files: admin.py, emails.py, conditions.py, helpers.py, cms_toolbars.py, indicators.py, datastructures.py
Amp-Thread-ID: https://ampcode.com/threads/T-cdf01cfa-6da3-4851-9a9b-0c7a2c181c37
Co-authored-by: Amp <[email protected]>
* Remove unused typing imports after modernization
- Removed unused typing imports from admin.py, conditions.py, emails.py, and indicators.py
- These imports became unused after migrating to PEP 604 union syntax
* Update AGENTS.md with new Python and Django version requirements
- Updated Python version requirement from 3.9+ to 3.10+
- Added Django 6.0 to supported versions
- Updated test matrix to reflect Python 3.10-3.14
- Added note about PEP 604 union syntax in type hints
* Use uv for package management in CI workflows
- Replace pip with uv for faster dependency installation
- Add astral-sh/setup-uv@v5 action to all workflows
- Use 'uv pip install --system' for package installation
- Use 'uvx ruff' for linting workflow
- Updated all test jobs: sqlite, postgres, mysql, cms-develop, django-main
Amp-Thread-ID: https://ampcode.com/threads/T-cdf01cfa-6da3-4851-9a9b-0c7a2c181c37
Co-authored-by: Amp <[email protected]>
* Update AGENTS.md to reflect usage of uv [skip ci]
- Add note about using uv for faster dependency installation
- Update testing command to use 'uv pip install'
- Document uv as the package manager in Code Style section
* Fix type hint for replace_admin_for_models pairs parameter
- Change from 'tuple[type[models.Model], type]' to 'Iterable[tuple[type[models.Model], type]]'
- The function expects multiple pairs, not a single tuple
- Also fixed docstring parameter name from 'models' to 'pairs'
* Fix line length in replace_admin_for_models signature
- Break function signature across multiple lines to comply with 120 char limit
- Fixes ruff E501 error
* Fix test matrix: Django 6 now only runs with Python 3.12+
Amp-Thread-ID: https://ampcode.com/threads/T-6e53f75e-8813-4ef9-bcd2-61db1b0e0cc6
Co-authored-by: Amp <[email protected]>
* Update Django requirement to >=6.0a1,<6.1
Amp-Thread-ID: https://ampcode.com/threads/T-7c01575b-a01e-4212-bfb3-f4981bd1583b
Co-authored-by: Amp <[email protected]>
* Update Django requirement to >=6.0a1,<6.1
Amp-Thread-ID: https://ampcode.com/threads/T-1ae0efd4-afab-468c-b53b-30d0573c635e
Co-authored-by: Amp <[email protected]>
* fix: issues with matrix
* fix: wrong Django version in pyproject.toml
* fix: mysqlclient errors with python 3.14
* replace: django-fsm with django-fsm-2 that comes with django 6.0 support
* fix: remove version constraints and also add a note in the readme
* fix: links
---------
Co-authored-by: Amp <[email protected]>
Co-authored-by: Fabian Braun <[email protected]>1 parent 27abc23 commit a0db3de
File tree
16 files changed
+328
-64
lines changed- .github/workflows
- djangocms_versioning
- tests/requirements
16 files changed
+328
-64
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
15 | 19 | | |
16 | 20 | | |
17 | | - | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
24 | 35 | | |
25 | | - | |
| 36 | + | |
26 | 37 | | |
27 | | - | |
| 38 | + | |
28 | 39 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 40 | + | |
34 | 41 | | |
35 | | - | |
| 42 | + | |
36 | 43 | | |
37 | 44 | | |
38 | 45 | | |
39 | 46 | | |
40 | | - | |
41 | 47 | | |
42 | 48 | | |
43 | 49 | | |
| 50 | + | |
| 51 | + | |
44 | 52 | | |
45 | 53 | | |
46 | | - | |
47 | | - | |
48 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
49 | 62 | | |
50 | 63 | | |
51 | 64 | | |
| |||
58 | 71 | | |
59 | 72 | | |
60 | 73 | | |
61 | | - | |
| 74 | + | |
62 | 75 | | |
63 | 76 | | |
| 77 | + | |
| 78 | + | |
64 | 79 | | |
65 | 80 | | |
66 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
67 | 104 | | |
68 | 105 | | |
69 | 106 | | |
| |||
80 | 117 | | |
81 | 118 | | |
82 | 119 | | |
83 | | - | |
84 | 120 | | |
85 | 121 | | |
86 | 122 | | |
| 123 | + | |
| 124 | + | |
87 | 125 | | |
88 | 126 | | |
89 | | - | |
90 | | - | |
91 | | - | |
| 127 | + | |
| 128 | + | |
92 | 129 | | |
93 | 130 | | |
94 | 131 | | |
| |||
103 | 140 | | |
104 | 141 | | |
105 | 142 | | |
106 | | - | |
| 143 | + | |
107 | 144 | | |
108 | 145 | | |
| 146 | + | |
| 147 | + | |
109 | 148 | | |
110 | 149 | | |
111 | | - | |
| 150 | + | |
| 151 | + | |
112 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
113 | 163 | | |
114 | | - | |
| 164 | + | |
115 | 165 | | |
116 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
117 | 173 | | |
118 | 174 | | |
119 | 175 | | |
| |||
128 | 184 | | |
129 | 185 | | |
130 | 186 | | |
131 | | - | |
132 | 187 | | |
133 | 188 | | |
134 | 189 | | |
| 190 | + | |
| 191 | + | |
135 | 192 | | |
136 | 193 | | |
137 | | - | |
138 | | - | |
139 | | - | |
| 194 | + | |
| 195 | + | |
140 | 196 | | |
141 | 197 | | |
142 | 198 | | |
| |||
163 | 219 | | |
164 | 220 | | |
165 | 221 | | |
166 | | - | |
167 | 222 | | |
168 | 223 | | |
169 | 224 | | |
| 225 | + | |
| 226 | + | |
170 | 227 | | |
171 | 228 | | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
177 | 233 | | |
178 | 234 | | |
179 | 235 | | |
| |||
186 | 242 | | |
187 | 243 | | |
188 | 244 | | |
189 | | - | |
| 245 | + | |
190 | 246 | | |
191 | 247 | | |
192 | 248 | | |
193 | 249 | | |
194 | 250 | | |
195 | 251 | | |
196 | | - | |
| 252 | + | |
197 | 253 | | |
198 | 254 | | |
199 | 255 | | |
200 | 256 | | |
201 | | - | |
202 | 257 | | |
203 | 258 | | |
204 | 259 | | |
| 260 | + | |
| 261 | + | |
205 | 262 | | |
206 | 263 | | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
212 | 268 | | |
213 | 269 | | |
214 | 270 | | |
| |||
0 commit comments