Use functools.reduce() in difflib instead of __builtin__.reduce() to silence
warnings when running under -3.
This commit is contained in:
parent
83e818415a
commit
46265860c2
|
@ -34,6 +34,7 @@ __all__ = ['get_close_matches', 'ndiff', 'restore', 'SequenceMatcher',
|
||||||
|
|
||||||
import heapq
|
import heapq
|
||||||
from collections import namedtuple as _namedtuple
|
from collections import namedtuple as _namedtuple
|
||||||
|
from functools import reduce
|
||||||
|
|
||||||
Match = _namedtuple('Match', 'a b size')
|
Match = _namedtuple('Match', 'a b size')
|
||||||
|
|
||||||
|
|
10
Misc/NEWS
10
Misc/NEWS
|
@ -60,11 +60,11 @@ Library
|
||||||
|
|
||||||
- Changed code in the following modules/packages to remove warnings raised
|
- Changed code in the following modules/packages to remove warnings raised
|
||||||
while running under the ``-3`` flag: aifc, asynchat, asyncore, bdb, bsddb,
|
while running under the ``-3`` flag: aifc, asynchat, asyncore, bdb, bsddb,
|
||||||
ConfigParser, cookielib, DocXMLRPCServer, email, filecmp, fileinput, inspect,
|
ConfigParser, cookielib, difflib, DocXMLRPCServer, email, filecmp, fileinput,
|
||||||
logging, modulefinder, pdb, pickle, profile, pstats, pydoc, re, rlcompleter,
|
inspect, logging, modulefinder, pdb, pickle, profile, pstats, pydoc, re,
|
||||||
SimpleXMLRPCServer, shelve, socket, subprocess, sqlite3, tarfile, Tkinter,
|
rlcompleter, SimpleXMLRPCServer, shelve, socket, subprocess, sqlite3,
|
||||||
test.test_support, textwrap, threading, tokenize, traceback, urlparse,
|
tarfile, Tkinter, test.test_support, textwrap, threading, tokenize,
|
||||||
wsgiref, xml, xmlrpclib.
|
traceback, urlparse, wsgiref, xml, xmlrpclib.
|
||||||
|
|
||||||
- Issue #3039: Fix tarfile.TarFileCompat.writestr() which always
|
- Issue #3039: Fix tarfile.TarFileCompat.writestr() which always
|
||||||
raised an AttributeError.
|
raised an AttributeError.
|
||||||
|
|
Loading…
Reference in New Issue