Skip to content

Commit b640621

Browse files
authored
chore: upgrade Python version to 3.14
2 parents c8b267f + 7b0ea22 commit b640621

24 files changed

Lines changed: 12 additions & 16 deletions

.github/workflows/run-unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
- name: Set up Python
4141
uses: actions/setup-python@v5
4242
with:
43-
python-version: "3.13"
43+
python-version: "3.14"
4444

4545
- name: Install python-ldap OS dependencies
4646
run: |

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# See https://aboutcode.org for more information about AboutCode FOSS projects.
77
#
88

9-
FROM python:3.13-slim
9+
FROM python:3.14-slim
1010

1111
LABEL org.opencontainers.image.source="https://github.com/aboutcode-org/dejacode"
1212
LABEL org.opencontainers.image.description="DejaCode"

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# See https://aboutcode.org for more information about AboutCode FOSS projects.
77
#
88

9-
PYTHON_EXE=python3.13
9+
PYTHON_EXE=python3.14
1010
VENV_LOCATION=.venv
1111
ACTIVATE?=. ${VENV_LOCATION}/bin/activate;
1212
MANAGE=${VENV_LOCATION}/bin/python manage.py

dje/views.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
from collections import defaultdict
1515
from collections import namedtuple
1616
from contextlib import suppress
17-
from functools import partial
18-
from functools import wraps
1917
from urllib.parse import parse_qsl
2018
from urllib.parse import unquote_plus
2119
from urllib.parse import urlparse
@@ -1361,14 +1359,15 @@ def object_copy_get(request, m2m_formset_class):
13611359
ct = ContentType.objects.get_for_model(related_model)
13621360
m2m_initial.append({"ct": ct.id})
13631361

1362+
m2m_formset = m2m_formset_class(initial=m2m_initial, form_kwargs={"user": request.user})
13641363
return render(
13651364
request,
13661365
"admin/object_copy.html",
13671366
{
13681367
"copy_candidates": copy_candidates,
13691368
"update_candidates": update_candidates,
13701369
"form": form,
1371-
"m2m_formset": m2m_formset_class(initial=m2m_initial),
1370+
"m2m_formset": m2m_formset,
13721371
"opts": source_object._meta,
13731372
"preserved_filters": preserved_filters,
13741373
},
@@ -1388,11 +1387,7 @@ def object_copy_view(request):
13881387
This result as an extra step of presenting the target Dataspace list of
13891388
choices.
13901389
"""
1391-
# Declared here as it required in GET and POST cases.
1392-
m2m_formset_class = formset_factory(
1393-
wraps(M2MCopyConfigurationForm)(partial(M2MCopyConfigurationForm, user=request.user)),
1394-
extra=0,
1395-
)
1390+
m2m_formset_class = formset_factory(M2MCopyConfigurationForm, extra=0)
13961391

13971392
# Default entry point of the view, requested using a GET
13981393
# At that stage, we are only looking at what the User requested,
@@ -1421,7 +1416,7 @@ def object_copy_view(request):
14211416
exclude_update = {model_class: config_form.cleaned_data.get("exclude_update")}
14221417

14231418
# Append the m2m copy configuration
1424-
for m2m_form in m2m_formset_class(request.POST):
1419+
for m2m_form in m2m_formset_class(request.POST, form_kwargs={"user": request.user}):
14251420
if not m2m_form.is_valid():
14261421
continue
14271422
m2m_model_class = m2m_form.model_class

docs/doc_maintenance.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ That will create a /dejacode directory in your working directory.
2828
Now you can install the dependencies in a virtualenv::
2929

3030
cd dejacode
31-
python3.13 -m venv .
31+
python3.14 -m venv .
3232
source bin/activate
3333

3434
Now you can build the HTML documents locally::

docs/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ Pre-installation Checklist
179179

180180
Before you install DejaCode, make sure you have the following prerequisites:
181181

182-
#. **Python: versions 3.13** found at https://www.python.org/downloads/
182+
#. **Python: versions 3.14** found at https://www.python.org/downloads/
183183
#. **Git**: most recent release available at https://git-scm.com/
184184
#. **PostgreSQL**: release 16 or later found at https://www.postgresql.org/ or
185185
https://postgresapp.com/ on macOS

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "dejacode"
77
version = "5.6.0"
88
description = "Automate open source license compliance and ensure supply chain integrity"
99
readme = "README.rst"
10-
requires-python = ">=3.13,<3.14"
10+
requires-python = ">=3.14,<3.15"
1111
license = "AGPL-3.0-only"
1212
license-files = ["LICENSE", "NOTICE"]
1313
authors = [
@@ -26,7 +26,7 @@ classifiers = [
2626
"Intended Audience :: Legal Industry",
2727
"Programming Language :: Python",
2828
"Programming Language :: Python :: 3 :: Only",
29-
"Programming Language :: Python :: 3.13",
29+
"Programming Language :: Python :: 3.14",
3030
"Topic :: Utilities"
3131
]
3232
dependencies = [
@@ -185,6 +185,7 @@ where = ["."]
185185

186186
[tool.ruff]
187187
line-length = 100
188+
target-version = "py313"
188189
exclude = [
189190
"migrations",
190191
"bin",

thirdparty/dist/cython-3.2.4-cp313-cp313-macosx_11_0_arm64.whl renamed to thirdparty/dist/cython-3.2.4-cp314-cp314-macosx_11_0_arm64.whl

2.82 MB
Binary file not shown.

thirdparty/dist/cython-3.2.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl renamed to thirdparty/dist/cython-3.2.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

3.22 MB
Binary file not shown.

0 commit comments

Comments
 (0)