chore: update supported versions - add Python 3.13, Django 5.1 (#809)

* chore: update supported versions

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Juro Oravec 2024-12-02 15:32:38 +01:00 committed by GitHub
parent a3710fe8cf
commit 230ceee537
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 21 additions and 14 deletions

View file

@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
strategy: strategy:
matrix: matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@ -37,7 +37,7 @@ jobs:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
strategy: strategy:
matrix: matrix:
python-version: ['3.12'] python-version: ['3.13']
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4

View file

@ -16,6 +16,7 @@ classifiers = [
"Framework :: Django", "Framework :: Django",
"Framework :: Django :: 4.2", "Framework :: Django :: 4.2",
"Framework :: Django :: 5.0", "Framework :: Django :: 5.0",
"Framework :: Django :: 5.1",
"Operating System :: OS Independent", "Operating System :: OS Independent",
"Programming Language :: Python", "Programming Language :: Python",
"Programming Language :: Python :: 3", "Programming Language :: Python :: 3",
@ -24,6 +25,7 @@ classifiers = [
"Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
] ]
dependencies = [ dependencies = [
'Django>=4.2', 'Django>=4.2',

View file

@ -13,7 +13,7 @@ def cut_by_content(content: str, cut_from: str, cut_to: str):
def keys_from_content(content: str): def keys_from_content(content: str):
return re.findall(r"<td>(.*?)</td>", content) return re.findall(r"<td><p>(.*?)</p></td>", content)
def get_python_supported_version(url: str) -> list[Version]: def get_python_supported_version(url: str) -> list[Version]:
@ -49,7 +49,7 @@ def get_django_to_pythoon_versions(url: str):
'<span id="what-python-version-can-i-use-with-django">', '<span id="what-python-version-can-i-use-with-django">',
"</table>", "</table>",
) )
content = cut_by_content(content, '<tbody valign="top">', "</tbody>") content = cut_by_content(content, "<tbody>", "</tbody>")
versions = keys_from_content(content) versions = keys_from_content(content)
version_dict = dict(zip(versions[::2], versions[1::2])) version_dict = dict(zip(versions[::2], versions[1::2]))
@ -264,13 +264,13 @@ def main():
print() print()
print() print()
print("Add this to the middle of README.md:\n") print("Add this to src/docs/overview/compatibility.md:\n")
readme = build_readme(python_to_django) readme = build_readme(python_to_django)
print(readme) print(readme)
print() print()
print() print()
print("And this to the end of README.md:\n") print("Add this to src/docs/overview/development.md:\n")
pyenv = build_pyenv(python_to_django) pyenv = build_pyenv(python_to_django)
print(pyenv) print(pyenv)
print() print()

View file

@ -10,6 +10,7 @@ Django-components supports all supported combinations versions of [Django](https
| -------------- | -------------- | | -------------- | -------------- |
| 3.8 | 4.2 | | 3.8 | 4.2 |
| 3.9 | 4.2 | | 3.9 | 4.2 |
| 3.10 | 4.2, 5.0 | | 3.10 | 4.2, 5.0, 5.1 |
| 3.11 | 4.2, 5.0 | | 3.11 | 4.2, 5.0, 5.1 |
| 3.12 | 4.2, 5.0 | | 3.12 | 4.2, 5.0, 5.1 |
| 3.13 | 5.1 |

View file

@ -31,7 +31,8 @@ pyenv install -s 3.9
pyenv install -s 3.10 pyenv install -s 3.10
pyenv install -s 3.11 pyenv install -s 3.11
pyenv install -s 3.12 pyenv install -s 3.12
pyenv local 3.8 3.9 3.10 3.11 3.12 pyenv install -s 3.13
pyenv local 3.8 3.9 3.10 3.11 3.12 3.13
tox -p tox -p
``` ```

11
tox.ini
View file

@ -5,7 +5,8 @@
[tox] [tox]
envlist = envlist =
py{38,39}-django42 py{38,39}-django42
py{310,311,312}-django{42,50} py{310,311,312}-django{42,50,51}
py{313}-django{51}
flake8 flake8
isort isort
coverage coverage
@ -16,9 +17,10 @@ envlist =
python = python =
3.8: py38-django42 3.8: py38-django42
3.9: py39-django42 3.9: py39-django42
3.10: py310-django{42,50} 3.10: py310-django{42,50,51}
3.11: py311-django{42,50} 3.11: py311-django{42,50,51}
3.12: py312-django{42,50}, flake8, isort, coverage, mypy, black 3.12: py312-django{42,50,51}
3.13: py313-django{51}, flake8, isort, coverage, mypy, black
isolated_build = true isolated_build = true
@ -28,6 +30,7 @@ wheel_build_env = .pkg
deps = deps =
django42: Django>=4.2,<4.3 django42: Django>=4.2,<4.3
django50: Django>=5.0,<5.1 django50: Django>=5.0,<5.1
django51: Django>=5.1,<5.2
pytest pytest
pytest-xdist pytest-xdist
# NOTE: Keep playwright is sync with the version in requirements-ci.txt # NOTE: Keep playwright is sync with the version in requirements-ci.txt