[Python-Dev] Rework nntlib? (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Tue Sep 14 16:23:42 CEST 2010
- Previous message: [Python-Dev] Rework nntlib?
- Next message: [Python-Dev] Rework nntlib?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, 13 Sep 2010 18:58:31 -0400 Barry Warsaw <barry at python.org> wrote:
On Sep 14, 2010, at 11:28 AM, Michael Foord wrote:
> On 14/09/2010 11:17, Antoine Pitrou wrote: >> Hello, >> >> Like the email package, nntplib in py3k is broken (because of >> various bytes/str mismatches; I suppose the lack of a test suite >> didn't help when porting). >> >> I would like to take the opportunity to improve the API a bit; no >> heavy re-architecting, but simply a bunch of changes to make it >> higher-level. Is it acceptable? >> >> (and, yes, I would add a test suite) >> > >Given that backwards incompatible changes are likely to be unavoidable >due to the bytes / str issue, taking the opportunity to cleanup and >improve the API sounds great. Just a shame we didn't get to it for >3.0, but thank you for picking this up. A side benefit may be that Antoine finds some clever, useful, and more generally applicable techniques for dealing with byte/strings in these contexts.
Well... One clever, useful and generally applicable technique I'm currently using is "surrogateescape" combined with RFC 3977's standardization on UTF-8 for non-message data. (thanks Martin!)
But I don't think nntplib should implement any message parsing or decoding. Users will have to rely on the email module (or their own code) instead.
Regards
Antoine.
- Previous message: [Python-Dev] Rework nntlib?
- Next message: [Python-Dev] Rework nntlib?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]