diff --git a/frappe/__version__.py b/frappe/__version__.py index 33111828cc..f14de00a27 100644 --- a/frappe/__version__.py +++ b/frappe/__version__.py @@ -1 +1,2 @@ +from __future__ import unicode_literals __version__ = "4.12.1" 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/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/hooks.py b/frappe/hooks.py index 60d1da83e4..7963e491c6 100644 --- a/frappe/hooks.py +++ b/frappe/hooks.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals app_name = "frappe" app_title = "Frappe Framework" app_publisher = "Web Notes Technologies Pvt. Ltd." diff --git a/frappe/patches/v4_0/add_delete_permission.py b/frappe/patches/v4_0/add_delete_permission.py index 7811217d97..091bdab3ff 100644 --- a/frappe/patches/v4_0/add_delete_permission.py +++ b/frappe/patches/v4_0/add_delete_permission.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/frappe/patches/v4_0/remove_index_sitemap.py b/frappe/patches/v4_0/remove_index_sitemap.py index 00d37eaf2e..5dcd0d79c7 100644 --- a/frappe/patches/v4_0/remove_index_sitemap.py +++ b/frappe/patches/v4_0/remove_index_sitemap.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/frappe/patches/v4_0/rename_profile_to_user.py b/frappe/patches/v4_0/rename_profile_to_user.py index bcb910b80a..8ad86cf531 100644 --- a/frappe/patches/v4_0/rename_profile_to_user.py +++ b/frappe/patches/v4_0/rename_profile_to_user.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe.model import rename_field diff --git a/frappe/patches/v4_0/rename_sitemap_to_route.py b/frappe/patches/v4_0/rename_sitemap_to_route.py index 991edf1f7c..6cfac7d354 100644 --- a/frappe/patches/v4_0/rename_sitemap_to_route.py +++ b/frappe/patches/v4_0/rename_sitemap_to_route.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe.model import rename_field diff --git a/frappe/patches/v4_0/set_todo_checked_as_closed.py b/frappe/patches/v4_0/set_todo_checked_as_closed.py index cc4b87a0bc..59e8df3793 100644 --- a/frappe/patches/v4_0/set_todo_checked_as_closed.py +++ b/frappe/patches/v4_0/set_todo_checked_as_closed.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/frappe/patches/v4_0/set_website_route_idx.py b/frappe/patches/v4_0/set_website_route_idx.py index 82f64756a4..663a324008 100644 --- a/frappe/patches/v4_0/set_website_route_idx.py +++ b/frappe/patches/v4_0/set_website_route_idx.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/frappe/patches/v4_0/update_datetime.py b/frappe/patches/v4_0/update_datetime.py index 672dd1940b..0e91174780 100644 --- a/frappe/patches/v4_0/update_datetime.py +++ b/frappe/patches/v4_0/update_datetime.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/frappe/patches/v4_0/webnotes_to_frappe.py b/frappe/patches/v4_0/webnotes_to_frappe.py index c70b2fdbde..22b3848d5a 100644 --- a/frappe/patches/v4_0/webnotes_to_frappe.py +++ b/frappe/patches/v4_0/webnotes_to_frappe.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe, json def execute(): diff --git a/frappe/patches/v4_2/refactor_website_routing.py b/frappe/patches/v4_2/refactor_website_routing.py index 9cb39beaf0..a5856db1c9 100644 --- a/frappe/patches/v4_2/refactor_website_routing.py +++ b/frappe/patches/v4_2/refactor_website_routing.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/frappe/patches/v4_2/set_assign_in_doc.py b/frappe/patches/v4_2/set_assign_in_doc.py index 664c997eaf..ff20d71432 100644 --- a/frappe/patches/v4_2/set_assign_in_doc.py +++ b/frappe/patches/v4_2/set_assign_in_doc.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/frappe/setup_logging.py b/frappe/setup_logging.py index f7fbc09d21..3de3954195 100644 --- a/frappe/setup_logging.py +++ b/frappe/setup_logging.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe import logging import logging.config diff --git a/frappe/templates/includes/comments.py b/frappe/templates/includes/comments.py index 00784e7ea6..0c66f866c3 100644 --- a/frappe/templates/includes/comments.py +++ b/frappe/templates/includes/comments.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.utils, markdown2 diff --git a/frappe/templates/pages/404.py b/frappe/templates/pages/404.py index ddd7ca82c8..d2f997080f 100644 --- a/frappe/templates/pages/404.py +++ b/frappe/templates/pages/404.py @@ -1,4 +1,5 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals no_sitemap = 1 diff --git a/frappe/templates/pages/update_password.py b/frappe/templates/pages/update_password.py index cdd40ab260..0864f4fef0 100644 --- a/frappe/templates/pages/update_password.py +++ b/frappe/templates/pages/update_password.py @@ -1,4 +1,5 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals no_sitemap = 1 diff --git a/frappe/tests/test_assign.py b/frappe/tests/test_assign.py index eefdfc2bc9..858487691e 100644 --- a/frappe/tests/test_assign.py +++ b/frappe/tests/test_assign.py @@ -1,5 +1,6 @@ # Copyright (c) 2014, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals import frappe, unittest import frappe.widgets.form.assign_to diff --git a/frappe/tests/test_client_login.py b/frappe/tests/test_client_login.py index e5a44d5ced..1df60e2819 100644 --- a/frappe/tests/test_client_login.py +++ b/frappe/tests/test_client_login.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 unittest, frappe from frappe.utils import sel diff --git a/frappe/tests/test_data_import.py b/frappe/tests/test_data_import.py index 70ef531e8e..eb1ce8c4b4 100644 --- a/frappe/tests/test_data_import.py +++ b/frappe/tests/test_data_import.py @@ -1,5 +1,6 @@ # Copyright (c) 2014, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals import frappe, unittest from frappe.core.page.data_import_tool import exporter diff --git a/frappe/tests/test_db_query.py b/frappe/tests/test_db_query.py index abdf219ec8..74f0a3296b 100644 --- a/frappe/tests/test_db_query.py +++ b/frappe/tests/test_db_query.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/tests/test_defaults.py b/frappe/tests/test_defaults.py index 411e8e6651..aa868ee138 100644 --- a/frappe/tests/test_defaults.py +++ b/frappe/tests/test_defaults.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/tests/test_document.py b/frappe/tests/test_document.py index 4567473f27..83e98312ff 100644 --- a/frappe/tests/test_document.py +++ b/frappe/tests/test_document.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/tests/test_filemanager.py b/frappe/tests/test_filemanager.py index 45207d8857..b8f4d66ac8 100644 --- a/frappe/tests/test_filemanager.py +++ b/frappe/tests/test_filemanager.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 os diff --git a/frappe/tests/test_fmt_money.py b/frappe/tests/test_fmt_money.py index 8080487531..442e74000b 100644 --- a/frappe/tests/test_fmt_money.py +++ b/frappe/tests/test_fmt_money.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 from frappe import _ diff --git a/frappe/tests/test_form_load.py b/frappe/tests/test_form_load.py index 79e7f3ecf4..34ae3e36a5 100644 --- a/frappe/tests/test_form_load.py +++ b/frappe/tests/test_form_load.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 from frappe.widgets.form.meta import get_meta diff --git a/frappe/tests/test_geo_ip.py b/frappe/tests/test_geo_ip.py index a04d1de925..150842bd20 100644 --- a/frappe/tests/test_geo_ip.py +++ b/frappe/tests/test_geo_ip.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 unittest diff --git a/frappe/tests/test_translation.py b/frappe/tests/test_translation.py index 6131a10aa0..a640442bee 100644 --- a/frappe/tests/test_translation.py +++ b/frappe/tests/test_translation.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, os import frappe.translate diff --git a/frappe/utils/bench_helper.py b/frappe/utils/bench_helper.py index 6c499dcbab..b920347f7a 100644 --- a/frappe/utils/bench_helper.py +++ b/frappe/utils/bench_helper.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import click import frappe import importlib diff --git a/frappe/utils/doctor.py b/frappe/utils/doctor.py index 1f2e00de3c..9ca5af8683 100644 --- a/frappe/utils/doctor.py +++ b/frappe/utils/doctor.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import json, base64, os import frappe.cli from frappe.celery_app import get_celery diff --git a/frappe/utils/email_lib/html2text.py b/frappe/utils/email_lib/html2text.py index d21a0b1a21..9cae1cc76b 100755 --- a/frappe/utils/email_lib/html2text.py +++ b/frappe/utils/email_lib/html2text.py @@ -1,5 +1,6 @@ #!/usr/bin/env python """html2text: Turn HTML into equivalent Markdown-structured text.""" +from __future__ import unicode_literals __version__ = "3.200.3" __author__ = "Aaron Swartz (me@aaronsw.com)" __copyright__ = "(C) 2004-2008 Aaron Swartz. GNU GPL 3." diff --git a/frappe/utils/minify.py b/frappe/utils/minify.py index 0145f7efb6..ed3bd9787c 100644 --- a/frappe/utils/minify.py +++ b/frappe/utils/minify.py @@ -27,6 +27,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # */ +from __future__ import unicode_literals from StringIO import StringIO diff --git a/frappe/utils/momentjs.py b/frappe/utils/momentjs.py index 67b8452260..b0446ed61d 100644 --- a/frappe/utils/momentjs.py +++ b/frappe/utils/momentjs.py @@ -1,4 +1,5 @@ # get data for moment.js +from __future__ import unicode_literals def update(tz, out): ltz = data["links"].get(tz, tz) zone = data["zones"].get(ltz) diff --git a/frappe/utils/pdf.py b/frappe/utils/pdf.py index 0837e816f5..a5ce980654 100644 --- a/frappe/utils/pdf.py +++ b/frappe/utils/pdf.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 pdfkit, os, frappe from frappe.utils import scrub_urls diff --git a/frappe/website/doctype/blog_category/test_blog_category.py b/frappe/website/doctype/blog_category/test_blog_category.py index 5a227df02b..fa554f6a15 100644 --- a/frappe/website/doctype/blog_category/test_blog_category.py +++ b/frappe/website/doctype/blog_category/test_blog_category.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/website/doctype/blog_post/test_blog_post.py b/frappe/website/doctype/blog_post/test_blog_post.py index 187daeeba2..b2666305f5 100644 --- a/frappe/website/doctype/blog_post/test_blog_post.py +++ b/frappe/website/doctype/blog_post/test_blog_post.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/website/doctype/blogger/test_blogger.py b/frappe/website/doctype/blogger/test_blogger.py index db7feb4970..ccb03cf4c0 100644 --- a/frappe/website/doctype/blogger/test_blogger.py +++ b/frappe/website/doctype/blogger/test_blogger.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/website/doctype/web_form/test_web_form.py b/frappe/website/doctype/web_form/test_web_form.py index cc9dc7cf43..27fec758f5 100644 --- a/frappe/website/doctype/web_form/test_web_form.py +++ b/frappe/website/doctype/web_form/test_web_form.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/website/doctype/website_group/test_website_group.py b/frappe/website/doctype/website_group/test_website_group.py index b06104ee43..b87625402a 100644 --- a/frappe/website/doctype/website_group/test_website_group.py +++ b/frappe/website/doctype/website_group/test_website_group.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