New submission from Julien ÉLIE <[email protected]>:
The NNTP version is currently defined as follows in the source code:
self.nntp_version = int(caps['VERSION'][0])
However, Section 3.3.2 of RFC 3977 mentions:
VERSION
This capability MUST be advertised by all servers and MUST be the
first capability in the capability list; it indicates the
version(s) of NNTP that the server supports. There must be at
least one argument; each argument is a decimal number and MUST NOT
have a leading zero. Version numbers are assigned only in RFCs
that update or replace this specification; servers MUST NOT create
their own version numbers.
There can be more than one version.
See the example in Section 5.2.3:
[S] VERSION 2 3
I believe the best thing to do would be to take the max of the numbers, that is
to say:
self.nntp_version = max(map(int, caps['VERSION']))
----------
components: Extension Modules
messages: 120156
nosy: jelie
priority: normal
severity: normal
status: open
title: nntp_version set to the most recent advertised version
type: behavior
versions: Python 3.2
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue10280>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com