-
-
Notifications
You must be signed in to change notification settings - Fork 16.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/ascii #2115
Feature/ascii #2115
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, please rebase to the upstream master. You currently have a weird merge commit in your PR.
@@ -504,6 +504,11 @@ def send_file(filename_or_fp, mimetype=None, as_attachment=False, | |||
a :class:`~datetime.datetime` or timestamp. | |||
If a file was passed, this overrides its mtime. | |||
""" | |||
import warnings |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
@@ -504,6 +504,11 @@ def send_file(filename_or_fp, mimetype=None, as_attachment=False, | |||
a :class:`~datetime.datetime` or timestamp. | |||
If a file was passed, this overrides its mtime. | |||
""" | |||
import warnings | |||
if type(filename_or_fp) is str: |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
@@ -958,3 +963,16 @@ def total_seconds(td): | |||
:rtype: int | |||
""" | |||
return td.days * 60 * 60 * 24 + td.seconds | |||
|
|||
def is_ascii(string_to_test): |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
:returns: True if string_to_test is fully ASCII encoded, False if not | ||
:rtype: boolean | ||
""" | ||
if all(ord(char) < 128 for char in string_to_test): |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
@ThiefMaster so is it better to delete this branch and create a new updated one? Or do you have any better suggestion? |
No, just rebase/amend and then force-push. That will update this PR without adding even more commits. |
Why did the checks failed? |
There's a syntax error. Please test code before committing/pushing it... |
Sorry it was a misunderstood with my colleagues. |
Closing because #2223 added support for UTF-8 filenames. |
Implemented the solution purposed by @dsully for issue #1286