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.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4