Repository: incubator-airflow Updated Branches: refs/heads/master 89c1f530d -> 985a433a8
[AIRFLOW-2696] Setting UTF-8 as default mime_charset mail update UPDATING.md Closes #3559 from lxneng/feature/utf8_mime_charset Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/985a433a Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/985a433a Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/985a433a Branch: refs/heads/master Commit: 985a433a8d03906edfa49a99aa86c026769aff57 Parents: 89c1f53 Author: Eric Lo <[email protected]> Authored: Sun Jul 1 10:05:51 2018 +0200 Committer: Fokko Driesprong <[email protected]> Committed: Sun Jul 1 10:05:56 2018 +0200 ---------------------------------------------------------------------- UPDATING.md | 2 ++ airflow/utils/email.py | 4 ++-- tests/core.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/985a433a/UPDATING.md ---------------------------------------------------------------------- diff --git a/UPDATING.md b/UPDATING.md index c341b38..82983b2 100644 --- a/UPDATING.md +++ b/UPDATING.md @@ -5,6 +5,8 @@ assists users migrating to a new version. ## Airflow Master +### Setting UTF-8 as default mime_charset in email utils + ### Add a configuration variable(default_dag_run_display_number) to control numbers of dag run for display Add a configuration variable(default_dag_run_display_number) under webserver section to control num of dag run to show in UI. http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/985a433a/airflow/utils/email.py ---------------------------------------------------------------------- diff --git a/airflow/utils/email.py b/airflow/utils/email.py index b37e3d4..08347a5 100644 --- a/airflow/utils/email.py +++ b/airflow/utils/email.py @@ -41,7 +41,7 @@ from airflow.utils.log.logging_mixin import LoggingMixin def send_email(to, subject, html_content, files=None, dryrun=False, cc=None, bcc=None, - mime_subtype='mixed', mime_charset='us-ascii', **kwargs): + mime_subtype='mixed', mime_charset='utf-8', **kwargs): """ Send email using backend specified in EMAIL_BACKEND. """ @@ -55,7 +55,7 @@ def send_email(to, subject, html_content, def send_email_smtp(to, subject, html_content, files=None, dryrun=False, cc=None, bcc=None, - mime_subtype='mixed', mime_charset='us-ascii', + mime_subtype='mixed', mime_charset='utf-8', **kwargs): """ Send an email with html content http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/985a433a/tests/core.py ---------------------------------------------------------------------- diff --git a/tests/core.py b/tests/core.py index 8e68be3..fcbc0cf 100644 --- a/tests/core.py +++ b/tests/core.py @@ -2429,7 +2429,7 @@ class EmailTest(unittest.TestCase): utils.email.send_email('to', 'subject', 'content') send_email_test.assert_called_with( 'to', 'subject', 'content', files=None, dryrun=False, - cc=None, bcc=None, mime_charset='us-ascii', mime_subtype='mixed') + cc=None, bcc=None, mime_charset='utf-8', mime_subtype='mixed') self.assertFalse(mock_send_email.called)
