Skip to content

Commit

Permalink
Update Django and Python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalpepe authored Apr 2, 2024
1 parent 5f7fa59 commit 1f14b19
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 40 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -28,13 +28,13 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
django-version: ['lts', 'latest']
exclude:
- python-version: '3.7'
- python-version: '3.8'
django-version: 'latest'
- python-version: '3.9'
django-version: 'latest'
- python-version: '3.11'
django-version: 'lts'
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -48,25 +48,25 @@ jobs:
python -m pip install coverage[toml]
- name: Install Django LTS
if: ${{ matrix.django-version == 'lts' }}
run: python -m pip install 'Django~=3.2.9'
run: python -m pip install 'Django~=4.2.8'
- name: Install Django latest
if: ${{ matrix.django-version == 'latest' }}
run: python -m pip install 'Django==4.1.*'
run: python -m pip install 'Django==5.0.*'
- name: Run Django tests
run: |
python -m pip install -e .
coverage run manage.py test
- name: Display coverage summary
run: coverage report
docs:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
12 changes: 6 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ any time.
Supported versions of Python and Django
=======================================

======= ====================
======= ==========================
Django Python
======= ====================
3.2 LTS 3.7, 3.8, 3.9, 3.10
------- --------------------
4.1 3.8, 3.9, 3.10, 3.11
======= ====================
======= ==========================
4.2 LTS 3.8, 3.9, 3.10, 3.11, 3.12
------- --------------------------
5.0 3.10, 3.11, 3.12
======= ==========================


Documentation
Expand Down
12 changes: 6 additions & 6 deletions docs/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ Python and Django compatibility

This project requires the following:

======= ====================
======= ==========================
Django Python
======= ====================
3.2 LTS 3.7, 3.8, 3.9, 3.10
------- --------------------
4.1 3.8, 3.9, 3.10, 3.11
======= ====================
======= ==========================
4.2 LTS 3.8, 3.9, 3.10, 3.11, 3.12
------- --------------------------
5.0 3.10, 3.11, 3.12
======= ==========================

We highly recommend the latest release of each series for both Python and
Django.
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ MiniPages documentation

MiniPages is a reusable Django application for managing simple web pages.

:Home: https://github.com/pascalpepe/django-minipages#readme
:Home: https://github.com/pascalpepe/django-minipages
:Documentation: https://github.com/pascalpepe/django-minipages/tree/main/docs
:Source code: https://github.com/pascalpepe/django-minipages
:Issue tracker: https://github.com/pascalpepe/django-minipages/issues
Expand Down
4 changes: 2 additions & 2 deletions docs/releases/0.1.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ Tests

- Set up the project testing suite with:

* `tox <https://tox.readthedocs.io>`_ for automated testing,
* tox for automated testing,
* `Coverage.py <https://coverage.readthedocs.io>`_ for measuring code coverage,
* `Flake8 <https://flake8.readthedocs.io>`_ for linting,
* `GitLab CI/CD <https://docs.gitlab.com/ee/ci/README.html>`_ for continuous integration.
* GitLab CI/CD for continuous integration.

- Added tox environments and GitLab CI jobs to support the following versions of Python and Django:

Expand Down
12 changes: 6 additions & 6 deletions docs/releases/0.2.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ Tests

- Updated support to the following versions of Python and Django:

======= ====================
======= ==========================
Django Python
======= ====================
3.2 LTS 3.7, 3.8, 3.9, 3.10
------- --------------------
4.1 3.8, 3.9, 3.10, 3.11
======= ====================
======= ==========================
4.2 LTS 3.8, 3.9, 3.10, 3.11, 3.12
------- --------------------------
5.0 3.10, 3.11, 3.12
======= ==========================

- Replaced tox usage with GitHub Actions.
- Set up GitHub Actions in order to:
Expand Down
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "hatchling.build"
name = "django-minipages"
description = "Django application for managing simple web pages."
readme = "README.rst"
requires-python = ">=3.7"
requires-python = ">=3.8"
license = { text = "Apache-2.0" }
keywords = ["django", "pages"]
authors = [
Expand All @@ -16,25 +16,25 @@ classifiers = [
"Development Status :: 1 - Planning",
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Internet",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
]
dependencies = [
"django>=3.2",
"django>=4.2",
]
dynamic = ["version"]

Expand Down
4 changes: 2 additions & 2 deletions tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"""Tests settings for MiniPages.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
https://docs.djangoproject.com/en/4.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
https://docs.djangoproject.com/en/4.2/ref/settings/
"""

from pathlib import Path
Expand Down
6 changes: 3 additions & 3 deletions tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ def setUpTestData(cls):

def test_title_max_length(self):
max_length = self.page._meta.get_field("title").max_length
self.assertEquals(max_length, 255)
self.assertEqual(max_length, 255)

def test_object_string_representation(self):
self.assertEquals(str(self.page), self.page.title)
self.assertEqual(str(self.page), self.page.title)

def test_get_absolute_url(self):
self.assertEquals(self.page.get_absolute_url(), "/pages/1/")
self.assertEqual(self.page.get_absolute_url(), "/pages/1/")

0 comments on commit 1f14b19

Please sign in to comment.