Skip to content

Commit

Permalink
support Python3.10 over & Django4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
kashewnuts committed Feb 2, 2024
1 parent cea10bd commit 5a40420
Show file tree
Hide file tree
Showing 14 changed files with 549 additions and 623 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Expand Up @@ -13,16 +13,16 @@ jobs:
# 並列して実行する各ジョブのPythonバージョン
strategy:
matrix:
python-version: ['3.9']
django-version: ['2.2']
python-version: ['3.9', '3.10', '3.11', '3.12']
django-version: ['3.2', '4.2']

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

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

Expand Down
23 changes: 0 additions & 23 deletions .hgignore

This file was deleted.

1 change: 0 additions & 1 deletion MANIFEST.in
@@ -1,2 +1 @@
recursive-include beproud/django/mailer/templates *
README.md
6 changes: 3 additions & 3 deletions README.rst
Expand Up @@ -5,9 +5,9 @@
Requirements
============

* Python (3.9)
* Celery (5.x)
* Django (2.2)
* Python (3.9, 3.10, 3.11, 3.12)
* Celery (5.2, 5.3)
* Django (3.2, 4.2)

Links
=================
Expand Down
4 changes: 2 additions & 2 deletions beproud/django/mailer/signals.py
@@ -1,5 +1,5 @@
#:coding=utf-8:
from django.dispatch import Signal

mail_pre_send = Signal(providing_args=["message"])
mail_post_send = Signal(providing_args=["message"])
mail_pre_send = Signal()
mail_post_send = Signal()
38 changes: 38 additions & 0 deletions pyproject.toml
@@ -0,0 +1,38 @@
[build-system]
requires = ["setuptools>=61.0.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "bpmailer"
version = "1.3"
authors = [
{ name="BeProud Inc.", email="project@beproud.jp" },
]
description = "Mailing utility for Django"
readme = "README.rst"
requires-python = ">=3.9"
keywords=["django", "mail"]
classifiers = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.2",
"Intended Audience :: Developers",
"Environment :: Plugins",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = ["Django>=3.2", "six", "Celery"]

[project.urls]
Homepage = "https://github.com/beproud/bpmailer/"

[tool.setuptools.packages.find]
where = ["."]
# include = ["beproud", "beproud.django", "beproud.django.mailer"]
4 changes: 2 additions & 2 deletions release_checklist.rst
Expand Up @@ -7,14 +7,14 @@
* GitHub, PyPI, TestPyPIのアカウントにbpmailerの編集権限を設定
* パッケージのビルドに使用するパッケージをインストール

* ``pip install wheel twine``
* ``pip install wheel twine build``


手順
--------------------
1. 次バージョンのパッケージをビルド

* ``python setup.py sdist bdist_wheel``
* ``python -m build .``

2. twineのコマンドを実行して、エラーが出ないことを確認

Expand Down
5 changes: 0 additions & 5 deletions requirements-test.txt

This file was deleted.

71 changes: 0 additions & 71 deletions setup.py

This file was deleted.

73 changes: 0 additions & 73 deletions tests.py

This file was deleted.

Empty file added tests/__init__.py
Empty file.
40 changes: 40 additions & 0 deletions tests/settings.py
@@ -0,0 +1,40 @@
SECRET_KEY = "SECRET"
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'beproud.django.mailer',
)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
USE_TZ = False

# For Celery Tests
CELERY_TASK_ALWAYS_EAGER = True
CELERY_TASK_EAGER_PROPAGATES = True
BROKER_BACKEND = 'memory'

import celery

app = celery.Celery()
app.config_from_object('django.conf:settings', namespace='CELERY')
app.autodiscover_tasks(lambda: INSTALLED_APPS)

0 comments on commit 5a40420

Please sign in to comment.