Skip to content

Maintenance update: switch to pyproject.toml, format with Black, add back coverage report, Wagtail 7.3 - #101

Merged
Stormheg merged 9 commits into
wagtail-nest:mainfrom
g-nie:maintenance-update
May 3, 2026
Merged

Maintenance update: switch to pyproject.toml, format with Black, add back coverage report, Wagtail 7.3#101
Stormheg merged 9 commits into
wagtail-nest:mainfrom
g-nie:maintenance-update

Conversation

@g-nie

@g-nie g-nie commented May 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Maintenance sweep mirroring #97, refreshed for the current versions.
Thanks @Stormheg for the initial work!


  • Migrate packaging from setup.py / setup.cfg to pyproject.toml (setuptools build backend), bump version to 0.9.0.
  • Add back coverage reporting (Codecov upload in CI, codecov.yml, coverage config in pyproject.toml).
  • Reformat the codebase with Black. New make format target and a Lint job in CI.
  • Update the support matrix:
    • Python: drop 3.8 / 3.9, add 3.13 / 3.14
    • Django: drop 4.2 / 5.0 / 5.1, add 5.2 LTS and 6.0
    • Wagtail: drop 5.2 and the 6.x line, add 7.0, 7.3 LTS and 7.4
  • Pin setuptools<81 in the test extra so fs (transitive via django-bakery) keeps working until PyFilesystem2 stops calling pkg_resources.declare_namespace.

g-nie added 7 commits May 1, 2026 22:59
- Drop Python 3.8 and 3.9 (end of life)
- Add Python 3.13 and 3.14
- Drop Django 4.2, 5.0 and 5.1
- Add Django 5.2 and 6.0
- Drop Wagtail 5.2, 6.0, 6.1, 6.2, 6.3 and 6.4
- Add Wagtail 7.0, 7.3 LTS and 7.4
PyFilesystem2 (fs), pulled in transitively via django-bakery, still calls `pkg_resources.declare_namespace(__name__)` at import time.
setuptools 81 deprecated `pkg_resources` and 82 dropped it from the wheel, so `import fs` explodes with `ModuleNotFoundError: No module named 'pkg_resources'` on fresh Python 3.14 envs.
Pin setuptools<81 until upstream `fs` ships a fix.
@g-nie
g-nie force-pushed the maintenance-update branch from bb07eeb to 6b551c1 Compare May 1, 2026 21:46
@codecov

codecov Bot commented May 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 73.33333% with 8 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@a491649). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/wagtailbakery/views.py 44.4% 1 Missing and 4 partials ⚠️
src/wagtailbakery/api_views.py 78.6% 3 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##             main    #101   +/-   ##
======================================
  Coverage        ?   70.5%           
======================================
  Files           ?       6           
  Lines           ?     210           
  Branches        ?      19           
======================================
  Hits            ?     148           
  Misses          ?      55           
  Partials        ?       7           
Flag Coverage Δ
unittests 70.5% <73.3%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@g-nie
g-nie marked this pull request as ready for review May 1, 2026 21:51
Comment thread pyproject.toml
Comment on lines +49 to +51
# `fs` (transitive via django-bakery) still calls pkg_resources.declare_namespace,
# which setuptools 81+ removed. Pin until PyFilesystem2 ships a fix.
"setuptools<81",

@g-nie g-nie May 1, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just commenting for more visibility. With setuptools >= 81 tox raises ModuleNotFoundError: No module named 'pkg_resources'. I might bring this up with django-bakery.

@g-nie
g-nie force-pushed the maintenance-update branch from 6b551c1 to ed7f912 Compare May 1, 2026 22:13
Comment thread .git-blame-ignore-revs
# See https://git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revs-fileltfilegt

# Reformat with Black
8c2fff90dd68190cc52563459fd95c59b26b919e

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@Stormheg Stormheg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@Stormheg
Stormheg merged commit 89faa21 into wagtail-nest:main May 3, 2026
9 checks passed
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