New submission from Julien ÉLIE:
Building Python 2.7.8 on AIX 7.1 gives the following warnings:
Parser/pgen.c:282:9: warning: variable 'i' set but not used
[-Wunused-but-set-variable]
Include/objimpl.h:164:66: warning: right-hand operand of comma expression has
no effect [-Wun
Julien ÉLIE added the comment:
A drawback is that CAPABILITIES will still being unsent after an upgrade of the
news server to a more up-to-date version supporting the command.
If CAPABILITIES is not understood by the news server, it is not an issue. A
500 response code is usually answered
Julien ÉLIE added the comment:
> +Whether posting is allowed depends on whether it
> +is included in results of CAPABILITIES; see
> +RFC 3977 section 5.1.2.
> +Deprecated:
> If the response code is 200, posting is allowed;
>
Julien ÉLIE added the comment:
RFC 4616 about SASL PLAIN:
The mechanism consists of a single message, a string of [UTF-8]
encoded [Unicode] characters, from the client to the server. The
client presents the authorization identity (identity to act as),
followed by a NUL (U+
Julien ÉLIE added the comment:
> More significant than my own potentially newbie-ish
> opinion is that the RFC suggests as a valid use case
> the idea of a client starting up TLS or authentication
> in reaction to a 483 command response, rather than right
> off the bat.
Yes.
Julien ÉLIE added the comment:
(Note that smtplib can give ideas for an implementation of AUTHINFO SASL with
PLAIN, LOGIN and CRAM-MD5 mechanisms.)
--
___
Python tracker
<http://bugs.python.org/issue1
Julien ÉLIE added the comment:
Hi Steven,
I agree with what you suggest for the implementation.
> Is there a case where a server advertises STARTTLS
> and one would not use it?
Yes, the overhead added by the encryption. It is what people usually mention
for the reason not to
Julien ÉLIE added the comment:
Hi Steven,
> I also don't understand why START_TLS and AUTHINFO need to change
> how the module is interfaced to (separating log in/authentication, etc)
Because once you have used AUTHINFO, STARTTLS is no longer a valid command in a
session.
The aut
Julien ÉLIE added the comment:
I quote what Russ Allbery has just answered on news.software.nntp:
It's completely unspecified what encoding to use for AUTHINFO USER/PASS,
which is one of the problems fixed by SASL. Clients should always use
SASL where possible because of things like
Julien ÉLIE added the comment:
OK, I understand. I believe it works fine in practice, because people often
use ASCII-only characters... I assume it is going to be a problem when the
passwords contain 8-bit characters.
I doubt it will work fine if I use different news readers on different
Julien ÉLIE added the comment:
The "nntp_implementation" attribute would be great.
OK for the exception.
--
___
Python tracker
<http://bugs.python.o
Julien ÉLIE added the comment:
>> * starttls() should probably test the `tls_on` attribute first and
>> raise a ValueError if True (as you point out, a client mustn't attempt
>> to start a new TLS session if one is already active).
>
> ...I actually meant to do ex
Julien ÉLIE added the comment:
> My conclusion in working on the email package is that only
> the first space after the ':', if it exists, should be stripped.
> That is, even though the RFC (for email) reads as if the space
> after the colon is part of the value, in practi
Julien ÉLIE added the comment:
> Er, so you're disagreeing with your previous message?
> Or am I missing something? :)
I was saying that if an empty string is returned, then it means that the header
exists and is empty. An example was "User-Agent: \r\n".
And my rema
Julien ÉLIE added the comment:
OK, thanks.
By the way, why is the token stripped?
token = token[len(h):].lstrip(" ")
"X-Header: test \r\n" in an header is kept in the overview as-is.
I do not see why " test " should not be the value returned.
Also, wit
Julien ÉLIE added the comment:
> Unless I'm mistaken, Content-Type should only apply to the body, not the
> headers. Either the headers use UTF-8 (RFC 3977), or they should be
> MIME-encoded. Everything else is undecodable.
Yes, of course. Such articles are not RFC-complian
Julien ÉLIE added the comment:
The empty string would mean the header exists, and is empty (though not
RFC-compliant).
For instance:
"User-Agent: \r\n"
I believe None is better.
--
___
Python tracker
<http://bugs.python.o
Julien ÉLIE added the comment:
Antoine, a news client could guess it because of the Content-Type: header field
(in this example, it mentions charset="gb2312").
Yet, articles without a Content-Type: header field exist in the wild...
There is no way to always make the right guess, unf
Julien ÉLIE added the comment:
David, the headers are not at all supposed to be "utf-8" encoded.
For instance, have a look at the cn.bbs.comp.lang.python newsgroup:
http://groups.google.fr/group/cn.bbs.comp.lang.python
If you look at the source of the articles, you will for instanc
Julien ÉLIE added the comment:
Thanks a lot for having implemented STARTTLS, Andrew!
That's great news!
+Since the order in which certain operations need to be done varies
+between normal, SSL, and STARTTLS connections varies, some
+initialization must be done i
New submission from Julien ÉLIE :
RFC 4643:
The server MAY list the AUTHINFO capability with no arguments, which
indicates that it complies with this specification and does not
permit any authentication commands in its current state. In this
case, the client MUST NOT attempt to
Julien ÉLIE added the comment:
Maybe the bug should be reopened -- or the subject changed -- because the real
issue is when I read:
# Incompatible changes from the 2.x nntplib:
# - all commands are encoded as UTF-8 data (using the "surrogateescape"
# error handler), except for r
Julien ÉLIE added the comment:
Éric: there is no notion of encoding in a few NNTP commands.
Regarding AUTHINFO, the real string that I should have written is:
AUTHINFO USER \xC9ric
7-bit bytes are considered to be encoded in ASCII.
8-bit bytes are just 8-bit bytes. No encoding.
The news
Julien ÉLIE added the comment:
David: no, the RFC does not mention UTF-8 about AUTHINFO.
Please note the subtlety:
command =/ authinfo-sasl-command /
authinfo-user-command /
authinfo-pass-command
authinfo-sasl-command = "AUTHINFO" WS "SASL" WS m
Julien ÉLIE added the comment:
Yes, you're right.
I meant to say that AUTHINFO is not expecting a UTF-8-encoded string.
For instance:
AUTHINFO USER Éric
is valid and should not always be transformed by nntplib to:
AUTHINFO USER Éric
News servers do a byte-string comparison (as spec
Julien ÉLIE added the comment:
Traceback (most recent call last):
File "nntplib-test.py", line 10, in
print(s.descriptions('*'))
File "C:\Program Files\Python32\lib\encodings\cp850.py", line 19, in encode
return codecs.charmap_encode(inp
Julien ÉLIE added the comment:
Regarding these two possibilities, please note that the first one is
discouraged (per RFC 4642).
STARTTLS is the preferrable way to start a TLS session.
In some existing implementations, TCP port 563 has been dedicated to
NNTP over TLS. These
Changes by Julien ÉLIE :
--
components: +Unicode
___
Python tracker
<http://bugs.python.org/issue10284>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Julien ÉLIE :
> +.. method:: NNTP.list(*, file=None)
> +
> + Send a ``LIST`` command. Return a pair ``(response, list)`` where *list*
> is a
> + list of tuples representing all the groups available from this NNTP
> server.
> + Each tuple has th
New submission from Julien ÉLIE :
> +# - all commands are encoded as UTF-8 data (using the "surrogateescape"
> +# error handler), except for raw message data (POST, IHAVE)
> +# - all responses are decoded as UTF-8 data (using the "surrogateescape"
> +# error
New submission from Julien ÉLIE :
NNTP.list(*, file=None)
Couldn't a "grouppattern" argument be added?
LIST ACTIVE handles a newsgroup pattern (and it would then answer
less groups -- also useful for the test suite of nntplib)
Something like that:
--- nntplib.py.OLD 2
New submission from Julien ÉLIE :
I believe the case of "IMPLEMENTATION" should be treated differently.
It is not helpful at all to split the argument. It is meant to be a
text string and ['INN', '2.6.0', '(20101101', 'prelease)'] does not
New submission from Julien ÉLIE :
Following the first example of the documentation:
import nntplib
s = nntplib.NNTP('news.trigofacile.com')
resp, count, first, last, name = s.group('fr.comp.lang.python')
print('Group', name, 'has', count, 'article
New submission from Julien ÉLIE :
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
34 matches
Mail list logo