1
0
Fork 1
mirror of https://github.com/coddingtonbear/django-mailbox.git synced 2026-07-09 22:38:19 +02:00
This commit is contained in:
Pascal Fouque 2026-06-29 14:16:23 +02:00 committed by GitHub
commit 98684cd312
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 27 additions and 14 deletions

View file

@ -1,2 +1,2 @@
[flake8]
exclude = django_mailbox/migrations, django_mailbox/south_migrations
exclude = django_mailbox/migrations

View file

@ -23,6 +23,8 @@ jobs:
- '3.10'
- '3.11'
- '3.12'
- '3.13'
- '3.14'
steps:
- uses: actions/checkout@v4

View file

@ -1,6 +1,13 @@
Changelog
=========
Unreleased
-----
* Add Python 3.13, 3.14 support
* Add Django 5.1, 5.2, 6.0 support
* Remove support for deprecated Django versions
4.9.0
-----

View file

@ -310,7 +310,7 @@ class Mailbox(models.Model):
)
elif (
settings['strip_unallowed_mimetypes']
and not msg.get_content_type() in settings['allowed_mimetypes']
and msg.get_content_type() not in settings['allowed_mimetypes']
):
for header, value in msg.items():
new[header] = value
@ -674,10 +674,9 @@ class Message(models.Model):
message.extra_headers['Date'] = formatdate()
message.extra_headers['In-Reply-To'] = self.message_id.strip()
message.send()
return self.mailbox.record_outgoing_message(
email.message_from_string(
message.message().as_string()
)
message.message()
)
@property

View file

@ -2,3 +2,8 @@
norecursedirs=env docs lib .eggs
DJANGO_SETTINGS_MODULE=django_mailbox.tests.settings
addopts = --tb=short -rxs
[tool:pytest]
norecursedirs=env docs lib .eggs
DJANGO_SETTINGS_MODULE=django_mailbox.tests.settings
addopts = --tb=short -rxs

View file

@ -39,11 +39,11 @@ setup(
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Framework :: Django',
'Framework :: Django :: 3.2',
'Framework :: Django :: 4.0',
'Framework :: Django :: 4.1',
'Framework :: Django :: 4.2',
'Framework :: Django :: 5.0',
'Framework :: Django :: 5.1',
'Framework :: Django :: 5.2',
'Framework :: Django :: 6.0',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',

12
tox.ini
View file

@ -2,11 +2,11 @@
# sort by django version, next by python version
envlist=
flake8
py{312,313,314}-django60
py{310,311,312,313,314}-django52
py{310,311,312}-django51
py{310,311,312}-django50
py{38,39,310,311}-django42
py{38,39,310,311}-django41
py{38,39,310}-django40
py{38,39,310}-django32
[gh-actions]
python =
@ -23,11 +23,11 @@ passenv=
EMAIL_PASSWORD
EMAIL_SMTP_SERVER
deps=
django60: Django>=6.0,<6.1
django52: Django>=5.2,<6.0
django51: Django>=5.1,<5.2
django50: Django==5.0,<5.1
django42: Django>=4.2,<5.0
django41: Django>=4.1,<4.2
django40: Django>=4.0,<4.1
django32: Django>=3.2,<4.0
-r{toxinidir}/test_requirements.txt
sitepackages=False
commands=