refactor: clean up code to py39+ supported syntax
- f-strings instead of format
- latest typing support instead of pre 3.9 TitleCase
- remove UTF-8 declarations.
- many more changes
Powered by https://github.com/asottile/pyupgrade/ + manual cleanups
These modules were imported from the ERPNext codebase into Frappe.
License header was overlooked at that point. These were contributed
initially by Frappe Technologies Pvt Ltd under GPLv3 (ERPNext's license) and now
we, as Frappe Technologies Pvt Ltd converting them to MIT to comply with
Frappe's license.
replaced queue.send function with Queue builder.
Queue builder builds a queue from sendmail request and sends the mail
if requested to send mail immediately.
* Remove six for PY2 compatability since our dependencies are not, PY2
is legacy.
* Removed usages of utils from future/past libraries since they are
deprecated. This includes 'from __future__ ...' and 'from past...'
statements.
* Removed compatibility imports for PY2, switched from six imports to
standard library imports.
* Removed utils code blocks that handle operations depending on PY2/3
versions.
* Removed 'from __future__ ...' lines from templates/code generators
* Used PY3 syntaxes in place of PY2 compatible blocks. eg: metaclass
* start of tests
* rfc compliant emails for frappe.
* fix for deepsource
* fix length of strings.
* fix bug that I'm not sure where it came from?
* codacy and deepsource issues trying to keep them happy
* take a punt in the dark
* fix: use SMTPUTF8 instead of SMTP and other minor fixes
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
* Read image file in binary mode
* Read files in binary mode
* Don't use bytestrings unnecessarily
* Correctly convert byte strings to unicode in frappe.as_unicode
* Convert content to bytes before writing to file
* DRY font-family declarations
* Add email.less, inline styles using premailer
* min-width 100% for mobile email clients
* Emails without header have default 100% width (like before)
* Include email.css for all apps
* Keep !important declarations
* Add test case for inlining css
* Ignore important rules in css
* minor
* minor refactor
* update user.py to use new sendmail api
* On-demand attachments in email
* Replace inline_images by just specifying path
* Add header flag in frappe.sendmail
* Inline images can now be attached from assets/, files/ and private/files/
* Update tests
* Fix email_account test
* inline images working, ability to use template name for emails
* Extract header into separate file
* Remove erp-logo
* minor refactor
* [minor] codacy
* fix for test
* Add test case for email body
* remove unused imports
* Add more tests for email body