refactor: add support for python 3.14

This commit is contained in:
Juro Oravec 2025-10-21 21:25:06 +00:00
parent 28ff1d072a
commit 4c9538f06a
16 changed files with 25 additions and 18 deletions

View file

@ -1,8 +1,8 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: // For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.0/containers/python-3 // https://github.com/microsoft/vscode-dev-containers/tree/v0.245.0/containers/python-3
{ {
// Uncomment to run Python 3.13 or other specific version // Uncomment to run Python 3.14 or other specific version
// "image": "mcr.microsoft.com/devcontainers/python:3.13-bullseye", // "image": "mcr.microsoft.com/devcontainers/python:3.14-bullseye",
// Configure tool-specific properties. // Configure tool-specific properties.
"customizations": { "customizations": {

View file

@ -74,7 +74,7 @@ The package provides custom Django management commands:
### CI/CD Information ### CI/CD Information
- GitHub Actions workflow: `.github/workflows/tests.yml` - GitHub Actions workflow: `.github/workflows/tests.yml`
- Tests run on Python 3.8-3.13 with Django 4.2-5.2 - Tests run on Python 3.8-3.14 with Django 4.2-5.2
- Includes Playwright browser testing (requires `playwright install chromium --with-deps`) - Includes Playwright browser testing (requires `playwright install chromium --with-deps`)
- Documentation building uses mkdocs - Documentation building uses mkdocs
- Pre-commit hooks run ruff - Pre-commit hooks run ruff

View file

@ -22,7 +22,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v6 uses: actions/setup-python@v6
with: with:
python-version: "3.13" python-version: "3.14"
- name: Install dependencies - name: Install dependencies
run: pip install -U PyGithub pyyaml pydantic pydantic-settings httpx run: pip install -U PyGithub pyyaml pydantic pydantic-settings httpx

View file

@ -21,7 +21,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v6 uses: actions/setup-python@v6
with: with:
python-version: "3.13" python-version: "3.14"
cache: "pip" cache: "pip"
- name: Install dependencies - name: Install dependencies

View file

@ -33,7 +33,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v6 uses: actions/setup-python@v6
with: with:
python-version: '3.13' python-version: '3.14'
cache: 'pip' cache: 'pip'
- name: Install dependencies - name: Install dependencies

View file

@ -50,7 +50,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v6 uses: actions/setup-python@v6
with: with:
python-version: "3.13" python-version: "3.14"
cache: 'pip' cache: 'pip'
- name: Install dependencies - name: Install dependencies

View file

@ -20,7 +20,7 @@ jobs:
- name: Setup python - name: Setup python
uses: actions/setup-python@v6 uses: actions/setup-python@v6
with: with:
python-version: '3.13' python-version: '3.14'
- name: Install pypa/build - name: Install pypa/build
run: >- run: >-

View file

@ -13,7 +13,7 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest]
steps: steps:
@ -48,7 +48,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
python-version: ['3.13'] python-version: ['3.14']
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v5
@ -73,7 +73,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
python-version: ['3.13'] python-version: ['4']
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v5

View file

@ -107,6 +107,8 @@
#### Refactor #### Refactor
- Add support for Python 3.14
- Extension authors: The `ExtensionComponentConfig` can be instantiated with `None` instead of a component instance. - Extension authors: The `ExtensionComponentConfig` can be instantiated with `None` instead of a component instance.
This allows to call component-level extension methods outside of the normal rendering lifecycle. This allows to call component-level extension methods outside of the normal rendering lifecycle.

View file

@ -71,7 +71,7 @@
// The Pythons you'd like to test against. If not provided, defaults // The Pythons you'd like to test against. If not provided, defaults
// to the current version of Python used to run `asv`. // to the current version of Python used to run `asv`.
"pythons": [ "pythons": [
"3.13" "3.14"
], ],
// The list of conda channel names to be searched for benchmark // The list of conda channel names to be searched for benchmark

View file

@ -37,7 +37,8 @@ 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 install -s 3.13 pyenv install -s 3.13
pyenv local 3.8 3.9 3.10 3.11 3.12 3.13 pyenv install -s 3.14
pyenv local 3.8 3.9 3.10 3.11 3.12 3.13 3.14
tox -p tox -p
``` ```

View file

@ -8,6 +8,7 @@ Django-components supports all supported combinations versions of [Django](https
| 3.11 | 4.2, 5.1, 5.2 | | 3.11 | 4.2, 5.1, 5.2 |
| 3.12 | 4.2, 5.1, 5.2 | | 3.12 | 4.2, 5.1, 5.2 |
| 3.13 | 5.1, 5.2 | | 3.13 | 5.1, 5.2 |
| 3.14 | 5.2 |
### Operating systems ### Operating systems

View file

@ -27,10 +27,11 @@ classifiers = [
"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", "Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
] ]
dependencies = [ dependencies = [
'Django>=4.2', 'Django>=4.2',
'djc-core-html-parser>=1.0.2', 'djc-core-html-parser>=1.0.3',
'typing-extensions>=4.12.2', 'typing-extensions>=4.12.2',
] ]
license = { text = "MIT" } license = { text = "MIT" }

View file

@ -36,7 +36,7 @@ django==4.2.25
# django-template-partials # django-template-partials
django-template-partials==25.2 django-template-partials==25.2
# via -r requirements-dev.in # via -r requirements-dev.in
djc-core-html-parser==1.0.2 djc-core-html-parser==1.0.3
# via -r requirements-dev.in # via -r requirements-dev.in
exceptiongroup==1.3.0 exceptiongroup==1.3.0
# via pytest # via pytest

View file

@ -42,7 +42,7 @@ defusedxml==0.7.1
# via cairosvg # via cairosvg
django==5.2.5 django==5.2.5
# via -r requirements-docs.in # via -r requirements-docs.in
djc-core-html-parser==1.0.2 djc-core-html-parser==1.0.3
# via -r requirements-docs.in # via -r requirements-docs.in
ghp-import==2.1.0 ghp-import==2.1.0
# via mkdocs # via mkdocs

View file

@ -7,6 +7,7 @@ envlist =
py{38,39}-django42 py{38,39}-django42
py{310,311,312}-django{42,51,52} py{310,311,312}-django{42,51,52}
py{313}-django{51,52} py{313}-django{51,52}
py{314}-django{52}
ruff ruff
coverage coverage
mypy mypy
@ -18,7 +19,8 @@ python =
3.10: py310-django{42,51,52} 3.10: py310-django{42,51,52}
3.11: py311-django{42,51,52} 3.11: py311-django{42,51,52}
3.12: py312-django{42,51,52} 3.12: py312-django{42,51,52}
3.13: py313-django{51,52}, ruff, coverage, mypy 3.13: py313-django{51,52}
3.14: py314-django{52}, ruff, coverage, mypy
isolated_build = true isolated_build = true
@ -29,7 +31,7 @@ deps =
django42: Django>=4.2,<4.3 django42: Django>=4.2,<4.3
django51: Django>=5.1,<5.2 django51: Django>=5.1,<5.2
django52: Django>=5.2,<5.3 django52: Django>=5.2,<5.3
djc-core-html-parser==1.0.2 djc-core-html-parser==1.0.3
pytest pytest
pytest-xdist pytest-xdist
pytest-django pytest-django