Alex Corcoles added the comment:
Duh, I'm an idiot, I only tested policy.HTTP and *NOT* supplying a policy
(which I believed was equivalent to using policy.default).
policy.default and policy.SMTP do indeed produce a newline-less subject indeed.
I only tested policy.HTTP because the docs
Alex Corcoles added the comment:
Well, I think that having to choose the "HTTP" policy to get a message
subject's without newlines goes against the expectations of anyone who is not
well knowledgeable of email.
It's not very easy to deduct that, out of all the available poli
Alex Corcoles added the comment:
To clarify (and maybe help someone which might come across), you mean:
In [1]: message_text = """To: a...@corcoles.net
...: Subject: ** ACKNOWLEDGEMENT Host Alert: archerc7.bcn.int.pdp7.net is
DOWN
...: **
...: User-Agent: Heirloom ma
New submission from Alex Corcoles :
Hi,
This is something that has hit us a few times, as we write a significant
quantity of software which parses email messages.
The thing is, we use email.header.decode_header to decode the Subject: header
and it is pretty common for headers to be word
Alex Corcoles <a...@pdp7.net> added the comment:
Are you referring to something akin to Java's marker interfaces? That is, a
class with no methods which you inherit from just for semantic meaning (e.g.
Java's serializable interface that you implement to indicate that the class is
de
New submission from Alex Corcoles <a...@pdp7.net>:
Hi,
$ python3
Python 3.5.3 (default, Jan 19 2017, 14:11:04)
>>> import abc
>>> class Foo(abc.ABC):
... pass
...
>>> Foo()
<__main__.Foo object at 0x7f253e6dcb38>
I think declaring a class as AB
Changes by Alex Corcoles <a...@pdp7.net>:
--
versions: +Python 3.5, Python 3.6, Python 3.7
___
Python tracker <rep...@bugs.python.org>
<http://bugs.pytho
Changes by Alex Corcoles <a...@pdp7.net>:
--
nosy: +Alex Corcoles
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7727>
___
__
New submission from Alex Corcoles:
https://docs.python.org/3.7/library/xmlrpc.client.html says:
"""
When passing strings, characters special to XML such as <, >, and & will be
automatically escaped. However, it’s the caller’s responsibility to ensure that
the str