-
Notifications
You must be signed in to change notification settings - Fork 2
support Python3.10 over & Django4.2 #21
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
recursive-include beproud/django/mailer/templates * | ||
README.md | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() | ||
Comment on lines
+4
to
+5
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 4.0でSignalのコンストラクタの引数に、providing_argsが廃止。 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[build-system] | ||
requires = ["setuptools>=61.0.0", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "bpmailer" | ||
version = "1.3" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. python setup.pyで実行するコマンドは非推奨になりつつあるので、pyproject.tomlに移植。 |
||
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"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. お、sixがまだ残ってますね。この機に削除でもよいかと思う(余力があれば) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. six消そうかなと思ったのですが、既存プロジェクトの他のパッケージで依存があったので、強いモチベーションがなくそのままにしました() |
||
|
||
[project.urls] | ||
Homepage = "https://github.com/beproud/bpmailer/" | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["."] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 .`` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 現在はbuildを使うようになっているので記述を更新 |
||
|
||
2. twineのコマンドを実行して、エラーが出ないことを確認 | ||
|
||
|
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
SECRET_KEY = "SECRET" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. もとはtests.pyに一緒に記述していたものだが、pytestで実行するために切り出した。 |
||
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
前のPRで削除されているのでこちらも削除