fix!: Drop six PY2 compatibility package
This commit is contained in:
parent
5503e18817
commit
de2bcb08b4
4 changed files with 3 additions and 8 deletions
|
|
@ -572,12 +572,10 @@ class File(Document):
|
|||
|
||||
@staticmethod
|
||||
def zip_files(files):
|
||||
from six import string_types
|
||||
|
||||
zip_file = io.BytesIO()
|
||||
zf = zipfile.ZipFile(zip_file, "w", zipfile.ZIP_DEFLATED)
|
||||
for _file in files:
|
||||
if isinstance(_file, string_types):
|
||||
if isinstance(_file, str):
|
||||
_file = frappe.get_doc("File", _file)
|
||||
if not isinstance(_file, File):
|
||||
continue
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import quopri
|
|||
from email.parser import Parser
|
||||
from email.policy import SMTPUTF8
|
||||
from html2text import html2text
|
||||
from six.moves import html_parser as HTMLParser
|
||||
|
||||
import frappe
|
||||
from frappe import _, safe_encode, task
|
||||
|
|
@ -445,7 +444,7 @@ class QueueBuilder:
|
|||
|
||||
try:
|
||||
text_content = html2text(self._message)
|
||||
except HTMLParser.HTMLParseError:
|
||||
except Exception:
|
||||
text_content = "See html attachment"
|
||||
return text_content + unsubscribe_text_message
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ from functools import wraps
|
|||
from typing import Dict, Optional
|
||||
|
||||
import yaml
|
||||
from six import iteritems
|
||||
from werkzeug.wrappers import Response
|
||||
|
||||
import frappe
|
||||
|
|
@ -464,7 +463,7 @@ def build_response(path, data, http_status_code, headers: Optional[Dict] = None)
|
|||
|
||||
add_preload_headers(response)
|
||||
if headers:
|
||||
for key, val in iteritems(headers):
|
||||
for key, val in headers.items():
|
||||
response.headers[key] = val.encode("ascii", errors="xmlcharrefreplace")
|
||||
|
||||
return response
|
||||
|
|
|
|||
|
|
@ -59,7 +59,6 @@ rq~=1.8.0
|
|||
rsa>=4.1 # not directly required, pinned by Snyk to avoid a vulnerability
|
||||
schedule~=1.1.0
|
||||
semantic-version~=2.8.5
|
||||
six~=1.15.0
|
||||
sqlparse~=0.4.1
|
||||
stripe~=2.56.0
|
||||
terminaltables~=3.1.0
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue