[Email-SIG] [Python-3000] email libraries: use byte or unicode strings?

Barry Warsaw barry at python.org
Thu Nov 6 18:23:03 CET 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Nov 6, 2008, at 1:04 AM, Glenn Linderman wrote:

> So I would hope that the users of such Betas would quickly discover  
> that  they were producing garbage, report it to M$, and go back to  
> using a release version with only the usual expectation of bugs,  
> inconsistencies, standards violations, and security exploits, but  
> not expect that Beta software is, or should be, fully compatible  
> with other applications that handle proper email.

It's a nice thought, but it's completely impossible for real-world  
applications to ignore broken messages.  "Be lenient in what you  
accept and strict in what you produce" is the only way you can  
operate, and the email package has a very strong design goal toward  
that tenant.

> Did Python's 2.x mail library handle the data that you describe?   
> Did anyone seriously expect it to?  Did Mozilla clients handle it?   
> Can you provide a list of email clients that handled it gracefully,  
> other than the same Outhouse Excess client that produced it?  And if  
> not, why would you expect Python's 3.0 mail library to handle it?

Yes, Python 2.x's email package handles broken messages, and email-ng  
must too.  "Handling it" means:

1) never throw an exception
2) record defects in a usable way for upstream consumers of the  
message to handle

it currently also means

3) ignore idempotency for defective messages.

- -Barry

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)

iQCVAwUBSRMn93EjvBPtnXfVAQINZQP/QeaDuDI9gRK7VQwpgkSCQ/i07v8Be6EP
q8Xijd5NHt34wCxZVCWp+ttAH6FrrbKSUktLvI9CBVUzYPE+T5GhPC7vvVlnp3rF
JsO5tJv8qFHjJi1jlwvgxQo1KXJB/kSxNyZiKXGZ9i16RGEoqXTbj+1XVgu8MONI
0EkEpD9bIq8=
=a1sq
-----END PGP SIGNATURE-----


More information about the Email-SIG mailing list