Skip to content

Upgrade django-argcache compatibility baseline to Django 4.2 and migrate tests to GitHub Actions - #7

Merged
willgearty merged 6 commits into
django4from
copilot/upgrade-django-to-4-x
May 13, 2026
Merged

willgearty merged 6 commits into
django4from
copilot/upgrade-django-to-4-x

Conversation

Copilot AI commented May 13, 2026 •

Copy link
Copy Markdown

This PR moves the project from Django 3.2-era compatibility to a Django 4.x-supported baseline (targeting 4.2), including removal of API usage that breaks on Django 4, alignment of package metadata, and migration of test CI to GitHub Actions.

  • Django 4 compatibility fixes

    • Removed deprecated providing_args from custom signal construction in src/signals.py to match Django 4 signal API.
  • Dependency and support baseline update

    • Updated setup.py requirement from django>=3.0 to django>=4.2,<5.0.
    • Updated setup.py classifiers to reflect current support:
      • Added Framework :: Django :: 4.2
      • Added Python classifiers for 3.8, 3.9, 3.10, 3.11, and 3.12
      • Fixed AGPL classifier typo to License :: OSI Approved :: GNU Affero General Public License v3
  • CI migration

    • Dropped legacy .travis.yml.
    • Added .github/workflows/tests.yml to run tests on push/pull_request.
    • Runs matrix jobs for Python 3.8–3.12 with Django 4.2.
    • Uses least-privilege workflow permissions (contents: read).
    • Executes tests via python runtests.py.
  • Django 4 cleanup for project config/docs

    • Added DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' in test settings to avoid Django 4 default PK warnings and preserve current model behavior.
    • Updated README URLconf example to modern Django URL APIs (re_path / django.urls import).
# before
from django.dispatch import Signal
cache_deleted = Signal(providing_args=['key_set'])

# after
from django.dispatch import Signal
cache_deleted = Signal()

Copilot AI linked an issue May 13, 2026 that may be closed by this pull request
6 tasks
Copilot AI changed the title [WIP] Upgrade Django to 4.x and address deprecated features Upgrade django-argcache compatibility baseline to Django 4.2 May 13, 2026
Copilot AI requested a review from willgearty May 13, 2026 19:04
@willgearty
willgearty marked this pull request as ready for review May 13, 2026 19:48
@willgearty

Copy link
Copy Markdown
Member

@copilot also add a GitHub Action workflow to run the tests. Something like this:

name: Tests

on:
  push:
    branches: [main, master]
  pull_request:

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
        django-version: ['4.2']
    name: Python ${{ matrix.python-version }} / Django ${{ matrix.django-version }}
    steps:
      - uses: actions/checkout@v4
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v5
        with:
          python-version: ${{ matrix.python-version }}
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install "django==${{ matrix.django-version }}.*"
          pip install .
      - name: Run tests
        run: ./runtests.py

Copilot AI commented May 13, 2026

Copy link
Copy Markdown
Author

@copilot also add a GitHub Action workflow to run the tests. Something like this:

...

Added the workflow at .github/workflows/tests.yml with the requested Python (3.8–3.12) and Django 4.2 matrix, plus least-privilege token permissions and python runtests.py test execution. Addressed in commit 16ab579.

Copilot AI changed the title Upgrade django-argcache compatibility baseline to Django 4.2 Upgrade django-argcache compatibility baseline to Django 4.2 and add GitHub Actions tests May 13, 2026
@willgearty

Copy link
Copy Markdown
Member

@copilot

  1. Drop .travis.yml

  2. Tidy setup.py classifiers:

    • Add 'Framework :: Django :: 4.2'
    • Add 'Programming Language :: Python :: 3.X' entries matching the test matrix
    • Fix the pre-existing typo on the AGPL line: 'License :: OSI Approved :: License :: OSI Approved :: GNU Affero General Public License v3' should be 'License :: OSI Approved :: GNU Affero General Public License v3'

Copilot AI commented May 13, 2026

Copy link
Copy Markdown
Author

@copilot

  1. Drop .travis.yml
    ...

Done in 505ab2d: removed .travis.yml, added Framework :: Django :: 4.2, added Python classifiers for 3.8–3.12, and fixed the AGPL classifier string typo in setup.py.

Copilot AI changed the title Upgrade django-argcache compatibility baseline to Django 4.2 and add GitHub Actions tests Upgrade django-argcache compatibility baseline to Django 4.2 and migrate tests to GitHub Actions May 13, 2026
@willgearty
willgearty merged commit f73532c into django4 May 13, 2026
5 checks passed
@willgearty
willgearty deleted the copilot/upgrade-django-to-4-x branch May 13, 2026 20:30
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.

Upgrade Django to 4.x

2 participants