Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update supported Python and Django versions #449

Merged
merged 1 commit into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,23 @@ jobs:
fail-fast: false
max-parallel: 5
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
django-version: ['3.2', '4.0', '4.1', 'main']
python-version: ['3.8', '3.11', '3.12']
django-version: ['3.2', '4.2', '5.0', 'main']
exclude:
- python-version: 3.7
django-version: 4.0
- python-version: 3.7
django-version: 4.1
- python-version: 3.7
- python-version: 3.8
django-version: 5.0
- python-version: 3.8
django-version: main
- python-version: 3.11
django-version: 3.2
- python-version: 3.12
django-version: 3.2

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -54,6 +56,6 @@ jobs:
DJANGO: ${{ matrix.django-version }}

- name: Upload coverage
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
name: Python ${{ matrix.python-version }}
4 changes: 3 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ This document describes changes between each past release.
Unreleased
==========

- Drop support for Django 2.2.
- Drop support for Django 2.2, 4.0, and 4.1.
- Add support for Django 4.2 and 5.0.
- Drop support for Python 3.7 and add support for Python 3.11 and 3.12.

3.6.1 (2023-03-20)
==================
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ In your code:
Releases
========

Latest release is 3.6.1. It supports Python 3.7+ and Django 3.2 to 4.1.
Latest release is 3.6.1. It supports Python 3.8+ and Django 3.2 to 5.0.

Using TinyMCE 5.10.7.

Expand Down
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,18 @@ def read_file(filename):
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"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 :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Libraries :: Python Modules",
],
Expand Down
4 changes: 2 additions & 2 deletions tests/test_compressor.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test_cache_data_etag(self, cache_mock):
self.assertEqual("0", response["Content-Length"])
self.assertEqual("text/javascript", response["Content-Type"])
self.assertEqual(b"", response.content)
self.assertTrue(cache_mock.called_once)
cache_mock.assert_called_once()

@patch("tinymce.compressor.cache.get")
def test_cache_data_last_modified(self, cache_mock):
Expand All @@ -46,7 +46,7 @@ def test_cache_data_last_modified(self, cache_mock):
self.assertEqual("0", response["Content-Length"])
self.assertEqual("text/javascript", response["Content-Type"])
self.assertEqual(b"", response.content)
self.assertTrue(cache_mock.called_once)
cache_mock.assert_called_once()

def test_compressor(self):
request = self.factory.get(
Expand Down
2 changes: 1 addition & 1 deletion tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def test_compressor(self, gzip_mock):
self.assertEqual(200, response.status_code)
self.assertEqual("text/javascript", response["Content-Type"])
self.assertEqual(response_ok.content, response.content)
self.assertTrue(gzip_mock.called_once)
gzip_mock.assert_called_once()

def test_render_to_image_list(self):
response = render_to_image_list([("test", "test.jpg")])
Expand Down
16 changes: 10 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
[tox]
envlist =
py{37,38,39,310}-dj32
py{38,39,310}-dj{40,41,main}
py{38,39,310}-dj32
py{38,39,310,311,312}-dj42
py{310,311,312}-dj{50,main}
flake8

[testenv]
deps =
dj32: Django>=3.2,<4.0
dj40: Django>=4.0,<4.1
dj41: Django>=4.1,<4.2
dj42: Django>=4.2,<5.0
dj50: Django>=5.0,<5.1
djmain: https://github.com/django/django/archive/main.tar.gz
coverage
pyenchant
Expand All @@ -32,14 +35,15 @@ commands =

[gh-actions]
python =
3.7: py37, flake8
3.8: py38
3.8: py38, flake8
3.9: py39
3.10: py310
3.11: py311
3.12: py312

[gh-actions:env]
DJANGO =
3.2: dj32
4.0: dj40
4.1: dj41
4.2: dj42
5.0: dj50
main: djmain
Loading