diff --git a/.travis.yml b/.travis.yml index 6d1d0f0..0357520 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,8 @@ os: linux language: python jobs: + - env: TOX_ENV=docs + python: 3.8 # sort by django version, next to by python version # Django 1.11 support all supported Python interpreter - env: TOX_ENV=django111-py35 diff --git a/django_mailbox/models.py b/django_mailbox/models.py index 5b7fbbc..0f0ac9d 100644 --- a/django_mailbox/models.py +++ b/django_mailbox/models.py @@ -701,11 +701,11 @@ class Message(models.Model): self.body = base64.b64encode(body.encode('utf-8')).decode('ascii') def get_email_object(self): - """Returns an `email.message.Message` instance representing the + """Returns an `email.message.EmailMessage` instance representing the contents of this message and all attachments. - See [email.Message.Message]_ for more information as to what methods - and properties are available on `email.message.Message` instances. + See [email.message.EmailMessage]_ for more information as to what methods + and properties are available on `email.message.EmailMessage` instances. .. note:: @@ -715,8 +715,8 @@ class Message(models.Model): using stored attachments, or read the message contents stored on-disk. - .. [email.Message.Message]: Python's `email.message.Message` docs - (https://docs.python.org/2/library/email.message.html) + .. [email.message.EmailMessage] Python's `email.message.EmailMessage` docs + (https://docs.python.org/3/library/email.message.html) """ if not hasattr(self, '_email_object'): # Cache fill diff --git a/docs/conf.py b/docs/conf.py index 335f1d5..d16a0f2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -119,7 +119,7 @@ html_theme = 'default' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +# html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. diff --git a/docs/topics/appendix/message-storage.rst b/docs/topics/appendix/message-storage.rst index e232a53..12b859b 100644 --- a/docs/topics/appendix/message-storage.rst +++ b/docs/topics/appendix/message-storage.rst @@ -5,7 +5,7 @@ Message Storage Details First, it may be helpful to know a little bit about how e-mail messages are actually sent across the wire: -.. code-block:: http +.. code-block:: MIME-Version: 1.0 Received: by 10.221.0.211 with HTTP; Sun, 20 Jan 2013 12:07:07 -0800 (PST) @@ -52,7 +52,7 @@ and alter the message body removing the original payload component, but writing a custom header providing the library enough information to re-build the message in the event that one needs a python ``email.message.Message`` object. -.. code-block:: http +.. code-block:: MIME-Version: 1.0 Received: by 10.221.0.211 with HTTP; Sun, 20 Jan 2013 12:07:07 -0800 (PST) @@ -113,7 +113,7 @@ in the place of the original attachment, the attachment was stored in a And were one to run the ``django_mailbox.Message`` instance's ``get_email_object`` method, the following message will be returned: -.. code-block:: http +.. code-block:: MIME-Version: 1.0 Received: by 10.221.0.211 with HTTP; Sun, 20 Jan 2013 12:07:07 -0800 (PST) diff --git a/docs/topics/development.rst b/docs/topics/development.rst index cdc7154..e1d60cb 100644 --- a/docs/topics/development.rst +++ b/docs/topics/development.rst @@ -44,7 +44,7 @@ To enroll a new release you should perform the following task: * Push a new release to PyPI - ``python setup.py sdist bdist_wheel upload``. How to add support for a new Django version? ------------------------------------------- +-------------------------------------------- Changes are only necessary for new minor or major Django versions. diff --git a/tox.ini b/tox.ini index 2b22134..fcbd986 100644 --- a/tox.ini +++ b/tox.ini @@ -22,6 +22,14 @@ commands= python {toxinidir}/manage.py makemigrations --check --dry-run python -Wd manage.py test -v2 {posargs} +[testenv:docs] +deps= + sphinx + -r{toxinidir}/rtd_requirements.txt +commands=make html clean SPHINXOPTS="-W --keep-going" +changedir={toxinidir}/docs +allowlist_externals=make + [testenv:flake8] deps=flake8 commands=flake8 django_mailbox