*** C:/Python32/Lib/nntplib.py Mon May 16 07:41:50 2011 --- C:/Python32/Lib/nntplib2.py Sat Nov 05 21:10:55 2011 *************** *** 305,311 **** errors = 'surrogateescape' def __init__(self, file, host, ! readermode=None, timeout=_GLOBAL_DEFAULT_TIMEOUT): """Initialize an instance. Arguments: - file: file-like object (open for read/write in binary mode) - host: hostname of the server --- 305,311 ---- errors = 'surrogateescape' def __init__(self, file, host, ! readermode=None, timeout=_GLOBAL_DEFAULT_TIMEOUT, capabilities=True): """Initialize an instance. Arguments: - file: file-like object (open for read/write in binary mode) - host: hostname of the server *************** *** 341,347 **** # Inquire about capabilities (RFC 3977). self._caps = None ! self.getcapabilities() # Log in and encryption setup order is left to subclasses. self.authenticated = False --- 341,348 ---- # Inquire about capabilities (RFC 3977). self._caps = None ! if capabilities: ! self.getcapabilities() # Log in and encryption setup order is left to subclasses. self.authenticated = False *************** *** 987,993 **** def __init__(self, host, port=NNTP_PORT, user=None, password=None, readermode=None, usenetrc=False, ! timeout=_GLOBAL_DEFAULT_TIMEOUT): """Initialize an instance. Arguments: - host: hostname to connect to - port: port to connect to (default the standard NNTP port) --- 988,994 ---- def __init__(self, host, port=NNTP_PORT, user=None, password=None, readermode=None, usenetrc=False, ! timeout=_GLOBAL_DEFAULT_TIMEOUT, capabilities=True): """Initialize an instance. Arguments: - host: hostname to connect to - port: port to connect to (default the standard NNTP port) *************** *** 1010,1016 **** self.sock = socket.create_connection((host, port), timeout) file = self.sock.makefile("rwb") _NNTPBase.__init__(self, file, host, ! readermode, timeout) if user or usenetrc: self.login(user, password, usenetrc) --- 1011,1017 ---- self.sock = socket.create_connection((host, port), timeout) file = self.sock.makefile("rwb") _NNTPBase.__init__(self, file, host, ! readermode, timeout, capabilities) if user or usenetrc: self.login(user, password, usenetrc) *************** *** 1027,1033 **** def __init__(self, host, port=NNTP_SSL_PORT, user=None, password=None, ssl_context=None, readermode=None, usenetrc=False, ! timeout=_GLOBAL_DEFAULT_TIMEOUT): """This works identically to NNTP.__init__, except for the change in default port and the `ssl_context` argument for SSL connections. """ --- 1028,1034 ---- def __init__(self, host, port=NNTP_SSL_PORT, user=None, password=None, ssl_context=None, readermode=None, usenetrc=False, ! timeout=_GLOBAL_DEFAULT_TIMEOUT, capabilities=True): """This works identically to NNTP.__init__, except for the change in default port and the `ssl_context` argument for SSL connections. """ *************** *** 1035,1041 **** self.sock = _encrypt_on(self.sock, ssl_context) file = self.sock.makefile("rwb") _NNTPBase.__init__(self, file, host, ! readermode=readermode, timeout=timeout) if user or usenetrc: self.login(user, password, usenetrc) --- 1036,1042 ---- self.sock = _encrypt_on(self.sock, ssl_context) file = self.sock.makefile("rwb") _NNTPBase.__init__(self, file, host, ! readermode, timeout, capabilities) if user or usenetrc: self.login(user, password, usenetrc)