[issue22463] Warnings when building on AIX

2014-09-22 Thread Julien ÉLIE
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 [-Wunused-value

[issue10287] NNTP authentication should check capabilities

2011-11-06 Thread Julien ÉLIE
Julien ÉLIE jul...@trigofacile.com 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

[issue5209] nntplib needs updating to RFC 3977

2010-11-28 Thread Julien ÉLIE
Julien ÉLIE jul...@trigofacile.com 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

[issue10284] NNTP should accept bytestrings for username and password

2010-11-12 Thread Julien ÉLIE
Julien ÉLIE jul...@trigofacile.com 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

[issue1926] NNTPS support in nntplib

2010-11-06 Thread Julien ÉLIE
Julien ÉLIE jul...@trigofacile.com 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

[issue1926] NNTPS support in nntplib

2010-11-05 Thread Julien ÉLIE
Julien ÉLIE jul...@trigofacile.com 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

[issue1926] NNTPS support in nntplib

2010-11-05 Thread Julien ÉLIE
Julien ÉLIE jul...@trigofacile.com added the comment: (Note that smtplib can give ideas for an implementation of AUTHINFO SASL with PLAIN, LOGIN and CRAM-MD5 mechanisms.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1926

[issue1926] NNTPS support in nntplib

2010-11-04 Thread Julien ÉLIE
Julien ÉLIE jul...@trigofacile.com 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

[issue10281] Exception raised when an NNTP overview field is absent

2010-11-03 Thread Julien ÉLIE
Julien ÉLIE jul...@trigofacile.com 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 remark I

[issue10281] Exception raised when an NNTP overview field is absent

2010-11-03 Thread Julien ÉLIE
Julien ÉLIE jul...@trigofacile.com 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 practice

[issue1926] NNTPS support in nntplib

2010-11-03 Thread Julien ÉLIE
Julien ÉLIE jul...@trigofacile.com 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 exactly

[issue10282] IMPLEMENTATION token differently delt with in NNTP capability

2010-11-03 Thread Julien ÉLIE
Julien ÉLIE jul...@trigofacile.com added the comment: The nntp_implementation attribute would be great. OK for the exception. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10282

[issue10284] NNTP should accept bytestrings for username and password

2010-11-03 Thread Julien ÉLIE
Julien ÉLIE jul...@trigofacile.com 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

[issue10284] NNTP should accept bytestrings for username and password

2010-11-03 Thread Julien ÉLIE
Julien ÉLIE jul...@trigofacile.com 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

[issue1926] NNTPS support in nntplib

2010-11-02 Thread Julien ÉLIE
Julien ÉLIE jul...@trigofacile.com 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

[issue10284] Exception raised when decoding NNTP newsgroup descriptions

2010-11-02 Thread Julien ÉLIE
Julien ÉLIE jul...@trigofacile.com 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

[issue10284] Exception raised when decoding NNTP newsgroup descriptions

2010-11-02 Thread Julien ÉLIE
Julien ÉLIE jul...@trigofacile.com 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

[issue10281] Exception raised when an NNTP overview field is absent

2010-11-02 Thread Julien ÉLIE
Julien ÉLIE jul...@trigofacile.com 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 rep...@bugs.python.org

[issue10284] Exception raised when decoding NNTP newsgroup descriptions

2010-11-02 Thread Julien ÉLIE
Julien ÉLIE jul...@trigofacile.com 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

[issue10281] Exception raised when an NNTP overview field is absent

2010-11-02 Thread Julien ÉLIE
Julien ÉLIE jul...@trigofacile.com 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, with: token = token

[issue10280] nntp_version set to the most recent advertised version

2010-11-01 Thread Julien ÉLIE
New submission from Julien ÉLIE jul...@trigofacile.com: 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

[issue10281] Exception raised when an NNTP overview field is absent

2010-11-01 Thread Julien ÉLIE
New submission from Julien ÉLIE jul...@trigofacile.com: 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, 'articles, range', first

[issue10282] IMPLEMENTATION token differently delt with in NNTP capability

2010-11-01 Thread Julien ÉLIE
New submission from Julien ÉLIE jul...@trigofacile.com: 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 have much meaning... Suggestion

[issue10283] New parameter for an NNTP newsgroup pattern in LIST ACTIVE

2010-11-01 Thread Julien ÉLIE
New submission from Julien ÉLIE jul...@trigofacile.com: 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

[issue10284] Exception raised when decoding NNTP newsgroup descriptions

2010-11-01 Thread Julien ÉLIE
New submission from Julien ÉLIE jul...@trigofacile.com: +# - 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 handler), except

[issue10285] Other status field flags in documentation for NNTP LIST command

2010-11-01 Thread Julien ÉLIE
New submission from Julien ÉLIE jul...@trigofacile.com: +.. 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 the form

[issue10284] Exception raised when decoding NNTP newsgroup descriptions

2010-11-01 Thread Julien ÉLIE
Changes by Julien ÉLIE jul...@trigofacile.com: -- components: +Unicode ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10284 ___ ___ Python-bugs

[issue1926] NNTPS support in nntplib

2010-11-01 Thread Julien ÉLIE
Julien ÉLIE jul...@trigofacile.com 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

[issue10284] Exception raised when decoding NNTP newsgroup descriptions

2010-11-01 Thread Julien ÉLIE
Julien ÉLIE jul...@trigofacile.com added the comment: Traceback (most recent call last): File nntplib-test.py, line 10, in module print(s.descriptions('*')) File C:\Program Files\Python32\lib\encodings\cp850.py, line 19, in encode return codecs.charmap_encode(input,self.errors

[issue10284] Exception raised when decoding NNTP newsgroup descriptions

2010-11-01 Thread Julien ÉLIE
Julien ÉLIE jul...@trigofacile.com 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

[issue10284] Exception raised when decoding NNTP newsgroup descriptions

2010-11-01 Thread Julien ÉLIE
Julien ÉLIE jul...@trigofacile.com 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

[issue10284] Exception raised when decoding NNTP newsgroup descriptions

2010-11-01 Thread Julien ÉLIE
Julien ÉLIE jul...@trigofacile.com 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

[issue10284] Exception raised when decoding NNTP newsgroup descriptions

2010-11-01 Thread Julien ÉLIE
Julien ÉLIE jul...@trigofacile.com 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

[issue10287] NNTP authentication should check capabilities

2010-11-01 Thread Julien ÉLIE
New submission from Julien ÉLIE jul...@trigofacile.com: 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