Skip to content

build(deps): upgrade to Python 3.14 and Django 5.0#73

Merged
alexsander-souza merged 3 commits intocanonical:resolute_supportfrom
alexsander-souza:pr-03/python314-django50
Mar 31, 2026
Merged

build(deps): upgrade to Python 3.14 and Django 5.0#73
alexsander-souza merged 3 commits intocanonical:resolute_supportfrom
alexsander-souza:pr-03/python314-django50

Conversation

@alexsander-souza
Copy link
Copy Markdown
Contributor

Upgrade the Python runtime target to 3.14 and Django to 5.0; pin all
test framework dependencies to versions compatible with the new runtime;
fix compatibility issues that prevent the test suite from loading.

  • pyproject.toml: requires-python >=3.12; drop 3.9/3.10/3.11 classifiers,
    add 3.14; bump pytest 9, pytest-asyncio 1.3, httpx 0.28, hypothesis 6.151,
    fixtures 4.3, testtools 2.8, pytest-xdist 3.8, pytest-mock 3.15,
    pytest-cov 7; add test.* script entry points; reformat toml structure
  • debian/control: X-Python3-Version >=3.10; django constraint 2:2.2 → 3:5.0;
    add python3-pydantic (>= 2.0)
  • required-packages/base, snapcraft.yaml: add python3-pydantic
  • settings.py: add FORMS_URLFIELD_ASSUME_HTTPS = True (Django 6.0
    forward-compatibility; the default changes in Django 6.0)
  • event.py: Meta.index_together → Meta.indexes (Django 5.0 deprecation)
  • node.py: CheckConstraint(check=...) → CheckConstraint(condition=...)
    (Django 5.0 hard API break)
  • domain.py, space.py, filesystemgroup.py: add early pk-is-None guards on
    related-manager accessors (Django 5.0 raises ValueError for unsaved
    instances where Django 4.x silently returned empty results)
  • maastesting/init.py: guard copy._copy_dispatch access removed in
    Python 3.14; add copy/deepcopy fallbacks on sentinel type
  • utilities/check-imports: str(Path(...)) for sys.path.insert compatibility

Upgrade the Python runtime target to 3.14 and Django to 5.0; pin all
test framework dependencies to versions compatible with the new runtime;
fix compatibility issues that prevent the test suite from loading.

- pyproject.toml: requires-python >=3.12; drop 3.9/3.10/3.11 classifiers,
  add 3.14; bump pytest 9, pytest-asyncio 1.3, httpx 0.28, hypothesis 6.151,
  fixtures 4.3, testtools 2.8, pytest-xdist 3.8, pytest-mock 3.15,
  pytest-cov 7; add test.* script entry points; reformat toml structure
- debian/control: X-Python3-Version >=3.10; django constraint 2:2.2 → 3:5.0;
  add python3-pydantic (>= 2.0)
- required-packages/base, snapcraft.yaml: add python3-pydantic
- settings.py: add FORMS_URLFIELD_ASSUME_HTTPS = True (Django 6.0
  forward-compatibility; the default changes in Django 6.0)
- event.py: Meta.index_together → Meta.indexes (Django 5.0 deprecation)
- node.py: CheckConstraint(check=...) → CheckConstraint(condition=...)
  (Django 5.0 hard API break)
- domain.py, space.py, filesystemgroup.py: add early pk-is-None guards on
  related-manager accessors (Django 5.0 raises ValueError for unsaved
  instances where Django 4.x silently returned empty results)
- maastesting/__init__.py: guard copy._copy_dispatch access removed in
  Python 3.14; add __copy__/__deepcopy__ fallbacks on sentinel type
- utilities/check-imports: str(Path(...)) for sys.path.insert compatibility
@alexsander-souza
Copy link
Copy Markdown
Contributor Author

tests fails as expected (pydantic migration not done yet)

Comment thread src/maasserver/models/filesystemgroup.py Outdated
Comment thread src/maastesting/__init__.py Outdated
Comment thread src/maasserver/models/domain.py
Comment thread src/maasserver/djangosettings/settings.py Outdated
@alexsander-souza alexsander-souza merged commit b656718 into canonical:resolute_support Mar 31, 2026
1 of 2 checks passed
@alexsander-souza alexsander-souza deleted the pr-03/python314-django50 branch March 31, 2026 18:25
alexsander-souza added a commit that referenced this pull request Apr 8, 2026
Upgrade the Python runtime target to 3.14 and Django to 5.0; pin all
test framework dependencies to versions compatible with the new runtime;
fix compatibility issues that prevent the test suite from loading.

- pyproject.toml: requires-python >=3.14; drop 3.9/3.10/3.11
classifiers,
add 3.14; bump pytest 9, pytest-asyncio 1.3, httpx 0.28, hypothesis
6.151,
  fixtures 4.3, testtools 2.8, pytest-xdist 3.8, pytest-mock 3.15,
  pytest-cov 7; add test.* script entry points; reformat toml structure
- debian/control: X-Python3-Version >=3.14; django constraint 2:2.2 →
3:5.0;
  add python3-pydantic (>= 2.0)
- required-packages/base, snapcraft.yaml: add python3-pydantic
- settings.py: add FORMS_URLFIELD_ASSUME_HTTPS = False (Django 6.0
  forward-compatibility; the default changes in Django 6.0)
- event.py: Meta.index_together → Meta.indexes (Django 5.0 deprecation)
- node.py: CheckConstraint(check=...) → CheckConstraint(condition=...)
  (Django 5.0 hard API break)
- domain.py, space.py, filesystemgroup.py: add early pk-is-None guards
on
  related-manager accessors (Django 5.0 raises ValueError for unsaved
  instances where Django 4.x silently returned empty results)
- maastesting/__init__.py: guard copy._copy_dispatch access removed in
  Python 3.14; add __copy__/__deepcopy__  on sentinel type
- utilities/check-imports: str(Path(...)) for sys.path.insert
compatibility
alexsander-souza added a commit that referenced this pull request Apr 8, 2026
Upgrade the Python runtime target to 3.14 and Django to 5.0; pin all
test framework dependencies to versions compatible with the new runtime;
fix compatibility issues that prevent the test suite from loading.

- pyproject.toml: requires-python >=3.14; drop 3.9/3.10/3.11
classifiers,
add 3.14; bump pytest 9, pytest-asyncio 1.3, httpx 0.28, hypothesis
6.151,
  fixtures 4.3, testtools 2.8, pytest-xdist 3.8, pytest-mock 3.15,
  pytest-cov 7; add test.* script entry points; reformat toml structure
- debian/control: X-Python3-Version >=3.14; django constraint 2:2.2 →
3:5.0;
  add python3-pydantic (>= 2.0)
- required-packages/base, snapcraft.yaml: add python3-pydantic
- settings.py: add FORMS_URLFIELD_ASSUME_HTTPS = False (Django 6.0
  forward-compatibility; the default changes in Django 6.0)
- event.py: Meta.index_together → Meta.indexes (Django 5.0 deprecation)
- node.py: CheckConstraint(check=...) → CheckConstraint(condition=...)
  (Django 5.0 hard API break)
- domain.py, space.py, filesystemgroup.py: add early pk-is-None guards
on
  related-manager accessors (Django 5.0 raises ValueError for unsaved
  instances where Django 4.x silently returned empty results)
- maastesting/__init__.py: guard copy._copy_dispatch access removed in
  Python 3.14; add __copy__/__deepcopy__  on sentinel type
- utilities/check-imports: str(Path(...)) for sys.path.insert
compatibility
alexsander-souza added a commit that referenced this pull request Apr 9, 2026
Upgrade the Python runtime target to 3.14 and Django to 5.0; pin all
test framework dependencies to versions compatible with the new runtime;
fix compatibility issues that prevent the test suite from loading.

- pyproject.toml: requires-python >=3.14; drop 3.9/3.10/3.11
classifiers,
add 3.14; bump pytest 9, pytest-asyncio 1.3, httpx 0.28, hypothesis
6.151,
  fixtures 4.3, testtools 2.8, pytest-xdist 3.8, pytest-mock 3.15,
  pytest-cov 7; add test.* script entry points; reformat toml structure
- debian/control: X-Python3-Version >=3.14; django constraint 2:2.2 →
3:5.0;
  add python3-pydantic (>= 2.0)
- required-packages/base, snapcraft.yaml: add python3-pydantic
- settings.py: add FORMS_URLFIELD_ASSUME_HTTPS = False (Django 6.0
  forward-compatibility; the default changes in Django 6.0)
- event.py: Meta.index_together → Meta.indexes (Django 5.0 deprecation)
- node.py: CheckConstraint(check=...) → CheckConstraint(condition=...)
  (Django 5.0 hard API break)
- domain.py, space.py, filesystemgroup.py: add early pk-is-None guards
on
  related-manager accessors (Django 5.0 raises ValueError for unsaved
  instances where Django 4.x silently returned empty results)
- maastesting/__init__.py: guard copy._copy_dispatch access removed in
  Python 3.14; add __copy__/__deepcopy__  on sentinel type
- utilities/check-imports: str(Path(...)) for sys.path.insert
compatibility
alexsander-souza added a commit that referenced this pull request Apr 17, 2026
Upgrade the Python runtime target to 3.14 and Django to 5.0; pin all
test framework dependencies to versions compatible with the new runtime;
fix compatibility issues that prevent the test suite from loading.

- pyproject.toml: requires-python >=3.14; drop 3.9/3.10/3.11
classifiers,
add 3.14; bump pytest 9, pytest-asyncio 1.3, httpx 0.28, hypothesis
6.151,
  fixtures 4.3, testtools 2.8, pytest-xdist 3.8, pytest-mock 3.15,
  pytest-cov 7; add test.* script entry points; reformat toml structure
- debian/control: X-Python3-Version >=3.14; django constraint 2:2.2 →
3:5.0;
  add python3-pydantic (>= 2.0)
- required-packages/base, snapcraft.yaml: add python3-pydantic
- settings.py: add FORMS_URLFIELD_ASSUME_HTTPS = False (Django 6.0
  forward-compatibility; the default changes in Django 6.0)
- event.py: Meta.index_together → Meta.indexes (Django 5.0 deprecation)
- node.py: CheckConstraint(check=...) → CheckConstraint(condition=...)
  (Django 5.0 hard API break)
- domain.py, space.py, filesystemgroup.py: add early pk-is-None guards
on
  related-manager accessors (Django 5.0 raises ValueError for unsaved
  instances where Django 4.x silently returned empty results)
- maastesting/__init__.py: guard copy._copy_dispatch access removed in
  Python 3.14; add __copy__/__deepcopy__  on sentinel type
- utilities/check-imports: str(Path(...)) for sys.path.insert
compatibility
alexsander-souza added a commit that referenced this pull request Apr 17, 2026
Upgrade the Python runtime target to 3.14 and Django to 5.0; pin all
test framework dependencies to versions compatible with the new runtime;
fix compatibility issues that prevent the test suite from loading.

- pyproject.toml: requires-python >=3.14; drop 3.9/3.10/3.11
classifiers,
add 3.14; bump pytest 9, pytest-asyncio 1.3, httpx 0.28, hypothesis
6.151,
  fixtures 4.3, testtools 2.8, pytest-xdist 3.8, pytest-mock 3.15,
  pytest-cov 7; add test.* script entry points; reformat toml structure
- debian/control: X-Python3-Version >=3.14; django constraint 2:2.2 →
3:5.0;
  add python3-pydantic (>= 2.0)
- required-packages/base, snapcraft.yaml: add python3-pydantic
- settings.py: add FORMS_URLFIELD_ASSUME_HTTPS = False (Django 6.0
  forward-compatibility; the default changes in Django 6.0)
- event.py: Meta.index_together → Meta.indexes (Django 5.0 deprecation)
- node.py: CheckConstraint(check=...) → CheckConstraint(condition=...)
  (Django 5.0 hard API break)
- domain.py, space.py, filesystemgroup.py: add early pk-is-None guards
on
  related-manager accessors (Django 5.0 raises ValueError for unsaved
  instances where Django 4.x silently returned empty results)
- maastesting/__init__.py: guard copy._copy_dispatch access removed in
  Python 3.14; add __copy__/__deepcopy__  on sentinel type
- utilities/check-imports: str(Path(...)) for sys.path.insert
compatibility
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants