Skip to content

Update CI: Add Django 5.2, drop Python 3.7#211

Closed
mahdirahimi1999 wants to merge 10 commits intojazzband:masterfrom
mahdirahimi1999:enhancement/ci-django-5.2
Closed

Update CI: Add Django 5.2, drop Python 3.7#211
mahdirahimi1999 wants to merge 10 commits intojazzband:masterfrom
mahdirahimi1999:enhancement/ci-django-5.2

Conversation

@mahdirahimi1999
Copy link
Member

@mahdirahimi1999 mahdirahimi1999 commented Jun 12, 2025

What’s new

  • Django 5.2 support

    • Added to GitHub Actions test matrix
    • Added to setup.py classifiers
    • Added to tox.ini environments
  • CI improvements

    • Updated GitHub Actions versions:
      • checkout → v4
      • setup-python → v5
      • cache → v4
      • codecov → v4
    • Replaced deprecated set-output with GITHUB_OUTPUT
    • Dropped Python 3.7 support from test matrix and tox.ini
    • Updated linting tools:
      • black>=24.1.1
      • isort>=5.13.2
      • Removed -t py38 from black (now inferred from code)
  • Test stability

    • Improved Vimeo thumbnail URL test:
      • Now compares only scheme, domain, and path (ignores query params)

Why remove Python 3.7?

  • Python 3.7 reached end-of-life on June 27, 2023
  • GitHub Actions no longer supports Python 3.7 on Ubuntu 24.04
  • Attempting to use 3.7 in CI results in environment resolution errors
  • Django 3.2 (LTS) is still tested with Python 3.8+, so there’s no compatibility loss

Current test matrix

  • Python: 3.8, 3.9, 3.10, 3.11, 3.12
  • Django: 3.2, 4.1, 4.2, 5.0, 5.1, 5.2

This ensures full coverage of supported versions with modern tooling and reliable tests.

@codecov
Copy link

codecov bot commented Jun 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.10%. Comparing base (a15a446) to head (d18dd99).
Report is 10 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #211      +/-   ##
==========================================
+ Coverage   98.95%   99.10%   +0.15%     
==========================================
  Files          16       16              
  Lines         671      673       +2     
  Branches       67       39      -28     
==========================================
+ Hits          664      667       +3     
  Misses          4        4              
+ Partials        3        2       -1     

☔ 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.

@mahdirahimi1999 mahdirahimi1999 changed the title Enhancement/ci django 5.2 Add Django 5.2 support, update CI workflows, and drop Python 3.7 Jun 12, 2025
@mahdirahimi1999 mahdirahimi1999 changed the title Add Django 5.2 support, update CI workflows, and drop Python 3.7 Update CI: Add Django 5.2, drop Python 3.7 Jun 12, 2025
@mahdirahimi1999
Copy link
Member Author

Could you please check this pr? @aleksihakli

@jemmix
Copy link

jemmix commented Jun 23, 2025

The code near if sys.version_info >= (3, 8): can be simplified now because the condition is now always true. Incidentally, it trips up the coverage checker because the other branch is never being executed.

Other than that, 'django qa' tests are failing because of some formatting inconsistent with the code style.

Thank you for your contribution. I'm not a maintainer here but we're eager to have a new version released at some point to fix some warnings cluttering our logs.

@mahdirahimi1999
Copy link
Member Author

The code near if sys.version_info >= (3, 8): can be simplified now because the condition is now always true. Incidentally, it trips up the coverage checker because the other branch is never being executed.

Other than that, 'django qa' tests are failing because of some formatting inconsistent with the code style.

Thank you for your contribution. I'm not a maintainer here but we're eager to have a new version released at some point to fix some warnings cluttering our logs.

Thanks for the note! I've applied the changes, and all tests are passing successfully.

@jemmix
Copy link

jemmix commented Jun 24, 2025

Thanks for the note! I've applied the changes, and all tests are passing successfully.

Thank you! The CI is now stuck waiting for the 'Python 3.7, Django 3.2' combo and I can only assume that this is because of repository settings we can't see. We're going to need to wait for a maintainer to look into this.

@mahdirahimi1999
Copy link
Member Author

Thanks for the note! I've applied the changes, and all tests are passing successfully.

Thank you! The CI is now stuck waiting for the 'Python 3.7, Django 3.2' combo and I can only assume that this is because of repository settings we can't see. We're going to need to wait for a maintainer to look into this.

The reason the build (Python 3.7, Django 3.2) check is stuck as pending is because it’s still listed as a required status check in the repository’s branch protection rules, but the workflow no longer runs this job (since Python 3.7 support was removed).

Only a maintainer can update the branch protection rules to remove this check. Once that’s done, the pending status will disappear and the PR can be merged.

…o backend tests

This test was not required and has been removed to clean up the test suite.
@mahdirahimi1999 mahdirahimi1999 closed this by deleting the head repository Jun 27, 2025
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

Comments