cpython: ec196a99af8d (original) (raw)

Mercurial > cpython

changeset 93328:ec196a99af8d

Issue #6623: Remove deprecated Netrc class in the ftplib module. Patch by Matt Chaput. [#6623]

Berker Peksag berker.peksag@gmail.com
date Sat, 01 Nov 2014 10:45:57 +0200
parents 26d0a17affb5
children 193ac288bc7f
files Doc/whatsnew/3.5.rst Lib/ftplib.py Lib/test/test_ftplib.py Misc/ACKS Misc/NEWS
diffstat 5 files changed, 23 insertions(+), 129 deletions(-)[+] [-] Doc/whatsnew/3.5.rst 8 Lib/ftplib.py 117 Lib/test/test_ftplib.py 23 Misc/ACKS 1 Misc/NEWS 3

line wrap: on

line diff

--- a/Doc/whatsnew/3.5.rst +++ b/Doc/whatsnew/3.5.rst @@ -369,10 +369,18 @@ Deprecated features Removed ======= +API and Feature Removals +------------------------ + +The following obsolete and previously deprecated APIs and features have been +removed: +

--- a/Lib/ftplib.py +++ b/Lib/ftplib.py @@ -42,7 +42,7 @@ import socket import warnings from socket import _GLOBAL_DEFAULT_TIMEOUT -all = ["FTP", "Netrc"] +all = ["FTP"]

Magic number from <socket.h>

MSG_OOB = 0x1 # Process data out of band @@ -920,115 +920,6 @@ def ftpcp(source, sourcename, target, ta target.voidresp() -class Netrc:

-

-

-

-

-

-

-

-

-

-

- - - def test(): '''Test program. Usage: ftp [-d] [-r[file]] host [-l[dir]] [-d[dir]] [-p] [file] ... @@ -1042,6 +933,8 @@ def test(): print(test.doc) sys.exit(0)

+ debugging = 0 rcfile = None while sys.argv[1] == '-d': @@ -1056,14 +949,14 @@ def test(): ftp.set_debuglevel(debugging) userid = passwd = acct = '' try:

--- a/Lib/test/test_ftplib.py +++ b/Lib/test/test_ftplib.py @@ -76,7 +76,7 @@ class DummyDTPHandler(asynchat.async_cha super(DummyDTPHandler, self).push(what.encode('ascii')) def handle_error(self):

class DummyFTPHandler(asynchat.async_chat): @@ -121,7 +121,7 @@ class DummyFTPHandler(asynchat.async_cha self.push('550 command "%s" not understood.' %cmd) def handle_error(self):

def push(self, data): asynchat.async_chat.push(self, data.encode('ascii') + b'\r\n') @@ -299,7 +299,7 @@ class DummyFTPServer(asyncore.dispatcher return 0 def handle_error(self):

if ssl is not None: @@ -397,7 +397,7 @@ if ssl is not None: raise def handle_error(self):

def close(self): if (isinstance(self.socket, ssl.SSLSocket) and @@ -673,7 +673,7 @@ class TestFTPClass(TestCase): self.assertRaises(StopIteration, next, self.client.mlsd()) set_data('') for x in self.client.mlsd():

def test_makeport(self): with self.client.makeport(): @@ -1053,19 +1053,8 @@ class TestTimeouts(TestCase): ftp.close() -class TestNetrcDeprecation(TestCase): -

- - - def test_main():

--- a/Misc/ACKS +++ b/Misc/ACKS @@ -233,6 +233,7 @@ Godefroid Chapelle Brad Chapman Greg Chapman Mitch Chapman +Matt Chaput Yogesh Chaudhari David Chaum Nicolas Chauvat

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -180,6 +180,9 @@ Core and Builtins Library ------- +- Issue #6623: Remove deprecated Netrc class in the ftplib module. Patch by