[issue40359] email.parse part.get_filename() fails to unwrap long attachment file names

2020-04-21 Thread Matthew Davis
Matthew Davis added the comment: Ah woops, I mistyped the relevant ticket. It's issue 36401 https://bugs.python.org/issue36041 -- ___ Python tracker <https://bugs.python.org/issue40

[issue40359] email.parse part.get_filename() fails to unwrap long attachment file names

2020-04-21 Thread Matthew Davis
New submission from Matthew Davis : # Summary When parsing emails with long attachment file names, part.get_filename() often returns \n or \r\n. It should strip those characters out. # Steps to reproduce I have attached a minimal working example. The relevant part of the raw email

[issue40359] email.parse part.get_filename() fails to unwrap long attachment file names

2020-04-21 Thread Matthew Davis
Matthew Davis added the comment: 36041 -- ___ Python tracker <https://bugs.python.org/issue40359> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40359] email.parse part.get_filename() fails to unwrap long attachment file names (legacy API)

2020-04-27 Thread Matthew Davis
Matthew Davis added the comment: Ah, yes that workaround works. Thanks! So what's the exact status of this policy? It's called the default policy, but it's not used by default? If I download the latest version of python, will this be parsed correctly without explicitly setting the policy

[issue41788] enhancement: add assertDuration context manager to unittest module

2020-09-14 Thread Matthew Davis
New submission from Matthew Davis : # Summary I propose an additional unit test type for the unittest module. TestCase.assertDuration(min=None, max=None), which is a context manager, similar to assertRaises. It runs the code inside it, and then fails the test if the duration of the code

[issue29056] logging.Formatter doesn't respect more than one formatException()

2020-07-21 Thread Matthew Davis
Matthew Davis added the comment: The documentation says "you will have to clear the cached value" What does that mean? How do I clear the cached value? Is there a flush function somewhere? Do I `del` the attribute? Set the attribute to None? The documentation as it stands

[issue42369] Reading ZipFile not thread-safe

2022-02-01 Thread Matthew Davis
Matthew Davis added the comment: In addition to fixing any unexpected behavior, can we update the documentation [1] to state what the expected behavior is in terms of thread safety? [1] https://docs.python.org/3/library/zipfile.html -- nosy: +mdavis-xyz