[Patches] [ python-Patches-605370 ] nntplib: group descriptions and RFC2980

noreply@sourceforge.net noreply@sourceforge.net
Thu, 05 Sep 2002 19:37:41 -0700


Patches item #605370, was opened at 2002-09-06 04:37
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=605370&group_id=5470

Category: Library (Lib)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Jürgen A. Erhard (jae)
Assigned to: Nobody/Anonymous (nobody)
Summary: nntplib: group descriptions and RFC2980

Initial Comment:
nntplib's NNTP.xgtitle() is deprecated by RFC2980.  And
some servers
(like leafnode) don't even know XGTITLE.

This adds two methods to NNTP, description and
descriptions.

NNTP.description just gets the description of one group
(and doesn't
return the server status code).

NNTP.descriptions does the same as xgtitle does now, but in
a more general, and RFC2980 compliant way.

It tries the RFC2980 way (LIST NEWSGROUPS) and if this
fails,
falls back to XGTITLE.

This patch also adds an new optional "groups" argument
to the
NNTP.list.  I thought it fitting to mirror the
"LIST/LIST NEWSGROUPS" in the method.

Feel free to kill this part, I'm not really attached to
it.  I do prefer description/descriptions, as they make
the code more self-documenting.

(If you insist: I'm on Debian GNU/Linux "sid",
python2.2.1... but the patch should apply cleanly
against CVS, doerwalter's checkin
shouldn't conflict)

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=605370&group_id=5470