On Mon, 2 Sep 2019, Arnt Gulbrandsen wrote:
What does that mean for APIs?
Look at the python smtp client module. It does EAI and has a new SMTPNotSupportedError which is thrown if you send an EAI message and the server at the other end doesn't advertise SMTPUTF8.
I looked, and SMTPNotSupportedError isn't EAI-specific. Adding EAI support to a python app doesn't require it, because it was already required.
EAI raises that error in routines that never raised it before. I'd say that's an API change.
The smtpd module, an SMTP server, does EAI, and has a new enable_SMTPUTF8 option. It's deprecated in favor of the thready aiosmtpd which also has a similar option.
I looked at it too, and if an application does nothing, it silently gets EAI support.
I looked at it, and if you don't say enable_SMTPUTF8=True it doesn't advertise SMTPUTF8 and you don't get EAI support. Look again.
The the email module which does header and MIME parsing and deparsing has an email.policy submodule with a utf8 option that says whether to put unencoded UTF-8 into headers or to MIME encode it.
Yes. Still no new error handling required, still no new code path required of apps that use it. If an app doesn't add anything special, the users simply get generic error messages. "Unknown error while sending", "unable to send to <address>", that kind of thing.
Well, yeah but they don't get EAI support either if they don't set the utf8 option. IF you want EAI you have to change the client. I'm not saying any of these changes are a big deal, but they're more than zero. Regards, John Levine, john.levine@standcore.com Standcore LLC