<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-2936</id>
	<title>Nabble - Python - email-sig</title>
	<updated>2009-11-15T10:01:21Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/Python---email-sig-f2936.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Python---email-sig-f2936.html" />
	<subtitle type="html">SIG for designing and implementing email 3.0</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26361533</id>
	<title>Re: Design Thoughts Summary</title>
	<published>2009-11-15T10:01:21Z</published>
	<updated>2009-11-15T10:01:21Z</updated>
	<author>
		<name>Barry Warsaw</name>
	</author>
	<content type="html">On Nov 14, 2009, at 5:12 PM, Matthew Dixon Cowles wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Thank you. I am virtually 100% in agreement that this document
&lt;br&gt;&amp;gt; represents what people have agreed on and that it represents what is
&lt;br&gt;&amp;gt; sensible to do.
&lt;br&gt;&lt;br&gt;As am I. &amp;nbsp;Fantastic work in pulling this all together David.
&lt;br&gt;&lt;br&gt;I'm a bit slammed right now, but a quick comment...
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt; * The API needs to at a minimum have hooks available for an
&lt;br&gt;&amp;gt;&amp;gt; application to store data on disk rather than holding everything in
&lt;br&gt;&amp;gt;&amp;gt; memory.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I remain unconvinced that this is worth the trouble. Yes, the Twisted
&lt;br&gt;&amp;gt; folks say that they can't use the email module because they may be
&lt;br&gt;&amp;gt; receiving hundreds of messages at once. But can anyone do anything
&lt;br&gt;&amp;gt; with hundreds of messages at once other than write them to disk?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; And would anything actually be improved by reading hundreds of files
&lt;br&gt;&amp;gt; at once, in small chunks, looking for MIME separators?
&lt;/div&gt;&lt;/div&gt;Mailman has a similar problem. &amp;nbsp;Even if we get just a few big &amp;nbsp;
&lt;br&gt;messages, they can crush the system. &amp;nbsp;You could argue that the MTA &amp;nbsp;
&lt;br&gt;should just block messages with 50MB bodies if the underlying Mailman &amp;nbsp;
&lt;br&gt;code can't handle it, but I still think we can do better.
&lt;br&gt;&lt;br&gt;I think we're fine if all the headers and MIME structure were kept in &amp;nbsp;
&lt;br&gt;memory it would be fine. &amp;nbsp;But I do think we just want to be able to &amp;nbsp;
&lt;br&gt;never store the raw body content in memory (perhaps unless needed, on &amp;nbsp;
&lt;br&gt;demand). &amp;nbsp;Mailman for example rarely cares about the bytes of say an &amp;nbsp;
&lt;br&gt;image/jpeg body.
&lt;br&gt;&lt;br&gt;I'm very psyched to see this work progress!
&lt;br&gt;&lt;br&gt;-Barry
&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26361533&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;PGP.sig&lt;/strong&gt; (201 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26361533/0/PGP.sig&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Design-Thoughts-Summary-tp26354287p26361533.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26354980</id>
	<title>Re: Design Thoughts Summary</title>
	<published>2009-11-14T15:12:36Z</published>
	<updated>2009-11-14T15:12:36Z</updated>
	<author>
		<name>Matthew Dixon Cowles</name>
	</author>
	<content type="html">[R. David Murray]
&lt;br&gt;&lt;br&gt;&amp;gt; I'm including it here to make it easier for people to comment.
&lt;br&gt;&lt;br&gt;Thank you. I am virtually 100% in agreement that this document
&lt;br&gt;represents what people have agreed on and that it represents what is
&lt;br&gt;sensible to do.
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;- For non-conforming input, when is it OK to raise an error and
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return to the calling client rather than handle it? (The 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;answer to this is probably 'never').
&lt;br&gt;&lt;br&gt;I continue to vote for never. Mostly because it would amount to
&lt;br&gt;providing the same information in more than one way.
&lt;br&gt;&lt;br&gt;Consider code like this:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; m=email.message_from_bytes(b)
&lt;br&gt;&amp;nbsp; &amp;nbsp; for defect in m:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; # See how bad the message is and
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; # decide what to do with it
&lt;br&gt;&lt;br&gt;If the parser raised parsing exceptions, I'd need something like:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; try:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; m=email.message_from_bytes(b)
&lt;br&gt;&amp;nbsp; &amp;nbsp; except email.ParseError:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; # Message is very bad
&lt;br&gt;&amp;nbsp; &amp;nbsp; else:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; for defect in m:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # See how bad the message is
&lt;br&gt;&lt;br&gt;Hardly impossible to write, but I don't see the point in making every
&lt;br&gt;use of the parser look like that.
&lt;br&gt;&lt;br&gt;&amp;gt; * The API needs to at a minimum have hooks available for an
&lt;br&gt;&amp;gt; application to store data on disk rather than holding everything in
&lt;br&gt;&amp;gt; memory.
&lt;br&gt;&lt;br&gt;I remain unconvinced that this is worth the trouble. Yes, the Twisted
&lt;br&gt;folks say that they can't use the email module because they may be
&lt;br&gt;receiving hundreds of messages at once. But can anyone do anything
&lt;br&gt;with hundreds of messages at once other than write them to disk?
&lt;br&gt;&lt;br&gt;And would anything actually be improved by reading hundreds of files
&lt;br&gt;at once, in small chunks, looking for MIME separators?
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Matt
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26354980&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Design-Thoughts-Summary-tp26354287p26354980.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26354287</id>
	<title>Design Thoughts Summary</title>
	<published>2009-11-14T14:01:49Z</published>
	<updated>2009-11-14T14:01:49Z</updated>
	<author>
		<name>R. David Murray</name>
	</author>
	<content type="html">I've gone through the messages from the design discussion thread and
&lt;br&gt;summarized what seems to me to be the sense of the discussion [*]. &amp;nbsp;Some of
&lt;br&gt;this restates what is already in the Design Overview I put on the wiki,
&lt;br&gt;but seemed worth repeating.
&lt;br&gt;&lt;br&gt;I've posted this on the wiki:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://wiki.python.org/moin/Email%20SIG/DesignThoughts&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://wiki.python.org/moin/Email%20SIG/DesignThoughts&lt;/a&gt;&lt;br&gt;&lt;br&gt;I'm including it here to make it easier for people to comment.
&lt;br&gt;&lt;br&gt;[*] &amp;quot;sense of the discussion&amp;quot; as analogous to the &amp;quot;Sense of the
&lt;br&gt;Meeting&amp;quot; in Quaker terminology.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Design Thoughts
&lt;br&gt;===============
&lt;br&gt;&lt;br&gt;&lt;br&gt;Guiding Thoughts
&lt;br&gt;----------------
&lt;br&gt;&lt;br&gt;* To decide what to do with broken email we need to decide:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;- To what level does the email module promise to parse
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;conforming wire-format into useful objects?
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;- For non-conforming input, when is it OK to raise an error and
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return to the calling client rather than handle it? (The answer
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;to this is probably 'never').
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;- What is the API for accessing and/or mutating unparsable data,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;and requesting a reparse?
&lt;br&gt;&lt;br&gt;* We should treat backward compatibility the way Python3 did: as something
&lt;br&gt;&amp;nbsp; &amp;nbsp;desirable, but not something that prevents us from fixing the warts
&lt;br&gt;&amp;nbsp; &amp;nbsp;in the current API. &amp;nbsp;We can worry about a migration strategy later.
&lt;br&gt;&lt;br&gt;* A more property based API would be nice.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Required Elements
&lt;br&gt;-----------------
&lt;br&gt;&lt;br&gt;* The code and documentation should state clearly what RFCs are
&lt;br&gt;&amp;nbsp; &amp;nbsp;implemented.
&lt;br&gt;&lt;br&gt;* There are two parallel APIs at the outer level: a bytes API and a
&lt;br&gt;&amp;nbsp; &amp;nbsp;string API. &amp;nbsp;We expect that all user facing APIs will have both a
&lt;br&gt;&amp;nbsp; &amp;nbsp;string and a bytes version, except in cases where there is no
&lt;br&gt;&amp;nbsp; &amp;nbsp;sensible string version of the data (eg: binary attachments).
&lt;br&gt;&lt;br&gt;* Only developers working on the internals of the email package should
&lt;br&gt;&amp;nbsp; &amp;nbsp;need to worry about how the data is actually represented in the
&lt;br&gt;&amp;nbsp; &amp;nbsp;model.
&lt;br&gt;&lt;br&gt;* When raw data is fed in to the system, serializing the resulting
&lt;br&gt;&amp;nbsp; &amp;nbsp;object back to the same data-type as the input data should result
&lt;br&gt;&amp;nbsp; &amp;nbsp;in the exact same data whenever possible. &amp;nbsp;(&amp;quot;Invertability&amp;quot;)
&lt;br&gt;&lt;br&gt;* Once a model has been serialized, serializing it again in the
&lt;br&gt;&amp;nbsp; &amp;nbsp;absence of model mutations should produce the same result
&lt;br&gt;&amp;nbsp; &amp;nbsp;(&amp;quot;Idempotence&amp;quot;)
&lt;br&gt;&lt;br&gt;* All headers are represented internally as Header objects. &amp;nbsp;As with
&lt;br&gt;&amp;nbsp; &amp;nbsp;all user facing APIs, the Header object must have both a bytes and a
&lt;br&gt;&amp;nbsp; &amp;nbsp;string API.
&lt;br&gt;&lt;br&gt;* Ideally, accessing data from the model should never raise an exception.
&lt;br&gt;&lt;br&gt;* Mutating the model should raise exceptions as early as possible.
&lt;br&gt;&lt;br&gt;* As in the current email package, the fundamental model is the Message
&lt;br&gt;&amp;nbsp; &amp;nbsp;object. &amp;nbsp;Message objects are recursively defined, and consist of
&lt;br&gt;&amp;nbsp; &amp;nbsp;the following parts:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;- headers: an ordered list of Header objects (in RFC 5322 terms,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this is the model of the 'header section').
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+ Duplicate headers must be supported
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+ Header order must be preserved
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+ As in the current package, a dictionary-like interface will
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;probably also be provided.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;- body/payload: the data encapsulated by the Message (the model
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;of the RFC 5322 'body')
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+ A Message can be either a terminal node, in which case an
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;object corresponding to its MIME type can be retrieved,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;or an instance of one of the multipart MIME types, in which
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case a list of sub-Messages can be retrieved.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+ Access to the raw data of the body must be available
&lt;br&gt;&lt;br&gt;* A Message object should provide access to the following for
&lt;br&gt;&amp;nbsp; &amp;nbsp;*any* MIME type if the input is parsable:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;- the raw data that was parsed to create the Message
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;- the Headers built from the header section
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;- the transfer-decoded bytes
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;- if the body is not a MIME multipart, the body instantiated into
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;an object of some sort. &amp;nbsp;The system should provide a way for
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;application programs to determine how payloads of specific MIME
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;types are instantiated into objects. &amp;nbsp;This will presumably be a
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;registration system with a series of default handlers registered by
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;the email package itself for common and useful types, and a generic
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MIME object for types for which there is no specific handler.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;All registrations, even the one for the default 'fallback' object,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;should be overridable by the application.
&lt;br&gt;&lt;br&gt;* The mainline APIs should emit only RFC compliant data. &amp;nbsp;Access to
&lt;br&gt;&amp;nbsp; &amp;nbsp;malformed data (for, eg, error recovery attempts) should be
&lt;br&gt;&amp;nbsp; &amp;nbsp;via alternate APIs.
&lt;br&gt;&lt;br&gt;* When parsing raw data, the email package should do the right thing
&lt;br&gt;&amp;nbsp; &amp;nbsp;wherever possible (respecting the Postel Principle). &amp;nbsp;When it cannot,
&lt;br&gt;&amp;nbsp; &amp;nbsp;it should
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;- construct a defect list that is exposed through the appropriate API
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(the defect list should include anything not RFC compliant, even
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if parsable following the Postel Principle).
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;- return an object that is as close as possible to the object that
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;would have been returned if the raw data had been fully parsable,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;but whose attributes will raise errors if an attempt is made to
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;access an API that would rely on data that was not in fact valid.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(ex: suppose the text body cannot be decoded to Unicode via the
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;declared charset. &amp;nbsp;An object would be returned where accessing the
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string API would raise an error, while the alternate APIs would
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;still provide access to the transfer-decoded data).
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;- the raw data that was parsed to build the object should
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;always be accessible, whether the parse succeeded or failed.
&lt;br&gt;&lt;br&gt;* The API needs to at a minimum have hooks available for an application
&lt;br&gt;&amp;nbsp; &amp;nbsp;to store data on disk rather than holding everything in memory.
&lt;br&gt;&amp;nbsp; &amp;nbsp;This API should provide the ability to trigger disk storage based on
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;- an aggregate message size threshold
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;- a message part size threshold
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;- both
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;The email package should provide a demonstration implementation
&lt;br&gt;&amp;nbsp; &amp;nbsp;of these hooks in the spirit of wsgiref.
&lt;br&gt;&lt;br&gt;* Different use cases require different levels of RFC conformance.
&lt;br&gt;&amp;nbsp; &amp;nbsp;The API should provide both a relaxed and strict API for modifying
&lt;br&gt;&amp;nbsp; &amp;nbsp;the model. &amp;nbsp;(ex: an application might want to use the email
&lt;br&gt;&amp;nbsp; &amp;nbsp;module to manipulate email-like messages but without the 998 character
&lt;br&gt;&amp;nbsp; &amp;nbsp;line length limit). &amp;nbsp;The parser can use the non-strict API when
&lt;br&gt;&amp;nbsp; &amp;nbsp;building the model-plus-defect-list for a non-conformant data
&lt;br&gt;&amp;nbsp; &amp;nbsp;stream. &amp;nbsp;(It may also need additional non-API model methods).
&lt;br&gt;&lt;br&gt;* A registration system should also be provided for transfer-encodings,
&lt;br&gt;&amp;nbsp; &amp;nbsp;with the RFC standard encodings provided by default. &amp;nbsp;This provides
&lt;br&gt;&amp;nbsp; &amp;nbsp;a way to handle new RFC defined encodings and for applications
&lt;br&gt;&amp;nbsp; &amp;nbsp;to implement X- encodings.
&lt;br&gt;&lt;br&gt;* It should be possible for third party extensions to add converters
&lt;br&gt;&amp;nbsp; &amp;nbsp;to the MIME part registration system (see timezones in the datetime
&lt;br&gt;&amp;nbsp; &amp;nbsp;module for a model).
&lt;br&gt;&lt;br&gt;&lt;br&gt;Interesting Ideas
&lt;br&gt;-----------------
&lt;br&gt;&lt;br&gt;* An API for telling the system to store the decoded content of a
&lt;br&gt;&amp;nbsp; &amp;nbsp;MIME part in the filename specified in the MIME headers. &amp;nbsp;(If
&lt;br&gt;&amp;nbsp; &amp;nbsp;the part is already stored on disk by the disk storage hooks,
&lt;br&gt;&amp;nbsp; &amp;nbsp;this might be a simple rename, thus avoiding the data transfer
&lt;br&gt;&amp;nbsp; &amp;nbsp;required if this API is not provided).
&lt;br&gt;&lt;br&gt;* The parsing could be lazy, only parsing the MIME sub-parts on
&lt;br&gt;&amp;nbsp; &amp;nbsp;request. &amp;nbsp;If so, there should be an API available that requests
&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;quot;full parsing&amp;quot; of a Message be done immediately.
&lt;br&gt;&lt;br&gt;* Parsing of the header section and body section could also
&lt;br&gt;&amp;nbsp; &amp;nbsp;possibly be done lazily (though parsing the body requires that at
&lt;br&gt;&amp;nbsp; &amp;nbsp;least a certain minimum set of headers be parsed).
&lt;br&gt;&lt;br&gt;* After the API is fleshed out (and *only* after) we can map
&lt;br&gt;&amp;nbsp; &amp;nbsp;__string__ and __bytes__ to appropriate elements of that API.
&lt;br&gt;&lt;br&gt;* It might be useful for the email package to be able to parse
&lt;br&gt;&amp;nbsp; &amp;nbsp;the non-RFC but common '+' mailbox extension notation. &amp;nbsp;If so this
&lt;br&gt;&amp;nbsp; &amp;nbsp;should be clearly documented as an extension.
&lt;br&gt;&lt;br&gt;* Even the fully-decoded content of a Message could be a Property,
&lt;br&gt;&amp;nbsp; &amp;nbsp;if we also expose a decode method that allows the application to do
&lt;br&gt;&amp;nbsp; &amp;nbsp;the decoding itself (for example to handle weird cases such as Shift
&lt;br&gt;&amp;nbsp; &amp;nbsp;JIS data being labeled as ISO-2022-JP). &amp;nbsp;(This may simply be a specific
&lt;br&gt;&amp;nbsp; &amp;nbsp;case of using the alternate &amp;quot;dirty data&amp;quot; interface.)
&lt;br&gt;&lt;br&gt;&lt;br&gt;Issues
&lt;br&gt;------
&lt;br&gt;&lt;br&gt;* How does the desire for not-quite-ducklike objects for badly formed
&lt;br&gt;&amp;nbsp; &amp;nbsp;input data mesh with the desire for a plugin system for instantiating
&lt;br&gt;&amp;nbsp; &amp;nbsp;the objects that represent the payloads?
&lt;br&gt;&lt;br&gt;* How does the registration system interact with threading? &amp;nbsp;Can different
&lt;br&gt;&amp;nbsp; &amp;nbsp;threads have different registrations?
&lt;br&gt;&lt;br&gt;* We believe that there are no cross-part context items that would
&lt;br&gt;&amp;nbsp; &amp;nbsp;prevent the lazy decoding of MIME parts, but this has not been
&lt;br&gt;&amp;nbsp; &amp;nbsp;confirmed. &amp;nbsp;It is the case that when parsing an inner MIME part, access
&lt;br&gt;&amp;nbsp; &amp;nbsp;to the boundary delimiter for the outer parts is required. &amp;nbsp;There may
&lt;br&gt;&amp;nbsp; &amp;nbsp;also be some issues for semantic parsing with Content-ID references.
&lt;br&gt;&lt;br&gt;* Multipart/report could be both a Message-with-sub-Messages *and* a
&lt;br&gt;&amp;nbsp; &amp;nbsp;single specialized object type; this possibility should be
&lt;br&gt;&amp;nbsp; &amp;nbsp;considered in the API design.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26354287&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Design-Thoughts-Summary-tp26354287p26354287.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26187532</id>
	<title>Re: RFC list page added to wiki</title>
	<published>2009-11-03T14:07:21Z</published>
	<updated>2009-11-03T14:07:21Z</updated>
	<author>
		<name>Barry Warsaw</name>
	</author>
	<content type="html">On Nov 3, 2009, at 4:17 PM, R. David Murray wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; After letting myself get distracted by other matters, I'm back to &amp;nbsp;
&lt;br&gt;&amp;gt; poking
&lt;br&gt;&amp;gt; at the email package. &amp;nbsp;I've added an RFC reference page to the wiki
&lt;br&gt;&amp;gt; based on Stephen's list:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://wiki.python.org/moin/Email%20SIG/RelevantRFCs&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://wiki.python.org/moin/Email%20SIG/RelevantRFCs&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Corrections or additions welcome.
&lt;br&gt;&lt;br&gt;Thanks David.
&lt;br&gt;&lt;br&gt;-B
&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26187532&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;PGP.sig&lt;/strong&gt; (849 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26187532/0/PGP.sig&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p26187532.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26186774</id>
	<title>RFC list page added to wiki</title>
	<published>2009-11-03T13:17:45Z</published>
	<updated>2009-11-03T13:17:45Z</updated>
	<author>
		<name>R. David Murray</name>
	</author>
	<content type="html">After letting myself get distracted by other matters, I'm back to poking
&lt;br&gt;at the email package. &amp;nbsp;I've added an RFC reference page to the wiki
&lt;br&gt;based on Stephen's list:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://wiki.python.org/moin/Email%20SIG/RelevantRFCs&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://wiki.python.org/moin/Email%20SIG/RelevantRFCs&lt;/a&gt;&lt;br&gt;&lt;br&gt;Corrections or additions welcome.
&lt;br&gt;&lt;br&gt;--David
&lt;br&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26186774&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p26186774.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26014476</id>
	<title>Re: invertability and idempotence</title>
	<published>2009-10-22T11:00:33Z</published>
	<updated>2009-10-22T11:00:33Z</updated>
	<author>
		<name>Stephen J. Turnbull</name>
	</author>
	<content type="html">Andrew McNamara writes:
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt; &amp;gt; didn't want to introduce new terminology. But referring to this:
&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt; &amp;gt; 
&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;generate(parse(msg)) == msg
&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt; &amp;gt; 
&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt; &amp;gt; as &amp;quot;idempotency&amp;quot; is perfectly valid in my opinion (as in, applying an
&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt; &amp;gt; operation multiple times produces the same result). 
&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt;
&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt;That would be generate(generate(msg)) == generate(msg) or
&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt;parse(parse(email)) == parse(email). &amp;nbsp;The input and output of
&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt;these functions are of *different types*, they cannot possibly be
&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt;idempotent.
&lt;br&gt;&amp;nbsp;&amp;gt; 
&lt;br&gt;&amp;nbsp;&amp;gt; You're splitting hairs - the operation &amp;quot;generate(parse(X))&amp;quot; is
&lt;br&gt;&amp;nbsp;&amp;gt; idempotent, and that's what I was referring to.
&lt;br&gt;&lt;br&gt;Yes and no. &amp;nbsp;The equation above does imply idempotency, but it is a
&lt;br&gt;much stronger statement: generate(parse()) is the identity. &amp;nbsp;That
&lt;br&gt;stronger statement could be useful in practice, but it could also be
&lt;br&gt;expensive to implement. &amp;nbsp;That tension could engender flamewars if the
&lt;br&gt;requirement is expressed by the word &amp;quot;idempotency&amp;quot; but the intent is
&lt;br&gt;&amp;quot;identity&amp;quot;.
&lt;br&gt;&lt;br&gt;For example, suppose that for MIME multipart messages, generate() uses
&lt;br&gt;&amp;quot;$%$%$%$%$%$&amp;quot; as the separator as long as no component contains that
&lt;br&gt;string. &amp;nbsp;Then generate(parse(msg)) will be *equivalent* but not
&lt;br&gt;*identical* to msg for most messages received from non-Python-email-
&lt;br&gt;using MUAs. &amp;nbsp;generate(parse()) is idempotent, though. &amp;nbsp;I don't think
&lt;br&gt;the folks who ask for &amp;quot;idempotency&amp;quot; would be satisfied with that!
&lt;br&gt;&lt;br&gt;As I said earlier, if we're going to use the word &amp;quot;idempotent&amp;quot; to mean
&lt;br&gt;&amp;quot;invertible&amp;quot;, that's established practice, so we footnote the
&lt;br&gt;Humpty-Dumpty-ism, and I can live with that. &amp;nbsp;But if we're going to
&lt;br&gt;try to be more accurate, let's be fully accurate.
&lt;br&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26014476&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p26014476.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26008411</id>
	<title>Re: invertability and idempotence</title>
	<published>2009-10-22T04:36:12Z</published>
	<updated>2009-10-22T04:36:12Z</updated>
	<author>
		<name>Barry Warsaw</name>
	</author>
	<content type="html">On Oct 21, 2009, at 6:58 PM, R. David Murray wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; But it turns out that idempotence does have a meaning in the context
&lt;br&gt;&amp;gt; of the email module, so I think I need to remove 'depreciated' from
&lt;br&gt;&amp;gt; my glossary[1] entry for it, and explain what it means in the context
&lt;br&gt;&amp;gt; of the email module.
&lt;br&gt;&lt;br&gt;I think you're onto something here.
&lt;br&gt;&lt;br&gt;&amp;gt; For background, see issue 7119[2].
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Here's what I propose: _invertability_ applies to the data path
&lt;br&gt;&amp;gt; into the parser and out of the generator. &amp;nbsp;That is:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;generate(parse(msg)) == msg
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; should be true whenever possible.
&lt;br&gt;&lt;br&gt;Agreed, where 'msg' in this context means the message text or bytes.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On the other hand, when _constructing_ a message, sometimes not all &amp;nbsp;
&lt;br&gt;&amp;gt; data
&lt;br&gt;&amp;gt; is filled in (in the example above, it is the MIME boundary marker).
&lt;br&gt;&amp;gt; In that case, it is important (I think, please discuss :) that &amp;nbsp;
&lt;br&gt;&amp;gt; generating
&lt;br&gt;&amp;gt; the message maintain _idempotency_: once you have generated the &amp;nbsp;
&lt;br&gt;&amp;gt; message,
&lt;br&gt;&amp;gt; then if you have not further mutated the message, generating the &amp;nbsp;
&lt;br&gt;&amp;gt; message
&lt;br&gt;&amp;gt; again should produce the _same_ output. &amp;nbsp;That is:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;generate(msg) == generate(msg)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; even though the state of msg may change after the _first_ generate &amp;nbsp;
&lt;br&gt;&amp;gt; call.
&lt;/div&gt;&lt;/div&gt;&amp;quot;Idempotent&amp;quot; means: &amp;quot;multiple applications of the operation do not &amp;nbsp;
&lt;br&gt;change the result&amp;quot;. &amp;nbsp;So here where the operation is to take a message &amp;nbsp;
&lt;br&gt;object and generate a stream of text or bytes, this should absolutely &amp;nbsp;
&lt;br&gt;return the same stream if the object is not mutated between calls. &amp;nbsp;I &amp;nbsp;
&lt;br&gt;think it's fair though that if the model is manipulated in any way, we &amp;nbsp;
&lt;br&gt;make no guarantees of idempotency, though we should strive for minimal &amp;nbsp;
&lt;br&gt;differences.
&lt;br&gt;&lt;br&gt;-Barry
&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26008411&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;PGP.sig&lt;/strong&gt; (849 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26008411/0/PGP.sig&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p26008411.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26007145</id>
	<title>Re: invertability and idempotence</title>
	<published>2009-10-22T02:42:43Z</published>
	<updated>2009-10-22T02:42:43Z</updated>
	<author>
		<name>Andrew McNamara</name>
	</author>
	<content type="html">&lt;div class='shrinkable-quote'&gt;&amp;gt; &amp;gt; didn't want to introduce new terminology. But referring to this:
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;generate(parse(msg)) == msg
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; as &amp;quot;idempotency&amp;quot; is perfectly valid in my opinion (as in, applying an
&lt;br&gt;&amp;gt; &amp;gt; operation multiple times produces the same result). 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;That would be generate(generate(msg)) == generate(msg) or
&lt;br&gt;&amp;gt;parse(parse(email)) == parse(email). &amp;nbsp;The input and output of
&lt;br&gt;&amp;gt;these functions are of *different types*, they cannot possibly be
&lt;br&gt;&amp;gt;idempotent.
&lt;/div&gt;&lt;br&gt;You're splitting hairs - the operation &amp;quot;generate(parse(X))&amp;quot; is idempotent,
&lt;br&gt;and that's what I was referring to. 
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Andrew McNamara, Senior Developer, Object Craft
&lt;br&gt;&lt;a href=&quot;http://www.object-craft.com.au/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.object-craft.com.au/&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26007145&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p26007145.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26005667</id>
	<title>Re: invertability and idempotence</title>
	<published>2009-10-22T01:00:13Z</published>
	<updated>2009-10-22T01:00:13Z</updated>
	<author>
		<name>Stephen J. Turnbull</name>
	</author>
	<content type="html">Andrew McNamara writes:
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; The discussion had referred to idempotency up until that point, and I
&lt;br&gt;&amp;nbsp;&amp;gt; didn't want to introduce new terminology. But referring to this:
&lt;br&gt;&amp;nbsp;&amp;gt; 
&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;generate(parse(msg)) == msg
&lt;br&gt;&amp;nbsp;&amp;gt; 
&lt;br&gt;&amp;nbsp;&amp;gt; as &amp;quot;idempotency&amp;quot; is perfectly valid in my opinion (as in, applying an
&lt;br&gt;&amp;nbsp;&amp;gt; operation multiple times produces the same result). 
&lt;br&gt;&lt;br&gt;That would be generate(generate(msg)) == generate(msg) or
&lt;br&gt;parse(parse(email)) == parse(email). &amp;nbsp;The input and output of
&lt;br&gt;these functions are of *different types*, they cannot possibly be
&lt;br&gt;idempotent.
&lt;br&gt;&lt;br&gt;I'm +1 on changing to use &amp;quot;invertible&amp;quot;, -0 on continuing to use
&lt;br&gt;&amp;quot;idempotent&amp;quot; (since it's the traditional idiom), and -1 on using
&lt;br&gt;&amp;quot;idempotent&amp;quot; to mean &amp;quot;is deterministic&amp;quot;, ie, generate(msg) ==
&lt;br&gt;generate(msg).
&lt;br&gt;&lt;br&gt;If msg changes state in an irrelevant way, it would be nice to produce
&lt;br&gt;the same output from generate. &amp;nbsp;But that is not &amp;quot;idempotency&amp;quot;.
&lt;br&gt;&lt;br&gt;And we would need to specify precisely what irrelevant means. &amp;nbsp;For
&lt;br&gt;example, if a client of the Message class decides to specify the MIME
&lt;br&gt;boundary explicitly, then the output of generate has to change IMO.
&lt;br&gt;OTOH, many MIME implementations put the time of day or the generating
&lt;br&gt;process into the MIME boundary. &amp;nbsp;This is unnecessary (boundaries need
&lt;br&gt;to be unique only message-wide, and the email package can adjust the
&lt;br&gt;boundary to not conflict with message content, eg, Emacs/Gnus uses
&lt;br&gt;something like &amp;quot;-=-=-=-=-&amp;quot; by default), and I would hope that email
&lt;br&gt;avoids such practices when possible.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26005667&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p26005667.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26004093</id>
	<title>Re: invertability and idempotence</title>
	<published>2009-10-21T21:58:24Z</published>
	<updated>2009-10-21T21:58:24Z</updated>
	<author>
		<name>Andrew McNamara</name>
	</author>
	<content type="html">&amp;gt;You are referring here to invertability, rather than idempotence.
&lt;br&gt;&lt;br&gt;The discussion had referred to idempotency up until that point, and I
&lt;br&gt;didn't want to introduce new terminology. But referring to this:
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;generate(parse(msg)) == msg
&lt;br&gt;&lt;br&gt;as &amp;quot;idempotency&amp;quot; is perfectly valid in my opinion (as in, applying an
&lt;br&gt;operation multiple times produces the same result). 
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Andrew McNamara, Senior Developer, Object Craft
&lt;br&gt;&lt;a href=&quot;http://www.object-craft.com.au/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.object-craft.com.au/&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26004093&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p26004093.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26001570</id>
	<title>invertability and idempotence</title>
	<published>2009-10-21T15:58:42Z</published>
	<updated>2009-10-21T15:58:42Z</updated>
	<author>
		<name>R. David Murray</name>
	</author>
	<content type="html">On Mon, 19 Oct 2009 at 15:39, Andrew McNamara wrote:
&lt;br&gt;&amp;gt;&amp;gt; Just to ramble a little longer, it's been argued that we should give
&lt;br&gt;&amp;gt;&amp;gt; up on idempotency, but I'm not convinced. &amp;nbsp;I think people want to see
&lt;br&gt;&amp;gt;&amp;gt; an email message they throw into the system come out the other end as
&lt;br&gt;&amp;gt;&amp;gt; closely as possible (well, /exactly/ for well-formed messages).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I, for one, would be disappointed if we lost idempotency. If people want
&lt;br&gt;&amp;gt; a use-case, think of SpamBayes, where we read the message, do our best
&lt;br&gt;&amp;gt; to analyse it, then insert a header or two. If this mangled messages,
&lt;br&gt;&amp;gt; the email module would be nearly useless to SB.
&lt;br&gt;&lt;br&gt;You are referring here to invertability, rather than idempotence.
&lt;br&gt;&lt;br&gt;But it turns out that idempotence does have a meaning in the context
&lt;br&gt;of the email module, so I think I need to remove 'depreciated' from
&lt;br&gt;my glossary[1] entry for it, and explain what it means in the context
&lt;br&gt;of the email module.
&lt;br&gt;&lt;br&gt;For background, see issue 7119[2].
&lt;br&gt;&lt;br&gt;Here's what I propose: _invertability_ applies to the data path
&lt;br&gt;into the parser and out of the generator. &amp;nbsp;That is:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;generate(parse(msg)) == msg
&lt;br&gt;&lt;br&gt;should be true whenever possible.
&lt;br&gt;&lt;br&gt;On the other hand, when _constructing_ a message, sometimes not all data
&lt;br&gt;is filled in (in the example above, it is the MIME boundary marker).
&lt;br&gt;In that case, it is important (I think, please discuss :) that generating
&lt;br&gt;the message maintain _idempotency_: once you have generated the message,
&lt;br&gt;then if you have not further mutated the message, generating the message
&lt;br&gt;again should produce the _same_ output. &amp;nbsp;That is:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;generate(msg) == generate(msg)
&lt;br&gt;&lt;br&gt;even though the state of msg may change after the _first_ generate call.
&lt;br&gt;&lt;br&gt;--David
&lt;br&gt;&lt;br&gt;[1] &lt;a href=&quot;http://wiki.python.org/moin/Email%20SIG/Glossary&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://wiki.python.org/moin/Email%20SIG/Glossary&lt;/a&gt;&lt;br&gt;[2] &lt;a href=&quot;http://bugs.python.org/issue7119&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://bugs.python.org/issue7119&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26001570&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p26001570.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25953391</id>
	<title>Re: fixing the current email module</title>
	<published>2009-10-18T22:05:10Z</published>
	<updated>2009-10-18T22:05:10Z</updated>
	<author>
		<name>Andrew McNamara</name>
	</author>
	<content type="html">&amp;gt;wire-format is potentially misleading because the RFCs define line- 
&lt;br&gt;&amp;gt;endings as CRLF, but we accept system native line-endings, and &amp;nbsp;
&lt;br&gt;&amp;gt;sometimes output them too.
&lt;br&gt;&lt;br&gt;And, in some contexts, when forwarding e-mail it is important that we
&lt;br&gt;emit exactly the line endings we received, without trying to be &amp;quot;helpful&amp;quot;
&lt;br&gt;and &amp;quot;fix&amp;quot; them. &amp;nbsp;But, in the case of text content inserted into a message,
&lt;br&gt;I think we should convert the system line endings into CRLF (possibly with
&lt;br&gt;some way to override this - a &amp;quot;literal&amp;quot; mode).
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Andrew McNamara, Senior Developer, Object Craft
&lt;br&gt;&lt;a href=&quot;http://www.object-craft.com.au/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.object-craft.com.au/&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25953391&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p25953391.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25953311</id>
	<title>Re: fixing the current email module</title>
	<published>2009-10-18T21:50:26Z</published>
	<updated>2009-10-18T21:50:26Z</updated>
	<author>
		<name>Andrew McNamara</name>
	</author>
	<content type="html">&lt;div class='shrinkable-quote'&gt;&amp;gt; &amp;gt; Your &amp;quot;hit me with your best shot&amp;quot; comment indicates that you want a
&lt;br&gt;&amp;gt; &amp;gt; failure code or exception when the data is bad, and then a way to
&lt;br&gt;&amp;gt; &amp;gt; &amp;quot;retry accepting errors&amp;quot;?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;My curent thinking is that the email module should return an object
&lt;br&gt;&amp;gt;representing a partial parse. &amp;nbsp;The way that you find out if it is
&lt;br&gt;&amp;gt;partial is to try to access some data that &amp;quot;should&amp;quot; be in the object.
&lt;br&gt;&amp;gt;If the parse succeeded, the accessor returns the data (which might be
&lt;br&gt;&amp;gt;empty). &amp;nbsp;If the parse did not succeed, you get an AttributeError.
&lt;br&gt;&amp;gt;(This is just a paraphrase of what I wrote in response to Oleg.)
&lt;/div&gt;&lt;br&gt;I agree - try to extract as much intelligence as we can from the malformed
&lt;br&gt;message, and hold the unparseable bits in a &amp;quot;bad chunk&amp;quot; object. If
&lt;br&gt;possible, when reserialising the message, e-mail the bad chunk verbatim,
&lt;br&gt;or possibly with minor fixes to keep the containing MIME structure legal
&lt;br&gt;if we have to. But I'd rather see &amp;quot;garbage-in and same garbage-out&amp;quot;,
&lt;br&gt;than &amp;quot;garbage-in and even worse garbage out&amp;quot;.
&lt;br&gt;&lt;br&gt;Maybe the parsing should lazy where possible: don't recurse deeper
&lt;br&gt;into the structure if all we're doing is looking at a top level header,
&lt;br&gt;for instance.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Andrew McNamara, Senior Developer, Object Craft
&lt;br&gt;&lt;a href=&quot;http://www.object-craft.com.au/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.object-craft.com.au/&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25953311&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p25953311.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25953299</id>
	<title>Re: fixing the current email module</title>
	<published>2009-10-18T21:39:06Z</published>
	<updated>2009-10-18T21:39:06Z</updated>
	<author>
		<name>Andrew McNamara</name>
	</author>
	<content type="html">&amp;gt;Just to ramble a little longer, it's been argued that we should give &amp;nbsp;
&lt;br&gt;&amp;gt;up on idempotency, but I'm not convinced. &amp;nbsp;I think people want to see &amp;nbsp;
&lt;br&gt;&amp;gt;an email message they throw into the system come out the other end as &amp;nbsp;
&lt;br&gt;&amp;gt;closely as possible (well, /exactly/ for well-formed messages).
&lt;br&gt;&lt;br&gt;I, for one, would be disappointed if we lost idempotency. If people want
&lt;br&gt;a use-case, think of SpamBayes, where we read the message, do our best
&lt;br&gt;to analyse it, then insert a header or two. If this mangled messages,
&lt;br&gt;the email module would be nearly useless to SB.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Andrew McNamara, Senior Developer, Object Craft
&lt;br&gt;&lt;a href=&quot;http://www.object-craft.com.au/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.object-craft.com.au/&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25953299&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p25953299.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25866835</id>
	<title>Re: fixing the current email module</title>
	<published>2009-10-12T20:59:13Z</published>
	<updated>2009-10-12T20:59:13Z</updated>
	<author>
		<name>Stephen J. Turnbull</name>
	</author>
	<content type="html">Barry Warsaw writes:
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; I would proposal a radical suggestion: we treat backward compatibility &amp;nbsp;
&lt;br&gt;&amp;nbsp;&amp;gt; the way Python 3 did. &amp;nbsp;Nice to keep, but we can throw it over the side &amp;nbsp;
&lt;br&gt;&amp;nbsp;&amp;gt; in order to fix the warts. &amp;nbsp;We'll worry about migration strategy later.
&lt;br&gt;&lt;br&gt;+1
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; Aside: I would really like to have a much more @property based API &amp;nbsp;
&lt;br&gt;&amp;nbsp;&amp;gt; where appropriate.
&lt;br&gt;&lt;br&gt;+1
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; E.g. Message.get_content_type() would be Message.content_type. &amp;nbsp;And
&lt;br&gt;&amp;nbsp;&amp;gt; in this case we'd probably have message.payload_bytes or some such.
&lt;br&gt;&amp;nbsp;&amp;gt; Decoding may require additional parameters so it will probably be a
&lt;br&gt;&amp;nbsp;&amp;gt; method.
&lt;br&gt;&lt;br&gt;Maybe, but in general those parameters can be deduced from the
&lt;br&gt;metadata. &amp;nbsp;If we can use those defaults often enough, then the
&lt;br&gt;default-decoded version can be a property too.
&lt;br&gt;&lt;br&gt;We would have to provide alternatives, though. &amp;nbsp;I've seen Shift JIS
&lt;br&gt;encoded Japanese labelled &amp;quot;ISO-2022-JP&amp;quot;, and apparently many Japanese
&lt;br&gt;MUAs actually decode that to Japanese! &amp;nbsp;Not suggesting that we should
&lt;br&gt;do the same, but probably the generic function that is used to decode
&lt;br&gt;should be exposed as a method so that clients who encounter such
&lt;br&gt;nonsense can deal with it, and override any of the metadata.
&lt;br&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25866835&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p25866835.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25863098</id>
	<title>Re: fixing the current email module</title>
	<published>2009-10-12T13:54:17Z</published>
	<updated>2009-10-12T13:54:17Z</updated>
	<author>
		<name>Barry Warsaw</name>
	</author>
	<content type="html">On Oct 10, 2009, at 11:23 PM, Stephen J. Turnbull wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Right. &amp;nbsp;To riff on the RFC vs. not theme [&amp;quot;Barry, pick up the bass
&lt;br&gt;&amp;gt; line, need more bottom here!&amp;quot;], I think we should pick a list of RFCs
&lt;br&gt;&amp;gt; we &amp;quot;promise&amp;quot; to implement as &amp;quot;defining&amp;quot; email; if we reserve any
&lt;br&gt;&amp;gt; structures as &amp;quot;too obscure for us to parse,&amp;quot; we should say so (and
&lt;br&gt;&amp;gt; reference chapter and verse of the Holy RFC). &amp;nbsp;On the other hand, of
&lt;br&gt;&amp;gt; course as we discover common use cases for which precise
&lt;br&gt;&amp;gt; specifications can be given, we should be flexible and implement them.
&lt;br&gt;&amp;gt; But there should be no rush.
&lt;br&gt;&lt;br&gt;Although of course Rush is the most awesomest band EVAR. &amp;nbsp;But I'm &amp;nbsp;
&lt;br&gt;slappin' and poppin' to your groove here my bruthah.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Which RFCs?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; First of all, the STD 11 series (RFCs 733, 822, 2822, 5322). &amp;nbsp;Here we
&lt;br&gt;&amp;gt; have to worry about the standard's recommended format vs. the obsolete
&lt;br&gt;&amp;gt; format because of the Postel principle. &amp;nbsp;AFAIK, there is no reason not
&lt;br&gt;&amp;gt; to insist on *producing* strictly RFC 5322 conformant messages, but I
&lt;br&gt;&amp;gt; think we should implement both strict and lax parsers. &amp;nbsp;The lax parser
&lt;br&gt;&amp;gt; is for &amp;quot;daily use&amp;quot;, the strict parser for validation.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Second, the basic MIME structure RFCs: 2045-2049, 2231. &amp;nbsp;(Some of
&lt;br&gt;&amp;gt; these have been at least partially superseded by now, I think.)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The mailing list header RFCs: 2369 and 2919.
&lt;/div&gt;&lt;/div&gt;Yep, yep, and yep.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Not RFCs, per se, but an auxiliary module should provide the
&lt;br&gt;&amp;gt; registered IANA data for the above RFCs.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Strictly speaking outside of the email module, but we make use of URLs
&lt;br&gt;&amp;gt; (RFC 3986 -- superseded?) and mimetypes data (this overlaps
&lt;br&gt;&amp;gt; substantially with the &amp;quot;registered IANA data&amp;quot;. &amp;nbsp;We need to coordinate
&lt;br&gt;&amp;gt; with the responsible maintainers for those.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Ditto coordinating with modules that we share a lot of structure with,
&lt;br&gt;&amp;gt; the &amp;quot;not email but very similar&amp;quot; like HTTP (RFC 2616), and netnews
&lt;br&gt;&amp;gt; (NNTP = 3397 and RFC 1036).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Which extensions?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Er, don't you think the above is enough for now?&amp;lt;wink&amp;gt;
&lt;/div&gt;&lt;/div&gt;Surely is, at least until that U$1M grant from the PSF comes through &amp;nbsp;
&lt;br&gt;&amp;lt;wink&amp;gt;. &amp;nbsp;Oh wait, we blew that on lunch at Pycon 2009.
&lt;br&gt;&lt;br&gt;-Barry
&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25863098&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;PGP.sig&lt;/strong&gt; (849 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/25863098/0/PGP.sig&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p25863098.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25863061</id>
	<title>Re: fixing the current email module</title>
	<published>2009-10-12T13:47:31Z</published>
	<updated>2009-10-12T13:47:31Z</updated>
	<author>
		<name>Barry Warsaw</name>
	</author>
	<content type="html">On Oct 10, 2009, at 8:47 PM, Stephen J. Turnbull wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; The question of &amp;quot;what should we do about broken mail&amp;quot; at this point
&lt;br&gt;&amp;gt; has three components:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (1) To what level do we (ie, the email module) promise to parse
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;conforming wire format into useful objects?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (2) For nonconforming input, when is it OK to raise an error and
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;return to the calling client rather than handle it ourselves?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (3) What is the API for accessing and/or mutating unparsed data, and
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;requesting a reparse?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I don't think we should go any farther than that.
&lt;/div&gt;&lt;/div&gt;Agreed!
&lt;br&gt;&lt;br&gt;-Barry
&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25863061&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;PGP.sig&lt;/strong&gt; (849 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/25863061/0/PGP.sig&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p25863061.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25862970</id>
	<title>Re: fixing the current email module</title>
	<published>2009-10-12T13:45:09Z</published>
	<updated>2009-10-12T13:45:09Z</updated>
	<author>
		<name>Barry Warsaw</name>
	</author>
	<content type="html">On Oct 10, 2009, at 5:20 PM, R. David Murray wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; The other is a Glossary[2]. &amp;nbsp;I think most of it accurately reflects &amp;nbsp;
&lt;br&gt;&amp;gt; the
&lt;br&gt;&amp;gt; consensus here, but in it I'm proposing to use the term 'transfer- 
&lt;br&gt;&amp;gt; decoded'
&lt;br&gt;&amp;gt; for #3, and 'transfer-encoded' as an alternative to 'wire-format' just
&lt;br&gt;&amp;gt; for symmetry. &amp;nbsp;Comments and suggestions welcome.
&lt;br&gt;&lt;br&gt;wire-format is potentially misleading because the RFCs define line- 
&lt;br&gt;endings as CRLF, but we accept system native line-endings, and &amp;nbsp;
&lt;br&gt;sometimes output them too.
&lt;br&gt;&lt;br&gt;ready-for-another-can-of-worms-yum!-ly y'rs,
&lt;br&gt;-Barry
&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25862970&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;PGP.sig&lt;/strong&gt; (849 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/25862970/0/PGP.sig&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p25862970.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25862929</id>
	<title>Re: fixing the current email module</title>
	<published>2009-10-12T13:41:48Z</published>
	<updated>2009-10-12T13:41:48Z</updated>
	<author>
		<name>Barry Warsaw</name>
	</author>
	<content type="html">On Oct 9, 2009, at 2:59 PM, Glenn Linderman wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; It would be good though to have standardized terms for easier &amp;nbsp;
&lt;br&gt;&amp;gt; communication. &amp;nbsp;Maybe as they are chosen, they could be added to &amp;nbsp;
&lt;br&gt;&amp;gt; that Wiki RDM set up?
&lt;br&gt;&lt;br&gt;I like raw, transfer-decoded, decoded (or maybe fully-decoded). &amp;nbsp;As &amp;nbsp;
&lt;br&gt;I've mentioned before, I don't think the Message or Header APIs need &amp;nbsp;
&lt;br&gt;to directly support transfer-decoded.
&lt;br&gt;&lt;br&gt;&amp;gt; Separate APIs would be clearer, but for compatibility, &amp;nbsp;
&lt;br&gt;&amp;gt; should .get_payload() be retained, with the flag?
&lt;br&gt;&lt;br&gt;No. &amp;nbsp;It was a mistake that should be taken out back and shot.
&lt;br&gt;&lt;br&gt;I would proposal a radical suggestion: we treat backward compatibility &amp;nbsp;
&lt;br&gt;the way Python 3 did. &amp;nbsp;Nice to keep, but we can throw it over the side &amp;nbsp;
&lt;br&gt;in order to fix the warts. &amp;nbsp;We'll worry about migration strategy later.
&lt;br&gt;&lt;br&gt;Aside: I would really like to have a much more @property based API &amp;nbsp;
&lt;br&gt;where appropriate. &amp;nbsp;E.g. Message.get_content_type() would be &amp;nbsp;
&lt;br&gt;Message.content_type. &amp;nbsp;And in this case we'd probably have &amp;nbsp;
&lt;br&gt;message.payload_bytes or some such. &amp;nbsp;Decoding may require additional &amp;nbsp;
&lt;br&gt;parameters so it will probably be a method.
&lt;br&gt;&lt;br&gt;&amp;gt; Sure, a registration system is fine. &amp;nbsp; It could work for any type &amp;nbsp;
&lt;br&gt;&amp;gt; that has a method that can be registered, that accepts a binary BLOB &amp;nbsp;
&lt;br&gt;&amp;gt; and returns an appropriate typed and functioning object that can &amp;nbsp;
&lt;br&gt;&amp;gt; manipulate that type. &amp;nbsp;That would mean that the application would &amp;nbsp;
&lt;br&gt;&amp;gt; have to make all the registration calls up front, instead of making &amp;nbsp;
&lt;br&gt;&amp;gt; the API calls when the objects are retrieved. &amp;nbsp;Basically, if the &amp;nbsp;
&lt;br&gt;&amp;gt; email package doesn't have a registration system that the &amp;nbsp;
&lt;br&gt;&amp;gt; application can use, the application has to invent its own, so this &amp;nbsp;
&lt;br&gt;&amp;gt; is work that could benefit all applications.
&lt;br&gt;&lt;br&gt;I'm sure there will be lots of default content-types registered, and &amp;nbsp;
&lt;br&gt;there ought to be a &amp;quot;default&amp;quot; or fallback converter that can be &amp;nbsp;
&lt;br&gt;overridden. &amp;nbsp;It should also be possible for third party extensions to &amp;nbsp;
&lt;br&gt;add additional converters. &amp;nbsp;Models for this would be timzeone &amp;nbsp;
&lt;br&gt;additions for datetime, and codecs.
&lt;br&gt;&lt;br&gt;&amp;gt; Actually, although it is not common practice to have encodings other &amp;nbsp;
&lt;br&gt;&amp;gt; than the RFC defined base64 and quoted-printable, a registration &amp;nbsp;
&lt;br&gt;&amp;gt; system for converting from #1 to #3, with appropriate defaults for &amp;nbsp;
&lt;br&gt;&amp;gt; base64, quoted-printable, binary, 7bit, 8bit, would be appropriate,
&lt;br&gt;&lt;br&gt;That makes sense.
&lt;br&gt;&lt;br&gt;-Barry
&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25862929&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;PGP.sig&lt;/strong&gt; (849 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/25862929/0/PGP.sig&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p25862929.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25862733</id>
	<title>Re: fixing the current email module</title>
	<published>2009-10-12T13:30:28Z</published>
	<updated>2009-10-12T13:30:28Z</updated>
	<author>
		<name>Barry Warsaw</name>
	</author>
	<content type="html">On Oct 10, 2009, at 9:59 AM, Stephen J. Turnbull wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Both. &amp;nbsp;I *believe* (but it needs to be checked) that in a correctly
&lt;br&gt;&amp;gt; formed multipart MIME object (message or part), any internal structure
&lt;br&gt;&amp;gt; is context-free within the MIME boundaries. &amp;nbsp;If that is so, then
&lt;br&gt;&amp;gt; individual parts of the object can be stored in raw form and parsed
&lt;br&gt;&amp;gt; lazily.
&lt;br&gt;&lt;br&gt;I too /think/ that's correct. &amp;nbsp;There are some MIME content-types that &amp;nbsp;
&lt;br&gt;cause parts to be related (e.g. multipart/alternative and multipart/ 
&lt;br&gt;related), but those are all operating at a higher level.
&lt;br&gt;&lt;br&gt;In practice it probably makes sense to parse all the headers right &amp;nbsp;
&lt;br&gt;away. &amp;nbsp;Content-Type has the most bearing on parsing the rest of the &amp;nbsp;
&lt;br&gt;stuff, so by that time you already need to parse parameters to e.g. &amp;nbsp;
&lt;br&gt;get the boundary. &amp;nbsp;Early on I claimed that headers were so manageable &amp;nbsp;
&lt;br&gt;in practice that we could implement an ordered-dictionary with &amp;nbsp;
&lt;br&gt;duplicates as a simple list, with linear searching and nobody would &amp;nbsp;
&lt;br&gt;notice. &amp;nbsp;I think nobody has noticed ;).
&lt;br&gt;&lt;br&gt;Lazy parsing of the body does make sense. &amp;nbsp;You only need to parse &amp;nbsp;
&lt;br&gt;enough to find end boundaries, or recurse into parsing an embedded &amp;nbsp;
&lt;br&gt;part. &amp;nbsp;This is how the parser currently works anyway.
&lt;br&gt;&lt;br&gt;-Barry
&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25862733&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;PGP.sig&lt;/strong&gt; (849 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/25862733/0/PGP.sig&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p25862733.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25862537</id>
	<title>Re: fixing the current email module</title>
	<published>2009-10-12T13:19:34Z</published>
	<updated>2009-10-12T13:19:34Z</updated>
	<author>
		<name>Barry Warsaw</name>
	</author>
	<content type="html">On Oct 9, 2009, at 8:54 PM, Glenn Linderman wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; That certainly works, but it isn't very helpful... that forces the &amp;nbsp;
&lt;br&gt;&amp;gt; client application to reproduce the logic to parse the header value &amp;nbsp;
&lt;br&gt;&amp;gt; and decode the parts that can be decoded successfully, and that is &amp;nbsp;
&lt;br&gt;&amp;gt; exactly the sort of thing Stephen was complaining about when he &amp;nbsp;
&lt;br&gt;&amp;gt; thought I was suggesting that to be a requirement (but he was &amp;nbsp;
&lt;br&gt;&amp;gt; confused about what I was suggesting).
&lt;br&gt;&lt;br&gt;There are/will be utilities in the email package to make this easy. &amp;nbsp;I &amp;nbsp;
&lt;br&gt;don't think there's a ton of benefit to be had by supporting transport- 
&lt;br&gt;decoded directly in the Message or Header API.
&lt;br&gt;&lt;br&gt;-Barry
&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25862537&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;PGP.sig&lt;/strong&gt; (849 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/25862537/0/PGP.sig&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p25862537.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25862511</id>
	<title>Re: fixing the current email module</title>
	<published>2009-10-12T13:18:32Z</published>
	<updated>2009-10-12T13:18:32Z</updated>
	<author>
		<name>Barry Warsaw</name>
	</author>
	<content type="html">On Oct 9, 2009, at 7:20 PM, R. David Murray wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; IMO, the appropriate way for the email package to provide the API you
&lt;br&gt;&amp;gt; are talking about is it provide the client with a way to get at the &amp;nbsp;
&lt;br&gt;&amp;gt; raw
&lt;br&gt;&amp;gt; byte string, which I think everyone agrees on. &amp;nbsp;If the client wants to
&lt;br&gt;&amp;gt; decode it as if it were latin-1 to process it, it can then do that.
&lt;br&gt;&lt;br&gt;I agree. &amp;nbsp;I'm running out of time to participate in this lengthy &amp;nbsp;
&lt;br&gt;thread, but I just wanted to say that of the 3 accessors (raw, &amp;nbsp;
&lt;br&gt;transport-decoded, fully-decoded) I'm not sure transport-decoded is &amp;nbsp;
&lt;br&gt;all that interesting. &amp;nbsp;I wouldn't support it directly in the API. &amp;nbsp;I &amp;nbsp;
&lt;br&gt;think they library's clients are mostly going to be interested in raw &amp;nbsp;
&lt;br&gt;or fully-decoded values, and there will be plenty of library utilities &amp;nbsp;
&lt;br&gt;to get from raw to transport-decoded if they really want it.
&lt;br&gt;&lt;br&gt;-Barry
&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25862511&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;PGP.sig&lt;/strong&gt; (849 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/25862511/0/PGP.sig&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p25862511.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25841710</id>
	<title>Re: fixing the current email module</title>
	<published>2009-10-11T02:03:21Z</published>
	<updated>2009-10-11T02:03:21Z</updated>
	<author>
		<name>Stephen J. Turnbull</name>
	</author>
	<content type="html">Glenn Linderman writes:
&lt;br&gt;&amp;nbsp;&amp;gt; On approximately 10/10/2009 8:23 PM, came the following characters from 
&lt;br&gt;&amp;nbsp;&amp;gt; the keyboard of Stephen J. Turnbull:
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt; I don't think your use case of prepending a mailing list's topic or
&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt; serial number to an unparseable subject is realistic; in all lists I
&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt; know of such a message would be held for moderation, or even discarded
&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt; outright as spam.
&lt;br&gt;&amp;nbsp;&amp;gt; 
&lt;br&gt;&amp;nbsp;&amp;gt; So if the subject is unparseable, what is the moderator to do?
&lt;br&gt;&lt;br&gt;That's her problem, not ours. &amp;nbsp;I can think of a number of things she
&lt;br&gt;can do, starting with bouncing the mail back to sender with a note
&lt;br&gt;that it was broken, please fix. &amp;nbsp;If the moderator is me, I might load
&lt;br&gt;the mail into XEmacs and see if Gnus can grok it. &amp;nbsp;Etc.
&lt;br&gt;&lt;br&gt;If and when we discover there are &amp;quot;best practices&amp;quot; for this situation,
&lt;br&gt;we should help automate them. &amp;nbsp;Until then, &amp;quot;it broke -- here are all
&lt;br&gt;the pieces&amp;quot; is what we should say, IMO.
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; The more we understand/discuss about how different client can function, 
&lt;br&gt;&amp;nbsp;&amp;gt; the better we can design the email package.
&lt;br&gt;&lt;br&gt;Sure, but about this level of discussion ... &amp;quot;Although never is often
&lt;br&gt;better than *right* now&amp;quot; applies, I think.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25841710&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p25841710.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25841568</id>
	<title>Re: fixing the current email module</title>
	<published>2009-10-11T01:34:11Z</published>
	<updated>2009-10-11T01:34:11Z</updated>
	<author>
		<name>Stephen J. Turnbull</name>
	</author>
	<content type="html">Glenn Linderman writes:
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; conformant is not in the dictionaries I've consulted.
&lt;br&gt;&lt;br&gt;Try these (top 3 goggle results for &amp;quot;conformant&amp;quot;):
&lt;br&gt;&lt;br&gt;conformant- WordWeb dictionary definition
&lt;br&gt;&amp;nbsp; &amp;nbsp; (computing) conforming to a particular specification or standard &amp;quot;In
&lt;br&gt;&amp;nbsp; &amp;nbsp; this paper we present a new approach to conformant planning&amp;quot;. Nearest
&lt;br&gt;&amp;nbsp; &amp;nbsp; ...
&lt;br&gt;&amp;nbsp; &amp;nbsp; www.wordwebonline.com/en/CONFORMANT - Cached - Similar - 
&lt;br&gt;conformant - Definition from the Merriam-Webster Online Dictionary
&lt;br&gt;&amp;nbsp; &amp;nbsp; conformant can be found at Merriam-WebsterUnabridged.com. Click here
&lt;br&gt;&amp;nbsp; &amp;nbsp; to start your free trial! Click here to search for another word in the
&lt;br&gt;&amp;nbsp; &amp;nbsp; Merriam-Webster ...
&lt;br&gt;&amp;nbsp; &amp;nbsp; www.merriam-webster.com/dictionary/conformant - Cached - Similar - 
&lt;br&gt;Conformance
&lt;br&gt;&amp;nbsp; &amp;nbsp; The notion of TEI conformance is intended as an aid in describing the
&lt;br&gt;&amp;nbsp; &amp;nbsp; format and contents of a particular document or set of documents. ...
&lt;br&gt;&amp;nbsp; &amp;nbsp; www.tei-c.org/Guidelines/P4/html/CF.html - Cached - Similar - 
&lt;br&gt;&lt;br&gt;A quick look at some of the results show that the word &amp;quot;conformant&amp;quot; is
&lt;br&gt;typically used in a section called &amp;quot;conformance&amp;quot;, which defines what
&lt;br&gt;criteria are used to determine if an application is following the
&lt;br&gt;standard or not. &amp;nbsp;OTOH, the fact that the top three results are
&lt;br&gt;dictionary definitions suggests an awful lot of people are looking up
&lt;br&gt;the word in dictionaries....
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; Conforming is mostly a verb, not an adjective.
&lt;br&gt;&lt;br&gt;Goggling gives &amp;quot;Results 1 - 10 of about 3,680,000 for conforming
&lt;br&gt;application,&amp;quot; but &amp;quot; Results 1 - 10 of about 324,000 for conformant
&lt;br&gt;application.&amp;quot; &amp;nbsp;Looks like &amp;quot;conforming&amp;quot; is the preferred adjectival
&lt;br&gt;form.
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; but conformable and compliant are synonyms.
&lt;br&gt;&lt;br&gt;When used to mean &amp;quot;submissive.&amp;quot; &amp;nbsp;&amp;quot;Conformable&amp;quot; won't do.
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; English is hard enough for ESL folks when they can find the 
&lt;br&gt;&amp;nbsp;&amp;gt; words in the dictionary.
&lt;br&gt;&lt;br&gt;Compliant does seem to be the winner. &amp;nbsp;&amp;quot;Results 1 - 10 of about
&lt;br&gt;13,900,000 for compliant application.&amp;quot; &amp;nbsp;Conformant or conforming is
&lt;br&gt;better IMHO but much less popular. &amp;nbsp;Tie goes to the lusers, as usual.
&lt;br&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25841568&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p25841568.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25841489</id>
	<title>Re: fixing the current email module</title>
	<published>2009-10-11T01:17:38Z</published>
	<updated>2009-10-11T01:17:38Z</updated>
	<author>
		<name>Stephen J. Turnbull</name>
	</author>
	<content type="html">Glenn Linderman writes:
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt; (3) What is the API for accessing and/or mutating unparsed data, and
&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; requesting a reparse?
&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt;
&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt; I don't think we should go any farther than that.
&lt;br&gt;&amp;nbsp;&amp;gt; 
&lt;br&gt;&amp;nbsp;&amp;gt; I agree with your three components; but I think the answer to (3) 
&lt;br&gt;&amp;nbsp;&amp;gt; requires discussion/speculation of what clients might want to to when 
&lt;br&gt;&amp;nbsp;&amp;gt; faced with errors,
&lt;br&gt;&lt;br&gt;I could be wrong, but I don't think it does. &amp;nbsp;We don't to implement
&lt;br&gt;YAGNIs.
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; otherwise the API won't likely help them much, without
&lt;br&gt;&amp;nbsp;&amp;gt; reimplementing email package logic.
&lt;br&gt;&lt;br&gt;(1) That's why I propose parsing as much as possible, but no more.
&lt;br&gt;&amp;nbsp; &amp;nbsp; The parts that are in email package will not only be implemented
&lt;br&gt;&amp;nbsp; &amp;nbsp; and available, but they will already have been done. &amp;nbsp;What hasn't
&lt;br&gt;&amp;nbsp; &amp;nbsp; been done yet, the email module doesn't know how to do anyway.
&lt;br&gt;&lt;br&gt;(2) DRY simply doesn't apply. &amp;nbsp;The logic for dealing with erroneous
&lt;br&gt;&amp;nbsp; &amp;nbsp; data is not the same as dealing with conforming data. &amp;nbsp;If it were,
&lt;br&gt;&amp;nbsp; &amp;nbsp; we would have succeeded in the first place.
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; Except it may be perfectly valid input using a standard that post-dates 
&lt;br&gt;&amp;nbsp;&amp;gt; the application. &amp;nbsp;Doing something reasonable with it is appropriate. &amp;nbsp;
&lt;br&gt;&lt;br&gt;I have no idea what you're thinking of. &amp;nbsp;If it's a standard we
&lt;br&gt;implement, we'll handle it. &amp;nbsp;If it isn't, it's not our problem.
&lt;br&gt;&lt;br&gt;Discussing &amp;quot;possibilities&amp;quot; is out of the realm of &amp;quot;useful&amp;quot; already.
&lt;br&gt;Useful is &amp;quot;Existing client X does Y, and Z does it too. &amp;nbsp;We can do Y
&lt;br&gt;for them, faster, better, cheaper.&amp;quot;
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25841489&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p25841489.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25840906</id>
	<title>Re: fixing the current email module</title>
	<published>2009-10-10T22:51:50Z</published>
	<updated>2009-10-10T22:51:50Z</updated>
	<author>
		<name>Glenn Linderman-3</name>
	</author>
	<content type="html">On approximately 10/10/2009 10:12 PM, came the following characters from 
&lt;br&gt;the keyboard of R. David Murray:
&lt;br&gt;&amp;gt; But perhaps it should be added to the Glossary itself :) 
&lt;br&gt;&lt;br&gt;That would, to me, make it more acceptable for use. &amp;nbsp;Like I said, I knew 
&lt;br&gt;what was meant, but tried several printed and internet dictionaries, and 
&lt;br&gt;didn't find it. &amp;nbsp;Didn't try wordwebonline, as you might suppose!
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Glenn -- &lt;a href=&quot;http://nevcal.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://nevcal.com/&lt;/a&gt;&lt;br&gt;===========================
&lt;br&gt;A protocol is complete when there is nothing left to remove.
&lt;br&gt;-- Stuart Cheshire, Apple Computer, regarding Zero Configuration Networking
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25840906&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p25840906.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25840893</id>
	<title>Re: fixing the current email module</title>
	<published>2009-10-10T22:49:25Z</published>
	<updated>2009-10-10T22:49:25Z</updated>
	<author>
		<name>Glenn Linderman-3</name>
	</author>
	<content type="html">On approximately 10/10/2009 5:47 PM, came the following characters from 
&lt;br&gt;the keyboard of Stephen J. Turnbull:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Glenn Linderman writes:
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; On approximately 10/10/2009 8:40 AM, came the following characters from 
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; the keyboard of Stephen J. Turnbull:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; &amp;gt; So why are we discussing this? &amp;nbsp;We don't even know what our mainline
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; &amp;gt; APIs are going to look like, why are we discussing forcibly operating
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; &amp;gt; on broken input?
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; Use case generation. &amp;nbsp;If the only way to access header values is to 
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; successfully, fully, decode them, then some uses may be rendered 
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; impossible, or at least difficult, even by choice of APIs.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Since invertibility is a requirement, &amp;quot;successfully fully decoding&amp;quot; a
&lt;br&gt;&amp;gt; header field is not a prerequisite to accessing it.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The question of &amp;quot;what should we do about broken mail&amp;quot; at this point
&lt;br&gt;&amp;gt; has three components:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (1) To what level do we (ie, the email module) promise to parse
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; conforming wire format into useful objects?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (2) For nonconforming input, when is it OK to raise an error and
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; return to the calling client rather than handle it ourselves?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (3) What is the API for accessing and/or mutating unparsed data, and
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; requesting a reparse?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I don't think we should go any farther than that.
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;&lt;br&gt;I agree with your three components; but I think the answer to (3) 
&lt;br&gt;requires discussion/speculation of what clients might want to to when 
&lt;br&gt;faced with errors, otherwise the API won't likely help them much, 
&lt;br&gt;without reimplementing email package logic. &amp;nbsp;It is easy to design 
&lt;br&gt;&amp;quot;sufficient&amp;quot;, but unhelpful, APIs. &amp;nbsp;So I've been willing to discuss such 
&lt;br&gt;things. &amp;nbsp;Maybe at too much length, and maybe with insufficient clarity 
&lt;br&gt;that that is what I'm discussing, for which I apologize. &amp;nbsp;But I don't 
&lt;br&gt;think that not discussing it helps to answer (3).
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; &amp;gt; &amp;quot;Re&amp;quot; is a Latin abbreviation; there is no appropriate translation. ;-)
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; &amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; Nonetheless, I have seen both Re: and Fwd: translated to other languages 
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; (besides Latin or geek) :)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Sure. &amp;nbsp;This is an aspect of question (1): is this the responsibility
&lt;br&gt;&amp;gt; of the email module?
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;I don't think the old RFCs even discuss the use of Re: and Fwd:, nor 
&lt;br&gt;whether they should be collapsed or translated, or even used at all. &amp;nbsp;
&lt;br&gt;Just checked: RFC 822 had an example that showed Re:, but RFC 2822 does 
&lt;br&gt;discuss it a bit, and suggests not adding duplicate Re:. &amp;nbsp;Fwd: is not 
&lt;br&gt;mentioned at all, in those two RFCs. &amp;nbsp;So no, adding and collapsing 
&lt;br&gt;Re:/Fwd: is not the responsibility of the email package. &amp;nbsp;But making it 
&lt;br&gt;easy to do so, might be, as it is a common client operation. &amp;nbsp;Lots of 
&lt;br&gt;email style guides discuss it.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; &amp;gt; Maybe they are, but the email module doesn't know or care about what
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; &amp;gt; they do. &amp;nbsp;Let's stick within what the email module is supposed to
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; &amp;gt; handle
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; Yep, this is just use case exploration.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; But since by definition this is broken input, discussing what
&lt;br&gt;&amp;gt; applications are going to want to do with it is inappropriate, IMO.
&lt;br&gt;&amp;gt; We don't care if the app is going to prefix, suffix, or crucifix it.
&lt;br&gt;&amp;gt; We need to specify
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (a) what object will hold the raw data we couldn't handle
&lt;br&gt;&amp;gt; (b) how a calling client can retrieve the raw data
&lt;br&gt;&amp;gt; (c) how the client can replace (or more generally mutate) that data
&lt;br&gt;&amp;gt; (d) how the client can request a reparse from us if it attempted to
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; repair the breakage at a low level rather than parse it
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Manipulations of text or bytes are in principle not the responsibility
&lt;br&gt;&amp;gt; of the email module IMO; that will be done *by* the client *using* raw
&lt;br&gt;&amp;gt; Python, not methods provided by email. &amp;nbsp;I don't see how discussion of
&lt;br&gt;&amp;gt; *what* manipulations can be done with one hand up our nose is anything
&lt;br&gt;&amp;gt; but useless bikeshedding.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If we decide that the email module can usefully provide sufficiently
&lt;br&gt;&amp;gt; general facilities that would be convenient and hard to implement by
&lt;br&gt;&amp;gt; general client programmers (eg, the Mailman Developers collective
&lt;br&gt;&amp;gt; wisdom about foreign equivalents for &amp;quot;re&amp;quot; and &amp;quot;fwd&amp;quot; is surely greater
&lt;br&gt;&amp;gt; than that of the average American programmer), we will do it by
&lt;br&gt;&amp;gt; calling low-level methods to get and put the data, and raw Python to
&lt;br&gt;&amp;gt; manipulate it as text or bytes
&lt;/div&gt;&lt;br&gt;Except it may be perfectly valid input using a standard that post-dates 
&lt;br&gt;the application. &amp;nbsp;Doing something reasonable with it is appropriate. &amp;nbsp;
&lt;br&gt;The email RFCs go to great lengths to make new features work reasonably 
&lt;br&gt;in old clients that have limited understanding; with fallback 
&lt;br&gt;interpretations for unknown MIME subtypes and even MIME types, and 
&lt;br&gt;ensuring that some type of reasonable interpretation might be done. &amp;nbsp;The 
&lt;br&gt;RFCs define ways that new MIME types and subtypes might be defined, and 
&lt;br&gt;new charsets, it seems reasonable to attempt to accommodate the 
&lt;br&gt;possibility that such may actually be defined in the future.
&lt;br&gt;&lt;br&gt;If we don't discuss some of the possibilities, we'll never learn enough 
&lt;br&gt;to &amp;quot;decide that the email module can usefully provide sufficiently 
&lt;br&gt;general facilities that would be convenient and hard to implement by 
&lt;br&gt;general client programmers&amp;quot; :)
&lt;br&gt;&lt;br&gt;To me, &amp;quot;hard&amp;quot; would mean that they would have to rewrite portions of 
&lt;br&gt;logic that already exists in the email package, and then tweak it 
&lt;br&gt;slightly to compensate for not-quite-perfect data, or maybe I should 
&lt;br&gt;switch to saying &amp;quot;not-quite-perfect-or-possibly-later-standardized data&amp;quot; :)
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Glenn -- &lt;a href=&quot;http://nevcal.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://nevcal.com/&lt;/a&gt;&lt;br&gt;===========================
&lt;br&gt;A protocol is complete when there is nothing left to remove.
&lt;br&gt;-- Stuart Cheshire, Apple Computer, regarding Zero Configuration Networking
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25840893&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p25840893.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25840804</id>
	<title>Re: fixing the current email module</title>
	<published>2009-10-10T22:15:49Z</published>
	<updated>2009-10-10T22:15:49Z</updated>
	<author>
		<name>Glenn Linderman-3</name>
	</author>
	<content type="html">On approximately 10/10/2009 8:23 PM, came the following characters from 
&lt;br&gt;the keyboard of Stephen J. Turnbull:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Glenn Linderman writes:
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; On approximately 10/10/2009 6:59 AM, came the following characters from 
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; the keyboard of Stephen J. Turnbull:
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; &amp;gt; Glenn Linderman writes:
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; &amp;gt; &amp;nbsp;&amp;gt; On approximately 10/9/2009 8:10 AM, came the following characters from 
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; &amp;gt; &amp;nbsp;&amp;gt; the keyboard of Stephen J. Turnbull:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; &amp;gt; correctly decoded data normally is stored, and is accessible in the
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; &amp;gt; same way. &amp;nbsp;But I gather that's not what you were talking about, my
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; &amp;gt; mistake.
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; Well, the client tells us where to store it, and we can't prevent it 
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; from being the same place.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Huh? &amp;nbsp;No way! &amp;nbsp;We decide where our data is stored. &amp;nbsp;This isn't C where
&lt;br&gt;&amp;gt; you pass around arbitrary pointers for efficiency. &amp;nbsp;In particular,
&lt;br&gt;&amp;gt; strings (whether Unicode or bytes) are not mutable. &amp;nbsp;So the client can
&lt;br&gt;&amp;gt; keep a copy if it likes, but once it hands us raw message text as
&lt;br&gt;&amp;gt; bytes, after that we decide where we put parsed pieces and/or slices
&lt;br&gt;&amp;gt; of the unparsed original.
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;&lt;br&gt;Yes, email package can figure out where to store its copy, client 
&lt;br&gt;figures out where to store its copy.
&lt;br&gt;&lt;br&gt;We're getting better at communicating, but not 100% there yet :) &amp;nbsp;I was 
&lt;br&gt;thinking of the case where the client asks the email package for data, 
&lt;br&gt;and stores it in its variable; you seem to be thinking of the case where 
&lt;br&gt;the client gives the email package data.
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; &amp;gt; So when you wrote about saving and converting to text form, without
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; &amp;gt; mentioning that the specific APIs, I assumed you meant the &amp;quot;mainline&amp;quot;
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; &amp;gt; APIs for parsing and accessing parts of a correctly formatted message.
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; Mostly, I hadn't bothered about APIs yet;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; You may not bother about APIs, but it sure looks like you do to me.
&lt;br&gt;&amp;gt; You can't talk about where to store stuff without touching the API.
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;Well, I'm sure there will be APIs; the names and parameters is what I 
&lt;br&gt;haven't bothered about yet, much, except if the discussion seemed to 
&lt;br&gt;require such.
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; I think that the email package should require that some special action 
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; needs to be taken by the client to request not-quite-perfect data, 
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; either a special parameter value, or different API, etc.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; That's all I need to hear, until we're ready to write specs for that
&lt;br&gt;&amp;gt; API. &amp;nbsp;(Note that a special parameter value is part of the API in a
&lt;br&gt;&amp;gt; sense, if we specify and document what it means, so I tend to use API
&lt;br&gt;&amp;gt; for that, too, not just for whole functions.)
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;Yes, I was just trying to be clear that it could be either case.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; But there is nothing that says that some client might not pass that
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; all the time, and ignore the defect reports. &amp;nbsp;Whether that is easy
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; to identify or not, and whether the email package wants to require
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; that the normal APIs be tried before the not-quite-perfect APIs are
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; issues for discussion.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The answers are obvious to me: yes and no. &amp;nbsp;You can identify whether a
&lt;br&gt;&amp;gt; particular API has been used with standard text search tools like M-x
&lt;br&gt;&amp;gt; occur. &amp;nbsp;(For non-Emacsers, that is an Emacs command that finds all
&lt;br&gt;&amp;gt; occurances of a particular string in the buffer.) &amp;nbsp;If a program wants
&lt;br&gt;&amp;gt; to call the quick &amp; dirty APIs first, that's none of our business,
&lt;br&gt;&amp;gt; except that if parsing is being done lazily we should be careful to
&lt;br&gt;&amp;gt; update the defect list, so that the program can check them when it
&lt;br&gt;&amp;gt; wants to.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; Ultimately, the email package cannot enforce that proper case is taken 
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; by the client; only code reviews of the client can encourage that.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; My point is not to enforce anything, not even code reviews. &amp;nbsp;But by
&lt;br&gt;&amp;gt; having separate APIs for parsed and unparsed data, code review can be
&lt;br&gt;&amp;gt; made easier and more accurate.
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;&lt;br&gt;You have to analyze the control flow as well, not just search for 
&lt;br&gt;existence of the API. &amp;nbsp;In normal code, that should be straightforward, 
&lt;br&gt;but there is no guarantee that the client doesn't use spaghetti code, or 
&lt;br&gt;even obfuscated code, where the analysis would be hard. &amp;nbsp;The API call 
&lt;br&gt;could exist, but never be invoked; the API call could take parameters 
&lt;br&gt;that never have particular values of interest at run-time. &amp;nbsp;Hence, it 
&lt;br&gt;may or may not be easy to search the client code and figure it out. &amp;nbsp;But 
&lt;br&gt;I agree with your stated point: we can't enforce anything about the 
&lt;br&gt;client code, unless we write it ourself, or have some sort of authority 
&lt;br&gt;over it. &amp;nbsp;I intend to write a client, so I'll have control over that 
&lt;br&gt;one, and don't plan to obfuscate it.
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; Yes, agreed. &amp;nbsp;And a special way or ways to get various algorithms for 
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; attempting to interpret not-quite-perfect data, when the client thinks 
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; that might be useful.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I don't think we should be talking about special ways (plural) or
&lt;br&gt;&amp;gt; &amp;quot;not-quite-perfect&amp;quot; data. &amp;nbsp;At this point in the design process, we
&lt;br&gt;&amp;gt; have *parsed* and *unparsed* data. &amp;nbsp;Heuristic algorithms for
&lt;br&gt;&amp;gt; recovering from unparsable input can be layered on top of these two
&lt;br&gt;&amp;gt; sets of APIs, when we have *real* use cases for them. &amp;nbsp;For example, I
&lt;br&gt;&amp;gt; don't think your use case of prepending a mailing list's topic or
&lt;br&gt;&amp;gt; serial number to an unparseable subject is realistic; in all lists I
&lt;br&gt;&amp;gt; know of such a message would be held for moderation, or even discarded
&lt;br&gt;&amp;gt; outright as spam.
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;&lt;br&gt;So if the subject is unparseable, what is the moderator to do? &amp;nbsp;He can't 
&lt;br&gt;read the subject if it unparseable. &amp;nbsp;Perhaps he can read the body, but 
&lt;br&gt;it might be in the same unparseable charset. &amp;nbsp;Let's say he can read the 
&lt;br&gt;body, and the message seems to be valid for the list, and he marks it to 
&lt;br&gt;be forwarded to list members. &amp;nbsp;Now what is the mailing list to do, it 
&lt;br&gt;still can't parse the subject?
&lt;br&gt;&lt;br&gt;And if there is no moderator, it still may not be spam, just a mailing 
&lt;br&gt;list manager that doesn't understand a valid charset, likely because it 
&lt;br&gt;predates the definition of the charset.
&lt;br&gt;&lt;br&gt;&amp;gt; And again:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; Right. &amp;nbsp;And it is the more detailed structure that I was referring to... 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; But why? &amp;nbsp;There is no need to discuss it at this point, and bringing
&lt;br&gt;&amp;gt; it up is confusing as all get-out.
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;The more we understand/discuss about how different client can function, 
&lt;br&gt;the better we can design the email package. &amp;nbsp;We'll still not likely 
&lt;br&gt;cover all the possibilities, but we don't want to have tunnel vision and 
&lt;br&gt;declare that because Mailman works this way, that all mailing list 
&lt;br&gt;managers work this way, or that because we haven't discussed that some 
&lt;br&gt;client might do something this way, that it won't. &amp;nbsp;So I have no problem 
&lt;br&gt;bringing clients into the discussion, to make sure that we don't 
&lt;br&gt;preclude their reasonable behaviors as use cases.
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; How a particular email server interprets the &amp;quot;stuff before the @&amp;quot; is 
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; pretty much up to it... so as long as it does something appropriate, it 
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; can interpret all or a fraction of it as a mailbox name, or could it 
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; intuit a mailbox name from the body content if it wants, or even from a 
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; special header. &amp;nbsp;So yeah, particular interpretations of the address is 
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; non-RFC stuff.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Right. &amp;nbsp;To riff on the RFC vs. not theme [&amp;quot;Barry, pick up the bass
&lt;br&gt;&amp;gt; line, need more bottom here!&amp;quot;], I think we should pick a list of RFCs
&lt;br&gt;&amp;gt; we &amp;quot;promise&amp;quot; to implement as &amp;quot;defining&amp;quot; email; if we reserve any
&lt;br&gt;&amp;gt; structures as &amp;quot;too obscure for us to parse,&amp;quot; we should say so (and
&lt;br&gt;&amp;gt; reference chapter and verse of the Holy RFC). &amp;nbsp;On the other hand, of
&lt;br&gt;&amp;gt; course as we discover common use cases for which precise
&lt;br&gt;&amp;gt; specifications can be given, we should be flexible and implement them.
&lt;br&gt;&amp;gt; But there should be no rush.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Which RFCs?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; First of all, the STD 11 series (RFCs 733, 822, 2822, 5322). &amp;nbsp;Here we
&lt;br&gt;&amp;gt; have to worry about the standard's recommended format vs. the obsolete
&lt;br&gt;&amp;gt; format because of the Postel principle. &amp;nbsp;AFAIK, there is no reason not
&lt;br&gt;&amp;gt; to insist on *producing* strictly RFC 5322 conformant messages, but I
&lt;br&gt;&amp;gt; think we should implement both strict and lax parsers. &amp;nbsp;The lax parser
&lt;br&gt;&amp;gt; is for &amp;quot;daily use&amp;quot;, the strict parser for validation.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Second, the basic MIME structure RFCs: 2045-2049, 2231. &amp;nbsp;(Some of
&lt;br&gt;&amp;gt; these have been at least partially superseded by now, I think.)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The mailing list header RFCs: 2369 and 2919.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Not RFCs, per se, but an auxiliary module should provide the
&lt;br&gt;&amp;gt; registered IANA data for the above RFCs.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Strictly speaking outside of the email module, but we make use of URLs
&lt;br&gt;&amp;gt; (RFC 3986 -- superseded?) and mimetypes data (this overlaps
&lt;br&gt;&amp;gt; substantially with the &amp;quot;registered IANA data&amp;quot;. &amp;nbsp;We need to coordinate
&lt;br&gt;&amp;gt; with the responsible maintainers for those.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Ditto coordinating with modules that we share a lot of structure with,
&lt;br&gt;&amp;gt; the &amp;quot;not email but very similar&amp;quot; like HTTP (RFC 2616), and netnews
&lt;br&gt;&amp;gt; (NNTP = 3397 and RFC 1036).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Which extensions?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Er, don't you think the above is enough for now?&amp;lt;wink&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;&lt;br&gt;It's a good list, yes.
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; Just to point out that good data can be obtained from bad email 
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; messages, I think, and that that is a use case.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; But we already know that, and the basic idea of how to treat bad data
&lt;br&gt;&amp;gt; (send it to a locked room without any supper). &amp;nbsp;No need to rehash
&lt;br&gt;&amp;gt; that, AFAICS from your use case.
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;Locked room is the first pass; unlocking it belongs to the heuristics, 
&lt;br&gt;for determined clients.
&lt;br&gt;&lt;br&gt;The use case wasn't at &lt;a href=&quot;http://wiki.python.org/moin/Email%20SIG/UseCases&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://wiki.python.org/moin/Email%20SIG/UseCases&lt;/a&gt;&amp;nbsp;
&lt;br&gt;so I've added it there, as &amp;quot;Handling pathological data #2&amp;quot;
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Glenn -- &lt;a href=&quot;http://nevcal.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://nevcal.com/&lt;/a&gt;&lt;br&gt;===========================
&lt;br&gt;A protocol is complete when there is nothing left to remove.
&lt;br&gt;-- Stuart Cheshire, Apple Computer, regarding Zero Configuration Networking
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25840804&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p25840804.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25840791</id>
	<title>Re: fixing the current email module</title>
	<published>2009-10-10T22:12:27Z</published>
	<updated>2009-10-10T22:12:27Z</updated>
	<author>
		<name>R. David Murray</name>
	</author>
	<content type="html">On Sun, 11 Oct 2009 at 13:01, Stephen J. Turnbull wrote:
&lt;br&gt;&amp;gt; Glenn Linderman writes:
&lt;br&gt;&amp;gt; &amp;gt; (I switched conformant to compliant,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Conformant is in common use. &amp;nbsp;You might be more comfortable with
&lt;br&gt;&amp;gt; conforming.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Richard Stallman points out that you comply with the law, but you
&lt;br&gt;&amp;gt; conform to a standard. &amp;nbsp;I think it's useful to make that semantic
&lt;br&gt;&amp;gt; distinction, cf. RFC 2119 MUST vs. SHOULD or MAY.
&lt;br&gt;&lt;br&gt;Indeed. &amp;nbsp;My regular dictionary doesn't have it, but WordWeb does:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.wordwebonline.com/en/CONFORMANT&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.wordwebonline.com/en/CONFORMANT&lt;/a&gt;&lt;br&gt;&lt;br&gt;Seems to be a 'term of art' in computing rather than a regular
&lt;br&gt;English word, and the most appropriate word in the context in
&lt;br&gt;which I used it. &amp;nbsp;But perhaps it should be added to the Glossary
&lt;br&gt;itself :)
&lt;br&gt;&lt;br&gt;--David
&lt;br&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25840791&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p25840791.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25840704</id>
	<title>Re: fixing the current email module</title>
	<published>2009-10-10T21:37:48Z</published>
	<updated>2009-10-10T21:37:48Z</updated>
	<author>
		<name>Glenn Linderman-3</name>
	</author>
	<content type="html">On approximately 10/10/2009 9:01 PM, came the following characters from 
&lt;br&gt;the keyboard of Stephen J. Turnbull:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Glenn Linderman writes:
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; (I switched conformant to compliant,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Conformant is in common use. &amp;nbsp;You might be more comfortable with
&lt;br&gt;&amp;gt; conforming.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Richard Stallman points out that you comply with the law, but you
&lt;br&gt;&amp;gt; conform to a standard. &amp;nbsp;I think it's useful to make that semantic
&lt;br&gt;&amp;gt; distinction, cf. RFC 2119 MUST vs. SHOULD or MAY.
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;&lt;br&gt;conformant is not in the dictionaries I've consulted. &amp;nbsp;Conforming is 
&lt;br&gt;mostly a verb, not an adjective.
&lt;br&gt;&lt;br&gt;Richard Stallman is a great programmer, but conformable and compliant 
&lt;br&gt;are synonyms. &amp;nbsp;I don't like the word conformable, but if you appreciate 
&lt;br&gt;his distinction, then we should use the word conformable even though I 
&lt;br&gt;don't like it. &amp;nbsp;But we shouldn't use the letter sequence conformant, 
&lt;br&gt;because although I know what you mean by it, it appears not to be a 
&lt;br&gt;word, and English is hard enough for ESL folks when they can find the 
&lt;br&gt;words in the dictionary.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Glenn -- &lt;a href=&quot;http://nevcal.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://nevcal.com/&lt;/a&gt;&lt;br&gt;===========================
&lt;br&gt;A protocol is complete when there is nothing left to remove.
&lt;br&gt;-- Stuart Cheshire, Apple Computer, regarding Zero Configuration Networking
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25840704&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p25840704.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25840653</id>
	<title>Re: fixing the current email module</title>
	<published>2009-10-10T21:01:50Z</published>
	<updated>2009-10-10T21:01:50Z</updated>
	<author>
		<name>Stephen J. Turnbull</name>
	</author>
	<content type="html">Glenn Linderman writes:
&lt;br&gt;&amp;nbsp;&amp;gt; (I switched conformant to compliant,
&lt;br&gt;&lt;br&gt;Conformant is in common use. &amp;nbsp;You might be more comfortable with
&lt;br&gt;conforming.
&lt;br&gt;&lt;br&gt;Richard Stallman points out that you comply with the law, but you
&lt;br&gt;conform to a standard. &amp;nbsp;I think it's useful to make that semantic
&lt;br&gt;distinction, cf. RFC 2119 MUST vs. SHOULD or MAY.
&lt;br&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25840653&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p25840653.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25840568</id>
	<title>Re: fixing the current email module</title>
	<published>2009-10-10T20:49:38Z</published>
	<updated>2009-10-10T20:49:38Z</updated>
	<author>
		<name>Stephen J. Turnbull-2</name>
	</author>
	<content type="html">R. David Murray writes:
&lt;br&gt;&amp;nbsp;&amp;gt; I have set up two more documents on the wiki. &amp;nbsp;One is UseCases[1], [...].
&lt;br&gt;&amp;nbsp;&amp;gt; The other is a Glossary[2].
&lt;br&gt;&lt;br&gt;Thank you, very much!
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; I think most of it accurately reflects the consensus here, but in
&lt;br&gt;&amp;nbsp;&amp;gt; it I'm proposing to use the term 'transfer-decoded' for #3, and
&lt;br&gt;&amp;nbsp;&amp;gt; 'transfer-encoded' as an alternative to 'wire-format' just for
&lt;br&gt;&amp;nbsp;&amp;gt; symmetry. &amp;nbsp;Comments and suggestions welcome.
&lt;br&gt;&lt;br&gt;'Wire-format' means &amp;quot;you can cat it to the wire&amp;quot;, ie, RFC-conforming
&lt;br&gt;(in fact, it's the only meaning in the RFCs by definition), and for
&lt;br&gt;email itself it's always bytes AFAIK (Mama don' 'low no XML roun'
&lt;br&gt;here, Lord, Lord!). &amp;nbsp;That's not true of all our applications, though,
&lt;br&gt;especially stuff like doctests. &amp;nbsp;There are also some RFCs we use such
&lt;br&gt;as BASE64 (specifically relevant to transfer encodings) that are
&lt;br&gt;defined in terms of characters, not bytes, so 'transfer-encoded' is
&lt;br&gt;slightly different from 'wire-format'.
&lt;br&gt;&lt;br&gt;I think in general that kind of comment should be applied directly to
&lt;br&gt;the Glossary, but what deserves general discussion is &amp;quot;how pedantic do
&lt;br&gt;we want to be? &amp;nbsp;I think the distinction made here between 'wire-format'
&lt;br&gt;and 'transfer-encoded' is useful *to us*, and in general lean toward
&lt;br&gt;&amp;quot;high pedantry&amp;quot; (cf how much smoke and how little fire Glenn and I are
&lt;br&gt;generating!) &amp;nbsp;WDOT?
&lt;br&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25840568&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p25840568.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25840465</id>
	<title>Re: fixing the current email module</title>
	<published>2009-10-10T20:15:33Z</published>
	<updated>2009-10-10T20:15:33Z</updated>
	<author>
		<name>Stephen J. Turnbull</name>
	</author>
	<content type="html">Glenn Linderman writes:
&lt;br&gt;&amp;nbsp;&amp;gt; On approximately 10/10/2009 6:59 AM, came the following characters from 
&lt;br&gt;&amp;nbsp;&amp;gt; the keyboard of Stephen J. Turnbull:
&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt; Glenn Linderman writes:
&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt; &amp;nbsp;&amp;gt; On approximately 10/9/2009 8:10 AM, came the following characters from 
&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt; &amp;nbsp;&amp;gt; the keyboard of Stephen J. Turnbull:
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt; correctly decoded data normally is stored, and is accessible in the
&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt; same way. &amp;nbsp;But I gather that's not what you were talking about, my
&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt; mistake.
&lt;br&gt;&amp;nbsp;&amp;gt; 
&lt;br&gt;&amp;nbsp;&amp;gt; Well, the client tells us where to store it, and we can't prevent it 
&lt;br&gt;&amp;nbsp;&amp;gt; from being the same place.
&lt;br&gt;&lt;br&gt;Huh? &amp;nbsp;No way! &amp;nbsp;We decide where our data is stored. &amp;nbsp;This isn't C where
&lt;br&gt;you pass around arbitrary pointers for efficiency. &amp;nbsp;In particular,
&lt;br&gt;strings (whether Unicode or bytes) are not mutable. &amp;nbsp;So the client can
&lt;br&gt;keep a copy if it likes, but once it hands us raw message text as
&lt;br&gt;bytes, after that we decide where we put parsed pieces and/or slices
&lt;br&gt;of the unparsed original.
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt; So when you wrote about saving and converting to text form, without
&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt; mentioning that the specific APIs, I assumed you meant the &amp;quot;mainline&amp;quot;
&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt; APIs for parsing and accessing parts of a correctly formatted message.
&lt;br&gt;&amp;nbsp;&amp;gt; 
&lt;br&gt;&amp;nbsp;&amp;gt; Mostly, I hadn't bothered about APIs yet;
&lt;br&gt;&lt;br&gt;You may not bother about APIs, but it sure looks like you do to me.
&lt;br&gt;You can't talk about where to store stuff without touching the API.
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; I think that the email package should require that some special action 
&lt;br&gt;&amp;nbsp;&amp;gt; needs to be taken by the client to request not-quite-perfect data, 
&lt;br&gt;&amp;nbsp;&amp;gt; either a special parameter value, or different API, etc.
&lt;br&gt;&lt;br&gt;That's all I need to hear, until we're ready to write specs for that
&lt;br&gt;API. &amp;nbsp;(Note that a special parameter value is part of the API in a
&lt;br&gt;sense, if we specify and document what it means, so I tend to use API
&lt;br&gt;for that, too, not just for whole functions.)
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; But there is nothing that says that some client might not pass that
&lt;br&gt;&amp;nbsp;&amp;gt; all the time, and ignore the defect reports. &amp;nbsp;Whether that is easy
&lt;br&gt;&amp;nbsp;&amp;gt; to identify or not, and whether the email package wants to require
&lt;br&gt;&amp;nbsp;&amp;gt; that the normal APIs be tried before the not-quite-perfect APIs are
&lt;br&gt;&amp;nbsp;&amp;gt; issues for discussion.
&lt;br&gt;&lt;br&gt;The answers are obvious to me: yes and no. &amp;nbsp;You can identify whether a
&lt;br&gt;particular API has been used with standard text search tools like M-x
&lt;br&gt;occur. &amp;nbsp;(For non-Emacsers, that is an Emacs command that finds all
&lt;br&gt;occurances of a particular string in the buffer.) &amp;nbsp;If a program wants
&lt;br&gt;to call the quick &amp; dirty APIs first, that's none of our business,
&lt;br&gt;except that if parsing is being done lazily we should be careful to
&lt;br&gt;update the defect list, so that the program can check them when it
&lt;br&gt;wants to.
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; Ultimately, the email package cannot enforce that proper case is taken 
&lt;br&gt;&amp;nbsp;&amp;gt; by the client; only code reviews of the client can encourage that.
&lt;br&gt;&lt;br&gt;My point is not to enforce anything, not even code reviews. &amp;nbsp;But by
&lt;br&gt;having separate APIs for parsed and unparsed data, code review can be
&lt;br&gt;made easier and more accurate.
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; Yes, agreed. &amp;nbsp;And a special way or ways to get various algorithms for 
&lt;br&gt;&amp;nbsp;&amp;gt; attempting to interpret not-quite-perfect data, when the client thinks 
&lt;br&gt;&amp;nbsp;&amp;gt; that might be useful.
&lt;br&gt;&lt;br&gt;I don't think we should be talking about special ways (plural) or
&lt;br&gt;&amp;quot;not-quite-perfect&amp;quot; data. &amp;nbsp;At this point in the design process, we
&lt;br&gt;have *parsed* and *unparsed* data. &amp;nbsp;Heuristic algorithms for
&lt;br&gt;recovering from unparsable input can be layered on top of these two
&lt;br&gt;sets of APIs, when we have *real* use cases for them. &amp;nbsp;For example, I
&lt;br&gt;don't think your use case of prepending a mailing list's topic or
&lt;br&gt;serial number to an unparseable subject is realistic; in all lists I
&lt;br&gt;know of such a message would be held for moderation, or even discarded
&lt;br&gt;outright as spam.
&lt;br&gt;&lt;br&gt;And again:
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; Right. &amp;nbsp;And it is the more detailed structure that I was referring to... 
&lt;br&gt;&lt;br&gt;But why? &amp;nbsp;There is no need to discuss it at this point, and bringing
&lt;br&gt;it up is confusing as all get-out.
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; How a particular email server interprets the &amp;quot;stuff before the @&amp;quot; is 
&lt;br&gt;&amp;nbsp;&amp;gt; pretty much up to it... so as long as it does something appropriate, it 
&lt;br&gt;&amp;nbsp;&amp;gt; can interpret all or a fraction of it as a mailbox name, or could it 
&lt;br&gt;&amp;nbsp;&amp;gt; intuit a mailbox name from the body content if it wants, or even from a 
&lt;br&gt;&amp;nbsp;&amp;gt; special header. &amp;nbsp;So yeah, particular interpretations of the address is 
&lt;br&gt;&amp;nbsp;&amp;gt; non-RFC stuff.
&lt;br&gt;&lt;br&gt;Right. &amp;nbsp;To riff on the RFC vs. not theme [&amp;quot;Barry, pick up the bass
&lt;br&gt;line, need more bottom here!&amp;quot;], I think we should pick a list of RFCs
&lt;br&gt;we &amp;quot;promise&amp;quot; to implement as &amp;quot;defining&amp;quot; email; if we reserve any
&lt;br&gt;structures as &amp;quot;too obscure for us to parse,&amp;quot; we should say so (and
&lt;br&gt;reference chapter and verse of the Holy RFC). &amp;nbsp;On the other hand, of
&lt;br&gt;course as we discover common use cases for which precise
&lt;br&gt;specifications can be given, we should be flexible and implement them.
&lt;br&gt;But there should be no rush.
&lt;br&gt;&lt;br&gt;Which RFCs?
&lt;br&gt;&lt;br&gt;First of all, the STD 11 series (RFCs 733, 822, 2822, 5322). &amp;nbsp;Here we
&lt;br&gt;have to worry about the standard's recommended format vs. the obsolete
&lt;br&gt;format because of the Postel principle. &amp;nbsp;AFAIK, there is no reason not
&lt;br&gt;to insist on *producing* strictly RFC 5322 conformant messages, but I
&lt;br&gt;think we should implement both strict and lax parsers. &amp;nbsp;The lax parser
&lt;br&gt;is for &amp;quot;daily use&amp;quot;, the strict parser for validation.
&lt;br&gt;&lt;br&gt;Second, the basic MIME structure RFCs: 2045-2049, 2231. &amp;nbsp;(Some of
&lt;br&gt;these have been at least partially superseded by now, I think.)
&lt;br&gt;&lt;br&gt;The mailing list header RFCs: 2369 and 2919.
&lt;br&gt;&lt;br&gt;Not RFCs, per se, but an auxiliary module should provide the
&lt;br&gt;registered IANA data for the above RFCs.
&lt;br&gt;&lt;br&gt;Strictly speaking outside of the email module, but we make use of URLs
&lt;br&gt;(RFC 3986 -- superseded?) and mimetypes data (this overlaps
&lt;br&gt;substantially with the &amp;quot;registered IANA data&amp;quot;. &amp;nbsp;We need to coordinate
&lt;br&gt;with the responsible maintainers for those.
&lt;br&gt;&lt;br&gt;Ditto coordinating with modules that we share a lot of structure with,
&lt;br&gt;the &amp;quot;not email but very similar&amp;quot; like HTTP (RFC 2616), and netnews
&lt;br&gt;(NNTP = 3397 and RFC 1036).
&lt;br&gt;&lt;br&gt;Which extensions?
&lt;br&gt;&lt;br&gt;Er, don't you think the above is enough for now?&amp;lt;wink&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; Just to point out that good data can be obtained from bad email 
&lt;br&gt;&amp;nbsp;&amp;gt; messages, I think, and that that is a use case.
&lt;br&gt;&lt;br&gt;But we already know that, and the basic idea of how to treat bad data
&lt;br&gt;(send it to a locked room without any supper). &amp;nbsp;No need to rehash
&lt;br&gt;that, AFAICS from your use case.
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; The only context for parsing MIME parts that I'm aware of is that when 
&lt;br&gt;&amp;nbsp;&amp;gt; determining the end of a nested MIME part,
&lt;br&gt;&lt;br&gt;Indeed, but this is Postel principle stuff, not about parsing correct
&lt;br&gt;syntax. &amp;nbsp;First we need to decide what to do with correct syntax, then
&lt;br&gt;come up with belt and suspenders algorithms for broken mail.
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; The only other cross-part context that I am aware of is Content-ID 
&lt;br&gt;&amp;nbsp;&amp;gt; references. &amp;nbsp;That doesn't affect parsing, but rather semantic 
&lt;br&gt;&amp;nbsp;&amp;gt; interpretation, after parsing, validation, and decoding is complete.
&lt;br&gt;&lt;br&gt;I wasn't thinking of those, but that's a good point. &amp;nbsp;Those will need
&lt;br&gt;to be kept in a mapping at a higher level of the representation,
&lt;br&gt;probably top-level, I guess.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25840465&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p25840465.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25839814</id>
	<title>Re: fixing the current email module</title>
	<published>2009-10-10T17:39:36Z</published>
	<updated>2009-10-10T17:39:36Z</updated>
	<author>
		<name>Stephen J. Turnbull</name>
	</author>
	<content type="html">Glenn Linderman writes:
&lt;br&gt;&amp;nbsp;&amp;gt; On approximately 10/10/2009 8:40 AM, came the following characters from 
&lt;br&gt;&amp;nbsp;&amp;gt; the keyboard of Stephen J. Turnbull:
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt; So why are we discussing this? &amp;nbsp;We don't even know what our mainline
&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt; APIs are going to look like, why are we discussing forcibly operating
&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt; on broken input?
&lt;br&gt;&amp;nbsp;&amp;gt; 
&lt;br&gt;&amp;nbsp;&amp;gt; Use case generation. &amp;nbsp;If the only way to access header values is to 
&lt;br&gt;&amp;nbsp;&amp;gt; successfully, fully, decode them, then some uses may be rendered 
&lt;br&gt;&amp;nbsp;&amp;gt; impossible, or at least difficult, even by choice of APIs.
&lt;br&gt;&lt;br&gt;Since invertibility is a requirement, &amp;quot;successfully fully decoding&amp;quot; a
&lt;br&gt;header field is not a prerequisite to accessing it.
&lt;br&gt;&lt;br&gt;The question of &amp;quot;what should we do about broken mail&amp;quot; at this point
&lt;br&gt;has three components:
&lt;br&gt;&lt;br&gt;(1) To what level do we (ie, the email module) promise to parse
&lt;br&gt;&amp;nbsp; &amp;nbsp; conforming wire format into useful objects?
&lt;br&gt;&lt;br&gt;(2) For nonconforming input, when is it OK to raise an error and
&lt;br&gt;&amp;nbsp; &amp;nbsp; return to the calling client rather than handle it ourselves?
&lt;br&gt;&lt;br&gt;(3) What is the API for accessing and/or mutating unparsed data, and
&lt;br&gt;&amp;nbsp; &amp;nbsp; requesting a reparse?
&lt;br&gt;&lt;br&gt;I don't think we should go any farther than that.
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt; &amp;quot;Re&amp;quot; is a Latin abbreviation; there is no appropriate translation. ;-)
&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;nbsp;&amp;gt; 
&lt;br&gt;&amp;nbsp;&amp;gt; Nonetheless, I have seen both Re: and Fwd: translated to other languages 
&lt;br&gt;&amp;nbsp;&amp;gt; (besides Latin or geek) :)
&lt;br&gt;&lt;br&gt;Sure. &amp;nbsp;This is an aspect of question (1): is this the responsibility
&lt;br&gt;of the email module?
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt; Maybe they are, but the email module doesn't know or care about what
&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt; they do. &amp;nbsp;Let's stick within what the email module is supposed to
&lt;br&gt;&amp;nbsp;&amp;gt; &amp;gt; handle
&lt;br&gt;&amp;nbsp;&amp;gt; 
&lt;br&gt;&amp;nbsp;&amp;gt; Yep, this is just use case exploration.
&lt;br&gt;&lt;br&gt;But since by definition this is broken input, discussing what
&lt;br&gt;applications are going to want to do with it is inappropriate, IMO.
&lt;br&gt;We don't care if the app is going to prefix, suffix, or crucifix it.
&lt;br&gt;We need to specify
&lt;br&gt;&lt;br&gt;(a) what object will hold the raw data we couldn't handle
&lt;br&gt;(b) how a calling client can retrieve the raw data
&lt;br&gt;(c) how the client can replace (or more generally mutate) that data
&lt;br&gt;(d) how the client can request a reparse from us if it attempted to
&lt;br&gt;&amp;nbsp; &amp;nbsp; repair the breakage at a low level rather than parse it
&lt;br&gt;&lt;br&gt;Manipulations of text or bytes are in principle not the responsibility
&lt;br&gt;of the email module IMO; that will be done *by* the client *using* raw
&lt;br&gt;Python, not methods provided by email. &amp;nbsp;I don't see how discussion of
&lt;br&gt;*what* manipulations can be done with one hand up our nose is anything
&lt;br&gt;but useless bikeshedding.
&lt;br&gt;&lt;br&gt;If we decide that the email module can usefully provide sufficiently
&lt;br&gt;general facilities that would be convenient and hard to implement by
&lt;br&gt;general client programmers (eg, the Mailman Developers collective
&lt;br&gt;wisdom about foreign equivalents for &amp;quot;re&amp;quot; and &amp;quot;fwd&amp;quot; is surely greater
&lt;br&gt;than that of the average American programmer), we will do it by
&lt;br&gt;calling low-level methods to get and put the data, and raw Python to
&lt;br&gt;manipulate it as text or bytes.
&lt;br&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25839814&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p25839814.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25839254</id>
	<title>Re: fixing the current email module</title>
	<published>2009-10-10T15:58:38Z</published>
	<updated>2009-10-10T15:58:38Z</updated>
	<author>
		<name>Glenn Linderman-3</name>
	</author>
	<content type="html">On approximately 10/10/2009 2:20 PM, came the following characters from 
&lt;br&gt;the keyboard of R. David Murray:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Fri, 9 Oct 2009 at 11:59, Glenn Linderman wrote:
&lt;br&gt;&amp;gt;&amp;gt; On approximately 10/9/2009 5:05 AM, came the following characters 
&lt;br&gt;&amp;gt;&amp;gt; from the keyboard of Barry Warsaw:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;On Oct 8, 2009, at 6:39 PM, Glenn Linderman wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp;1) wire format. &amp;nbsp;Either what came in, in the parser case, or what 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; would &amp;gt; &amp;nbsp;be generated.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp;2) internal headers from the MIME part
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp;3) decoded BLOB. &amp;nbsp;This means that quopri and base64 are decoded, 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; no more &amp;gt; &amp;nbsp;and no less. &amp;nbsp;This is bytes. &amp;nbsp;No headers, only payload. &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; For &amp;gt; &amp;nbsp;Content-Transfer-Encoding: binary, this is mostly a noop.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp;4) text/* parts should also be obtainable as str()/unicode(), 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; payload &amp;gt; &amp;nbsp;only. &amp;nbsp;This is where charset decoding is done.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;nbsp;I think your talk in the next paragraph about hooks and other 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; object &amp;gt; &amp;nbsp;types being produced is a generalization of 4, not 3, and 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; generally no &amp;gt; &amp;nbsp;additional decoding needs to be done, just 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; conversion to the right &amp;gt; &amp;nbsp;object type (or file, or file-like object).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;I mostly agree with that. &amp;nbsp;I've always called #4 the &amp;quot;decoded 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; payload&amp;quot; and
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;#3 I've usually called the &amp;quot;raw payload&amp;quot;. &amp;nbsp;Maybe we can bikeshed on 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; better
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;terms to help inform us about the API's method/attribute names.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; It would be good though to have standardized terms for easier 
&lt;br&gt;&amp;gt;&amp;gt; communication. Maybe as they are chosen, they could be added to that 
&lt;br&gt;&amp;gt;&amp;gt; Wiki RDM set up?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I didn't set it up, Barry did. &amp;nbsp;I just started adding stuff ;)
&lt;/div&gt;&lt;br&gt;OK. &amp;nbsp;I seem to have an account there, so made some edits.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt; My only problem with &amp;quot;raw&amp;quot; and &amp;quot;decoded&amp;quot; payload, is that there are 3 
&lt;br&gt;&amp;gt;&amp;gt; payload formats, not 2, so there needs to be a 3rd term, 
&lt;br&gt;&amp;gt;&amp;gt; corresponding to #1, #3, and #4, above. &amp;nbsp;#2 is somewhat orthogonal 
&lt;br&gt;&amp;gt;&amp;gt; from the payload.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; To me, &amp;quot;raw&amp;quot; conjures up #1, not #3.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I think I understand why Barry uses it for #3: it's the 'raw data' that
&lt;br&gt;&amp;gt; went in to get transfer-encoded in the first place. &amp;nbsp;But clearly the
&lt;br&gt;&amp;gt; term is ambiguous.
&lt;/div&gt;&lt;br&gt;I found it so.
&lt;br&gt;&lt;br&gt;&amp;gt; I have set up two more documents on the wiki. &amp;nbsp;One is UseCases[1], and 
&lt;br&gt;&amp;gt; I've
&lt;br&gt;&amp;gt; tried to copy into it all of the use cases that have been mentioned in
&lt;br&gt;&amp;gt; this discussion, plus a few more. &amp;nbsp;Edits welcome.
&lt;br&gt;&lt;br&gt;I hadn't seen UTF-16/-32/-BE/-LE mentioned in this discussion, but the 
&lt;br&gt;MIME RFCs do mention use cases that require them, so I added it to 
&lt;br&gt;RFC822 handling, but it might be better in HTTP handling? &amp;nbsp;Or maybe 
&lt;br&gt;elsewhere?
&lt;br&gt;&lt;br&gt;&amp;gt; The other is a Glossary[2]. &amp;nbsp;I think most of it accurately reflects the
&lt;br&gt;&amp;gt; consensus here, but in it I'm proposing to use the term 
&lt;br&gt;&amp;gt; 'transfer-decoded'
&lt;br&gt;&amp;gt; for #3, and 'transfer-encoded' as an alternative to 'wire-format' just
&lt;br&gt;&amp;gt; for symmetry. &amp;nbsp;Comments and suggestions welcome.
&lt;br&gt;&lt;br&gt;I like the distinction you made that 'wire format' is &amp;quot;in the wild&amp;quot;, not 
&lt;br&gt;known to be RFC compliant, and 'transfer-encoded' be the generated type, 
&lt;br&gt;and compliant. &amp;nbsp;I would think that if we get data as far as 
&lt;br&gt;'transfer-decoded', that we've (mostly) proven that the received 'wire 
&lt;br&gt;format' is compliant, or can be made compliant. (I switched conformant 
&lt;br&gt;to compliant, not finding the former at dictionary.com, and not liking 
&lt;br&gt;conformable which I found there, as it seems to imply able to be changed 
&lt;br&gt;to conform, in my head, although not in the definition).
&lt;br&gt;&lt;br&gt;&amp;gt; Any other terms of art we should record?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --David
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; [1] &lt;a href=&quot;http://wiki.python.org/moin/Email%20SIG/UseCases&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://wiki.python.org/moin/Email%20SIG/UseCases&lt;/a&gt;&lt;br&gt;&amp;gt; [2] &lt;a href=&quot;http://wiki.python.org/moin/Email%20SIG/Glossary&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://wiki.python.org/moin/Email%20SIG/Glossary&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Glenn -- &lt;a href=&quot;http://nevcal.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://nevcal.com/&lt;/a&gt;&lt;br&gt;===========================
&lt;br&gt;A protocol is complete when there is nothing left to remove.
&lt;br&gt;-- Stuart Cheshire, Apple Computer, regarding Zero Configuration Networking
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Email-SIG mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25839254&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Email-SIG@...&lt;/a&gt;
&lt;br&gt;Your options: &lt;a href=&quot;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mail.python.org/mailman/options/email-sig/lists%40nabble.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-fixing-the-current-email-module-tp25728839p25839254.html" />
</entry>

</feed>
