diff --git a/frappe/__version__.py b/frappe/__version__.py index 33111828cc..991fca2e00 100644 --- a/frappe/__version__.py +++ b/frappe/__version__.py @@ -1 +1,2 @@ -__version__ = "4.12.1" +from __future__ import unicode_literals +__version__ = "4.12.2" diff --git a/frappe/api.py b/frappe/api.py index f16c73b172..6c7d7bb092 100644 --- a/frappe/api.py +++ b/frappe/api.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals import json import frappe diff --git a/frappe/app.py b/frappe/app.py index 8d97dae8e7..822c061b67 100644 --- a/frappe/app.py +++ b/frappe/app.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals import sys, os import json diff --git a/frappe/config/desktop.py b/frappe/config/desktop.py index cf12e060ae..8be70bef51 100644 --- a/frappe/config/desktop.py +++ b/frappe/config/desktop.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/frappe/config/setup.py b/frappe/config/setup.py index 389757e632..c5de393d02 100644 --- a/frappe/config/setup.py +++ b/frappe/config/setup.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ from frappe.widgets.moduleview import add_setup_section diff --git a/frappe/config/website.py b/frappe/config/website.py index ad2fba13b1..369474ad40 100644 --- a/frappe/config/website.py +++ b/frappe/config/website.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/frappe/core/doctype/communication/communication.py b/frappe/core/doctype/communication/communication.py index cc9e10ef41..8d6a0c54a8 100644 --- a/frappe/core/doctype/communication/communication.py +++ b/frappe/core/doctype/communication/communication.py @@ -4,13 +4,12 @@ from __future__ import unicode_literals import frappe import json -import urllib from email.utils import formataddr from frappe.website.utils import is_signup_enabled from frappe.utils import get_url, cstr from frappe.utils.email_lib.email_body import get_email from frappe.utils.email_lib.smtp import send -from frappe.utils import scrub_urls, cint +from frappe.utils import scrub_urls, cint, quoted from frappe import _ from frappe.model.document import Document @@ -167,14 +166,13 @@ def attach_print(mail, sent_via, print_html, print_format): def set_portal_link(sent_via, comm): """set portal link in footer""" - footer = "" if is_signup_enabled(): is_valid_recipient = cstr(sent_via.get("email") or sent_via.get("email_id") or sent_via.get("contact_email")) in comm.recipients if is_valid_recipient: - url = "%s/%s/%s" % (get_url(), urllib.quote(sent_via.doctype), urllib.quote(sent_via.name)) + url = quoted("%s/%s/%s" % (get_url(), sent_via.doctype, sent_via.name)) footer = """
""" % url diff --git a/frappe/core/doctype/communication/test_communication.py b/frappe/core/doctype/communication/test_communication.py index e3c73f7eb8..454b3aecca 100644 --- a/frappe/core/doctype/communication/test_communication.py +++ b/frappe/core/doctype/communication/test_communication.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # See license.txt +from __future__ import unicode_literals import frappe import unittest diff --git a/frappe/core/doctype/doctype/boilerplate/test_controller.py b/frappe/core/doctype/doctype/boilerplate/test_controller.py index cc12c9b9c8..d9883d63fb 100644 --- a/frappe/core/doctype/doctype/boilerplate/test_controller.py +++ b/frappe/core/doctype/doctype/boilerplate/test_controller.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, {app_publisher} and Contributors # See license.txt +from __future__ import unicode_literals import frappe import unittest diff --git a/frappe/core/doctype/email_alert/test_email_alert.py b/frappe/core/doctype/email_alert/test_email_alert.py index c53bfcae71..fb49983981 100644 --- a/frappe/core/doctype/email_alert/test_email_alert.py +++ b/frappe/core/doctype/email_alert/test_email_alert.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # See license.txt +from __future__ import unicode_literals import frappe, frappe.utils, frappe.utils.scheduler import unittest diff --git a/frappe/core/doctype/event/test_event.py b/frappe/core/doctype/event/test_event.py index ba2ee14ecf..7f966590b0 100644 --- a/frappe/core/doctype/event/test_event.py +++ b/frappe/core/doctype/event/test_event.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals """Use blog post test to test user permissions logic""" diff --git a/frappe/core/doctype/letter_head/test_letter_head.py b/frappe/core/doctype/letter_head/test_letter_head.py index 15899e2b27..6136a7f8a4 100644 --- a/frappe/core/doctype/letter_head/test_letter_head.py +++ b/frappe/core/doctype/letter_head/test_letter_head.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals import frappe diff --git a/frappe/core/doctype/page/test_page.py b/frappe/core/doctype/page/test_page.py index 6ee0e25c32..9ad215c1df 100644 --- a/frappe/core/doctype/page/test_page.py +++ b/frappe/core/doctype/page/test_page.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # See license.txt +from __future__ import unicode_literals import frappe import unittest diff --git a/frappe/core/doctype/print_format/test_print_format.py b/frappe/core/doctype/print_format/test_print_format.py index a6b9981b0f..02761aad17 100644 --- a/frappe/core/doctype/print_format/test_print_format.py +++ b/frappe/core/doctype/print_format/test_print_format.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # See license.txt +from __future__ import unicode_literals import frappe import unittest diff --git a/frappe/core/doctype/role/test_role.py b/frappe/core/doctype/role/test_role.py index cda62d7a2a..961f155e74 100644 --- a/frappe/core/doctype/role/test_role.py +++ b/frappe/core/doctype/role/test_role.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals import frappe diff --git a/frappe/core/doctype/user/test_user.py b/frappe/core/doctype/user/test_user.py index 0be0a07d1c..5d4fdb729b 100644 --- a/frappe/core/doctype/user/test_user.py +++ b/frappe/core/doctype/user/test_user.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals import frappe, unittest diff --git a/frappe/core/doctype/version/test_version.py b/frappe/core/doctype/version/test_version.py index 5bc8781581..544dc0e559 100644 --- a/frappe/core/doctype/version/test_version.py +++ b/frappe/core/doctype/version/test_version.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # See license.txt +from __future__ import unicode_literals import frappe import unittest diff --git a/frappe/core/doctype/workflow_state/test_workflow_state.py b/frappe/core/doctype/workflow_state/test_workflow_state.py index 2bbe87dfed..d31211fc82 100644 --- a/frappe/core/doctype/workflow_state/test_workflow_state.py +++ b/frappe/core/doctype/workflow_state/test_workflow_state.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals import frappe diff --git a/frappe/core/page/data_import_tool/test_exporter_fixtures.py b/frappe/core/page/data_import_tool/test_exporter_fixtures.py index 862268b00f..c1141de575 100644 --- a/frappe/core/page/data_import_tool/test_exporter_fixtures.py +++ b/frappe/core/page/data_import_tool/test_exporter_fixtures.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals import frappe import frappe.defaults diff --git a/frappe/core/page/desktop/desktop.js b/frappe/core/page/desktop/desktop.js index e519a6184c..81964b4c27 100644 --- a/frappe/core/page/desktop/desktop.js +++ b/frappe/core/page/desktop/desktop.js @@ -139,7 +139,7 @@ frappe.desktop.show_all_modules = function() { module.label = __(module.label); $(repl('