Skip to content

Conversation

@sergei-maertens
Copy link
Contributor

This pull request turned out a bit bigger than I anticipated, apologies :)

I noticed on PyPI that django-flags didn't support the newly released 5.2 yet so I figured I could update this and along the way picked up some leftovers from #127

That PR also mentioned that no new release to PyPI is needed, but I'd like to make a case to do a new release, even if there are
no meaningful changes in the Python code - the metadata shown on PyPI now creates the impression that this package is not updated/maintained because it supports end-of-life Python and Django versions, and it creates the impression that Django 4.2+ are not supported at all.

There is more context in the individual commit message for each change :)

Bumped setup-python from v4 to v5.
cfpb#127 replaced black, isort and flake8 with ruff but the contributing
guidelines were still outdated.
The ruff configuration is specified in pyproject.toml and obsoletes
flake8 and accordingly, the flake8 config file.
Ruff 0.11.7 picks up some formatting changes.
There does not appear to be any more wagtail-related code in the
package, so I suspect this has been an copy-paste mistake when switching
to pyproject.toml in cfpb#127.
The package metadata incorrectly stated that Django 2.2 and 3.2 are
still supported, but the dependencies require 4.2+ which conflicts.

Versions older than 4.2 are end-of-life and receive no more (security)
patches.
* Added Python 3.13 to the version support matrix
* Added Django 5.2 to the version support matrix
* Removed end-of-life Django 5.0 from testing matrix

Django 4.2 supports Python 3.8 until 3.12, while 5.x supports 3.10
until 3.13.

This matrix sticks with the existing approach of testing the minimum
and maximum supported versions only.
* Update matrix in Github accordingly
* Update the package metadata to communicate supported versions.
Comment on lines +21 to +23
django4.2: Django~=4.2
django5.1: Django~=5.1
django5.2: Django~=5.2
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These version qualifiers are effectively equivalent - they will select the latest patch release available for the specified range, but it's a bit shorter and easier to maintain.

This should fix the coverage file discovery, resulting in proper
uploads and the coverage combine job at the end not failing.

actions/upload-artifact made a breaking change without major version
bump, see actions/upload-artifact#602.
@sergei-maertens sergei-maertens force-pushed the chore/confirm-django52-support branch from cac0393 to a53fa7b Compare April 26, 2025 11:30
Copy link
Member

@willbarton willbarton left a comment

Choose a reason for hiding this comment

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

Sorry to take so long in looking at this @sergei-maertens! This looks great, thank you!

Once this is merged, I'll do a release and we'll get it out to PyPI.

@willbarton willbarton merged commit ed87919 into cfpb:main May 1, 2025
8 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