Skip to content

Commit 873ecb2

Browse files
committed
support Python3.10 over & Django4.2
1 parent 4c7694e commit 873ecb2

File tree

7 files changed

+50
-47
lines changed

7 files changed

+50
-47
lines changed

.github/workflows/tests.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ jobs:
1414
# 並列して実行する各ジョブのPythonバージョン
1515
strategy:
1616
matrix:
17-
python-version: ['3.6', '3.9']
18-
django-version: ['2.2', '3.2']
17+
python-version: ['3.9', '3.10', '3.11', '3.12']
18+
django-version: ['3.2', '4.2']
1919

2020
steps:
2121
# ソースコードをチェックアウト
22-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v4
2323

2424
# ジョブのPython環境を設定
2525
- name: Set up Python ${{ matrix.python-version }}
26-
uses: actions/setup-python@v2
26+
uses: actions/setup-python@v4
2727
with:
2828
python-version: ${{ matrix.python-version }}
2929

.hgignore

-19
This file was deleted.

CHANGES.rst

+12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
ChangeLog
22
=========
33

4+
0.49 (2024-02-XX)
5+
===================
6+
7+
Features:
8+
9+
* Add Support Python3.10~3.12, Django4.2
10+
11+
Incompatible Changes:
12+
13+
* Drop Python3.6 & Django2.2
14+
* Migrate from django-jsonfield to models.JSONField
15+
416
0.48 (2022-04-11)
517
===================
618

README.rst

+3-4
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@
77
Requirements
88
============
99

10-
* Python (3.6, 3.9)
11-
* Celery (4.2, 5.1, 5.2)
12-
* Django (2.2, 3.2)
10+
* Python (3.9, 3.10, 3.11, 3.12)
11+
* Celery (5.2, 5.3)
12+
* Django (3.2, 4.2)
1313
* six
14-
* django-jsonfield (1.0.1)
1514

1615
Links
1716
=================

beproud/django/notify/models.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33

44
from django.contrib.contenttypes.models import ContentType
55
from django.contrib.contenttypes.fields import GenericForeignKey
6-
from django.utils.translation import ugettext_lazy as _
6+
from django.utils.translation import gettext_lazy as _
77
from django.db import models
88

9-
import jsonfield
10-
119
from beproud.django.notify.api import _get_media_map
1210

1311
__all__ = (
@@ -42,7 +40,7 @@ class Notification(models.Model):
4240
notify_type = models.CharField(_('notify type'), max_length=100, db_index=True)
4341
media = models.CharField(_('media'), max_length=100, choices=MediaChoices(), db_index=True)
4442

45-
extra_data = jsonfield.JSONField(_('extra data'), null=True, blank=True)
43+
extra_data = models.JSONField(_('extra data'), null=True, blank=True)
4644

4745
ctime = models.DateTimeField(_('created'), auto_now_add=True, db_index=True)
4846

setup.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def read_file(filename):
2121
long_description=read_file('README.rst'),
2222
long_description_content_type="text/x-rst",
2323
url='https://github.com/beproud/bpnotify/',
24-
python_requires='>=3.6',
24+
python_requires='>=3.9',
2525
classifiers=[
2626
'Development Status :: 3 - Alpha',
2727
'Environment :: Plugins',
@@ -30,21 +30,22 @@ def read_file(filename):
3030
'License :: OSI Approved :: BSD License',
3131
'Programming Language :: Python',
3232
'Programming Language :: Python :: 3',
33-
'Programming Language :: Python :: 3.6',
3433
'Programming Language :: Python :: 3.9',
34+
'Programming Language :: Python :: 3.10',
35+
'Programming Language :: Python :: 3.11',
36+
'Programming Language :: Python :: 3.12',
3537
'Framework :: Django',
36-
'Framework :: Django :: 2.2',
3738
'Framework :: Django :: 3.2',
39+
'Framework :: Django :: 4.2',
3840
'Topic :: Software Development :: Libraries :: Python Modules',
3941
],
4042
include_package_data=True,
4143
packages=find_packages(),
4244
namespace_packages=['beproud', 'beproud.django'],
4345
test_suite='tests.main',
4446
install_requires=[
45-
'Django>=2.2',
46-
'django-jsonfield>=1.0.1',
47-
'Celery>=4.2',
47+
'Django>=3.2',
48+
'Celery>=5.2',
4849
'six',
4950
],
5051
zip_safe=False,

tox.ini

+22-10
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,42 @@
11
# content of: tox.ini , put in same dir as setup.py
22
[tox]
3-
# celery5.2はPython3.7以降に対応しているため、Python3.6のテストではcelery 5.1までを使用する
4-
envlist = py36-django{22,32}-celery{42,51},py39-django{22,32}-celery{51,52}
3+
envlist = py{39,310,311,312}-dj{32,42}-celery{52,53}
4+
skipsdist = True
55

66
[testenv]
77
basepython =
8-
py36: python3.6
98
py39: python3.9
9+
py310: python3.10
10+
py311: python3.11
11+
py312: python3.12
12+
13+
[pytest]
14+
test_paths = tests test_*.py *_test.py
15+
python_paths = tests
16+
django_find_project = false
17+
DJANGO_SETTINGS_MODULE = test_settings
1018

1119
deps =
20+
pytest
21+
pytest-django
22+
pytest-pythonpath
1223
six
13-
django22: Django~=2.2.12
14-
django32: Django~=3.2.1
15-
celery42: celery>=4.2,<4.3
16-
celery51: celery>=5.0,<5.2
24+
dj32: Django>=3.2,<4.0
25+
dj42: Django>=4.2,<5.0
1726
celery52: celery>=5.2,<5.3
27+
celery53: celery>=5.3,<5.4
1828

19-
commands=python setup.py test
29+
commands=pytest {posargs}
2030

2131
# tox-gh-actionsパッケージの設定
2232
[gh-actions]
2333
python =
24-
3.6: py36
2534
3.9: py39
35+
3.10: py310
36+
3.11: py311
37+
3.12: py312
2638

2739
[gh-actions:env]
2840
DJANGO =
29-
2.2: django22
3041
3.2: django32
42+
4.2: django42

0 commit comments

Comments
 (0)