From: Senthil Kumaran Date: Mon, 23 Jul 2012 02:31:36 +0000 (-0700) Subject: - Issue #15250: Document that filecmp.dircmp compares files shallowly. Patch contribu... X-Git-Tag: v3.3.0b2~123 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d74062948d890ca787721dbefd3ab8caf518c554;p=python - Issue #15250: Document that filecmp.dircmp compares files shallowly. Patch contributed by Chris Jerdonek. --- d74062948d890ca787721dbefd3ab8caf518c554 diff --cc Misc/NEWS index 62099bfa08,d8a581bc40..b9ee301333 --- a/Misc/NEWS +++ b/Misc/NEWS @@@ -142,342 -130,228 +142,345 @@@ Librar created and renamed over the old file when flush() is called on an mbox, MMDF or Babyl mailbox. -- Issue #14653: email.utils.mktime_tz() no longer relies on system - mktime() when timezone offest is supplied. +- Issue 10924: Fixed mksalt() to use a RNG that is suitable for cryptographic + purpose. -- Fix GzipFile's handling of filenames given as bytes objects. +- Issue #15184: Ensure consistent results of OS X configuration + tailoring for universal builds by factoring out common OS X-specific + customizations from sysconfig, distutils.sysconfig, distutils.util, + and distutils.unixccompiler into a new module _osx_support. -- Issue #15101: Make pool finalizer avoid joining current thread. +C API +----- -- Issue #15036: Mailbox no longer throws an error if a flush is done - between operations when removing or changing multiple items in mbox, - MMDF, or Babyl mailboxes. +- Issues #15169, #14599: Strip out the C implementation of + imp.source_from_cache() used by PyImport_ExecCodeModuleWithPathnames() and + used the Python code instead. Leads to PyImport_ExecCodeModuleObject() to not + try to infer the source path from the bytecode path as + PyImport_ExecCodeModuleWithPathnames() does. -- Issue #10133: Make multiprocessing deallocate buffer if socket read - fails. Patch by Hallvard B Furuseth. +Extension Modules +----------------- -- Issue #13854: Make multiprocessing properly handle non-integer - non-string argument to SystemExit. +- Issue #6493: An issue in ctypes on Windows that caused structure bitfields + of type ctypes.c_uint32 and width 32 to incorrectly be set has been fixed. -- Issue #12157: Make pool.map() empty iterables correctly. Initial - patch by mouad. +- Issue #15194: Update libffi to the 3.0.11 release. -- Issue #14992: os.makedirs(path, exist_ok=True) would raise an OSError - when the path existed and had the S_ISGID mode bit set when it was - not explicitly asked for. This is no longer an exception as mkdir - cannot control if the OS sets that bit for it or not. +Tools/Demos +----------- -- Issue #14962: Update text coloring in IDLE shell window after changing - options. Patch by Roger Serwy. +- Move importlib.test.benchmark to Tools/importbench. -- Issue #10997: Prevent a duplicate entry in IDLE's "Recent Files" menu. +- Issue #12605: The gdb hooks for debugging CPython (within Tools/gdb) have + been enhanced to show information on more C frames relevant to CPython within + the "py-bt" and "py-bt-full" commands: + * C frames that are waiting on the GIL + * C frames that are garbage-collecting + * C frames that are due to the invocation of a PyCFunction -- Issue #14443: Tell rpmbuild to use the correct version of Python in - bdist_rpm. Initial patch by Ross Lagerwall. +Documentation +------------- -- Issue #14929: Stop Idle 3.x from closing on Unicode decode errors when - grepping. Patch by Roger Serwy. +- Issue #15230: Clearly document some of the limitations of the runpy + module and nudge readers towards importlib when appropriate. -- Issue #12510: Attempting to get invalid tooltip no longer closes Idle. - Other tooltipss have been corrected or improved and the number of tests - has been tripled. Original patch by Roger Serwy. +- Issue #15053: Copy Python 3.3 import lock change notice to all relevant + functions in imp instead of just at the top of the relevant section. -- Issue #10365: File open dialog now works instead of crashing even when - the parent window is closed before the dialog. Patch by Roger Serwy. +- Issue #15288: Link to the term "loader" in notes in pkgutil about how things + won't work as expected in Python 3.3 and mark the requisite functions as + "changed" since they will no longer work with modules directly imported by + import itself. -- Issue #14876: Use user-selected font for highlight configuration. +- Issue #13557: Clarify effect of giving two different namespaces to exec or + execfile(). -- Issue #14920: Fix the help(urllib.parse) failure on locale C on terminals. - Have ascii characters in help. ++- Issue #15250: Document that filecmp.dircmp compares files shallowly. Patch ++ contributed by Chris Jerdonek. + -- Issue #14863: Update the documentation of os.fdopen() to reflect the - fact that it's only a thin wrapper around open() anymore. +Tests +----- -- Issue #14036: Add an additional check to validate that port in urlparse does - not go in illegal range and returns None. +- Issue #15168: Move importlib.test to test.test_importlib. -- Issue #14875: Use float('inf') instead of float('1e66666') in the json module. +- Issue #15091: Reactivate a test on UNIX which was failing thanks to a + forgotten importlib.invalidate_caches() call. -- Issue #14426: Correct the Date format in Expires attribute of Set-Cookie - Header in Cookie.py. +- Issue #15230: Adopted a more systematic approach in the runpy tests. -- Issue #14721: Send the correct 'Content-length: 0' header when the body is an - empty string ''. Initial Patch contributed by Arve Knudsen. +- Issue #15300: Ensure the temporary test working directories are in the same + parent folder when running tests in multiprocess mode from a Python build. + Patch by Chris Jerdonek. -- Issue #14072: Fix parsing of 'tel' URIs in urlparse by making the check for - ports stricter. +- Issue #15284: Skip {send,recv}msg tests in test_socket when IPv6 is not + enabled. Patch by Brian Brazil. -- Issue #9374: Generic parsing of query and fragment portions of url for any - scheme. Supported both by RFC3986 and RFC2396. +- Issue #15277: Fix a resource leak in support.py when IPv6 is disabled. + Patch by Brian Brazil. -- Issue #14798: Fix the functions in pyclbr to raise an ImportError - when the first part of a dotted name is not a package. Patch by - Xavier de Gaye. +Build +----- -- Issue #14829: Fix bisect and range() indexing with large indices - (>= 2 ** 32) under 64-bit Windows. +- Issue #14330: For cross builds, don't use host python, use host search paths + for host compiler. -- Issue #14777: tkinter may return undecoded UTF-8 bytes as a string when - accessing the Tk clipboard. Modify clipboad_get() to first request type - UTF8_STRING when no specific type is requested in an X11 windowing - environment, falling back to the current default type STRING if that fails. - Original patch by Thomas Kluyver. +- Issue #15235: Allow Berkley DB versions up to 5.3 to build the dbm module. -- Issue #12541: Be lenient with quotes around Realm field of HTTP Basic - Authentation in urllib2. +- Issue #15268: Search curses.h in /usr/include/ncursesw. -- Issue #14662: Prevent shutil failures on OS X when destination does not - support chflag operations. Patch by Hynek Schlawack. -- Issue #14157: Fix time.strptime failing without a year on February 29th. - Patch by Hynek Schlawack. +What's New in Python 3.3.0 Beta 1? +================================== -- Issue #14768: os.path.expanduser('~/a') doesn't works correctly when HOME is '/'. +*Release date: 27-Jun-2012* -- Issue #14741: Fix missing support for Ellipsis ('...') in parser module. +Core and Builtins +----------------- -- Issue #14697: Fix missing support for set displays and set comprehensions in - parser module. +- Fix a (most likely) very rare memory leak when calling main() and not being + able to decode a command-line argument. -- Issue #14701: Fix missing support for 'raise ... from' in parser module. +- Issue #14815: Use Py_ssize_t instead of long for the object hash, to + preserve all 64 bits of hash on Win64. -- Issue #13183: Fix pdb skipping frames after hitting a breakpoint and running - step. Patch by Xavier de Gaye. +- Issue #12268: File readline, readlines and read() or readall() methods + no longer lose data when an underlying read system call is interrupted. + IOError is no longer raised due to a read system call returning EINTR + from within these methods. -- Issue #14696: Fix parser module to understand 'nonlocal' declarations. +- Issue #11626: Add _SizeT functions to stable ABI. -- Issue #10941: Fix imaplib.Internaldate2tuple to produce correct result near - the DST transition. Patch by Joe Peterson. +- Issue #15146: Add PyType_FromSpecWithBases. Patch by Robin Schreiber. -- Issue #9154: Fix parser module to understand function annotations. +- Issue #15142: Fix reference leak when deallocating instances of types + created using PyType_FromSpec(). -- Issue #14664: It is now possible to use @unittest.skip{If,Unless} on a - test class that doesn't inherit from TestCase (i.e. a mixin). +- Issue #15042: Add PyState_AddModule and PyState_RemoveModule. Add version + guard for Py_LIMITED_API additions. Patch by Robin Schreiber. -- Issue #14160: TarFile.extractfile() failed to resolve symbolic links when - the links were not located in an archive subdirectory. +- Issue #10053: Don't close FDs when FileIO.__init__ fails. Loosely based on + the work by Hirokazu Yamamoto. -- Issue #14638: pydoc now treats non-string __name__ values as if they - were missing, instead of raising an error. +- Issue #15096: Removed support for ur'' as the raw notation isn't + compatible with Python 2.x's raw unicode strings. -- Issue #13684: Fix httplib tunnel issue of infinite loops for certain sites - which send EOF without trailing \r\n. +- Issue #13783: Generator objects now use the identifier APIs internally -- Issue #14629: Raise SyntaxError in tokenizer.detect_encoding if the - first two lines have non-UTF-8 characters without an encoding declaration. +- Issue #14874: Restore charmap decoding speed to pre-PEP 393 levels. + Patch by Serhiy Storchaka. -- Issue #14308: Fix an exception when a "dummy" thread is in the threading - module's active list after a fork(). +- Issue #15026: utf-16 encoding is now significantly faster (up to 10x). + Patch by Serhiy Storchaka. -- Issue #14538: HTMLParser can now parse correctly start tags that contain - a bare '/'. +- Issue #11022: open() and io.TextIOWrapper are now calling + locale.getpreferredencoding(False) instead of locale.getpreferredencoding() + in text mode if the encoding is not specified. Don't change temporary the + locale encoding using locale.setlocale(), use the current locale encoding + instead of the user preferred encoding. -- Issue #14452: SysLogHandler no longer inserts a UTF-8 BOM into the message. +- Issue #14673: Add Eric Snow's sys.implementation implementation. -- Issue #13496: Fix potential overflow in bisect.bisect algorithm when applied - to a collection of size > sys.maxsize / 2. +- Issue #15038: Optimize python Locks on Windows. -- Issue #14399: zipfile now recognizes that the archive has been modified even - if only the comment is changed. In addition, the TypeError that results from - trying to set a non-binary value as a comment is now now raised at the time - the comment is set rather than at the time the zipfile is written. +Library +------- -- Issue #7978: socketserver now restarts the select() call when EINTR is - returned. This avoids crashing the server loop when a signal is received. - Patch by Jerzy Kozera. +- Issue #15187: Bugfix: remove temporary directories test_shutil was leaving + behind. -- Issue #14496: Fix wrong name in idlelib/tabbedpages.py. - Patch by Popa Claudiu. +- Issue #15177: Added dir_fd parameter to os.fwalk(). -- Issue #14482: Raise a ValueError, not a NameError, when trying to create - a multiprocessing Client or Listener with an AF_UNIX type address under - Windows. Patch by Popa Claudiu. +- Issue #15176: Clarified behavior, documentation, and implementation + of os.listdir(). -- Issue #14151: Raise a ValueError, not a NameError, when trying to create - a multiprocessing Client or Listener with an AF_PIPE type address under - non-Windows platforms. Patch by Popa Claudiu. +- Issue #15061: Re-implemented hmac.compare_digest() in C to prevent further + timing analysis and to support all buffer protocol aware objects as well as + ASCII only str instances safely. -- Issue #13872: socket.detach() now marks the socket closed (as mirrored - in the socket repr()). Patch by Matt Joiner. +- Issue #15164: Change return value of platform.uname() from a + plain tuple to a collections.namedtuple. -- Issue #14406: Fix a race condition when using ``concurrent.futures.wait( - return_when=ALL_COMPLETED)``. Patch by Matt Joiner. +- Support Mageia Linux in the platform module. -- Issue #14409: IDLE now properly executes commands in the Shell window - when it cannot read the normal config files on startup and - has to use the built-in default key bindings. - There was previously a bug in one of the defaults. +- Issue #11678: Support Arch linux in the platform module. -- Issue #10340: asyncore - properly handle EINVAL in dispatcher constructor on - OSX; avoid to call handle_connect in case of a disconnected socket which - was not meant to connect. +- Issue #15118: Change return value of os.uname() and os.times() from + plain tuples to immutable iterable objects with named attributes + (structseq objects). -- Issue #12757: Fix the skipping of doctests when python is run with -OO so - that it works in unittest's verbose mode as well as non-verbose mode. +- Speed up _decimal by another 10-15% by caching the thread local context + that was last accessed. In the pi benchmark (64-bit platform, prec=9), + _decimal is now only 1.5x slower than float. -- Issue #3573: IDLE hangs when passing invalid command line args - (directory(ies) instead of file(s)) (Patch by Guilherme Polo) +- Remove the packaging module, which is not ready for prime time. -- Issue #13694: asynchronous connect in asyncore.dispatcher does not set addr - attribute. +- Issue #15154: Add "dir_fd" parameter to os.rmdir, remove "rmdir" + parameter from os.remove / os.unlink. -- Issue #11686: Added missing entries to email package __all__ lists - (mostly the new Bytes classes). +- Issue #4489: Add a shutil.rmtree that isn't susceptible to symlink attacks. + It is used automatically on platforms supporting the necessary os.openat() + and os.unlinkat() functions. Main code by Martin von Löwis. -- Issue #10484: Fix the CGIHTTPServer's PATH_INFO handling problem. +- Issue #15156: HTMLParser now uses the new "html.entities.html5" dictionary. -- Issue #11199: Fix the with urllib which hangs on particular ftp urls. +- Issue #11113: add a new "html5" dictionary containing the named character + references defined by the HTML5 standard and the equivalent Unicode + character(s) to the html.entities module. -- Issue #14062: Header objects now correctly respect the 'linesep' setting - when processed by BytesParser (which smtplib.SMTP.send_message uses). +- Issue #15114: the strict mode of HTMLParser and the HTMLParseError exception + are deprecated now that the parser is able to parse invalid markup. -- Issue #14291: Email now defaults to utf-8 for non-ASCII unicode headers - instead of raising an error. This fixes a regression relative to 2.7. +- Issue #3665: \u and \U escapes are now supported in unicode regular + expressions. Patch by Serhiy Storchaka. -- Issue #5219: Prevent event handler cascade in IDLE. +- Issue #15153: Added inspect.getgeneratorlocals to simplify white box + testing of generator state updates -- Issue #14184: Increase the default stack size for secondary threads on - Mac OS X to avoid interpreter crashes when using threads on 10.7. +- Issue #13062: Added inspect.getclosurevars to simplify testing stateful + closures -- Issue #10543: Fix unittest test discovery with Jython bytecode files. +- Issue #11024: Fixes and additional tests for Time2Internaldate. -- Issue #14252: Fix subprocess.Popen.terminate() to not raise an error under - Windows when the child process has already exited. +- Issue #14626: Large refactoring of functions / parameters in the os module. + Many functions now support "dir_fd" and "follow_symlinks" parameters; + some also support accepting an open file descriptor in place of of a path + string. Added os.support_* collections as LBYL helpers. Removed many + functions only previously seen in 3.3 alpha releases (often starting with + "f" or "l", or ending with "at"). Originally suggested by Serhiy Storchaka; + implemented by Larry Hastings. -- Issue #14195: An issue that caused weakref.WeakSet instances to incorrectly - return True for a WeakSet instance 'a' in both 'a < a' and 'a > a' has been - fixed. +- Issue #15008: Implement PEP 362 "Signature Objects". + Patch by Yury Selivanov. -- Issue #14177: marshal.loads() now raises TypeError when given an unicode - string. Patch by Guilherme Gonçalves. +- Issue: #15138: base64.urlsafe_{en,de}code() are now 3-4x faster. -- Issue #14159: Fix the len() of weak containers (WeakSet, WeakKeyDictionary, - WeakValueDictionary) to return a better approximation when some objects - are dead or dying. Moreover, the implementation is now O(1) rather than - O(n). +- Issue #444582: Add shutil.which, for finding programs on the system path. + Original patch by Erik Demaine, with later iterations by Jan Killian + and Brian Curtin. -- Issue #13125: Silence spurious test_lib2to3 output when in non-verbose mode. - Patch by Mikhail Novikov. +- Issue #14837: SSL errors now have ``library`` and ``reason`` attributes + describing precisely what happened and in which OpenSSL submodule. The + str() of a SSLError is also enhanced accordingly. -- Issue #13447: Add a test file to host regression tests for bugs in the - scripts found in the Tools directory. +- Issue #9527: datetime.astimezone() method will now supply a class + timezone instance corresponding to the system local timezone when + called with no arguments. -- Issue #8033: sqlite3: Fix 64-bit integer handling in user functions - on 32-bit architectures. Initial patch by Philippe Devalkeneer. +- Issue #14653: email.utils.mktime_tz() no longer relies on system + mktime() when timezone offest is supplied. + +- Issue #14684: zlib.compressobj() and zlib.decompressobj() now support the use + of predefined compression dictionaries. Original patch by Sam Rushing. + +- Fix GzipFile's handling of filenames given as bytes objects. + +- Issue #14772: Return destination values from some shutil functions. + +- Issue #15064: Implement context manager protocol for multiprocessing types + +- Issue #15101: Make pool finalizer avoid joining current thread. + +- Issue #14657: The frozen instance of importlib used for bootstrap is now + also the module imported as importlib._bootstrap. + +- Issue #14055: Add __sizeof__ support to _elementtree. + +- Issue #15054: A bug in tokenize.tokenize that caused string literals + with 'b' prefixes to be incorrectly tokenized has been fixed. + Patch by Serhiy Storchaka. + +- Issue #15006: Allow equality comparison between naive and aware + time or datetime objects. + +- Issue #14982: Document that pkgutil's iteration functions require the + non-standard iter_modules() method to be defined by an importer (something + the importlib importers do not define). + +- Issue #15036: Mailbox no longer throws an error if a flush is done + between operations when removing or changing multiple items in mbox, + MMDF, or Babyl mailboxes. + +- Issue #14059: Implement multiprocessing.Barrier. + +- Issue #15061: The inappropriately named hmac.secure_compare has been + renamed to hmac.compare_digest, restricted to operating on bytes inputs + only and had its documentation updated to more accurately reflect both its + intent and its limitations + +- Issue #13841: Make child processes exit using sys.exit() on Windows. + +- Issue #14936: curses_panel was converted to PEP 3121 and PEP 384 API. + Patch by Robin Schreiber. + +- Issue #1667546: On platforms supporting tm_zone and tm_gmtoff fields + in struct tm, time.struct_time objects returned by time.gmtime(), + time.localtime() and time.strptime() functions now have tm_zone and + tm_gmtoff attributes. Original patch by Paul Boddie. + +- Rename adjusted attribute to adjustable in time.get_clock_info() result. + +- Issue #3518: Remove references to non-existent BaseManager.from_address() + method. + +- Issue #13857: Added textwrap.indent() function (initial patch by Ezra + Berch) + +- Issue #2736: Added datetime.timestamp() method. + +- Issue #13854: Make multiprocessing properly handle non-integer + non-string argument to SystemExit. + +- Issue #12157: Make pool.map() empty iterables correctly. Initial + patch by mouad. + +- Issue #11823: disassembly now shows argument counts on calls with keyword args. + +- Issue #14711: os.stat_float_times() has been deprecated. + +- LZMAFile now accepts the modes "rb"/"wb"/"ab" as synonyms of "r"/"w"/"a". + +- The bz2 and lzma modules now each contain an open() function, allowing + compressed files to readily be opened in text mode as well as binary mode. + +- BZ2File.__init__() and LZMAFile.__init__() now accept a file object as their + first argument, rather than requiring a separate "fileobj" argument. + +- gzip.open() now accepts file objects as well as filenames. + +- Issue #14992: os.makedirs(path, exist_ok=True) would raise an OSError + when the path existed and had the S_ISGID mode bit set when it was + not explicitly asked for. This is no longer an exception as mkdir + cannot control if the OS sets that bit for it or not. + +- Issue #14989: Make the CGI enable option to http.server available via command + line. + +- Issue #14987: Add a missing import statement to inspect. + +- Issue #1079: email.header.decode_header now correctly parses all the examples + in RFC2047. There is a necessary visible behavior change: the leading and/or + trailing whitespace on ASCII parts is now preserved. + +- Issue #14969: Better handling of exception chaining in contextlib.ExitStack + +- Issue #14962: Update text coloring in IDLE shell window after changing + options. Patch by Roger Serwy. + +- Issue #14963: Convert contextlib.ExitStack.__exit__ to use an iterative + algorithm (Patch by Alon Horev) + +- Issue #14785: Add sys._debugmallocstats() to help debug low-level memory + allocation issues + +- Issue #14443: Ensure that .py files are byte-compiled with the correct Python + executable within bdist_rpm even on older versions of RPM + +C-API +----- + +- Issue #13783: Inadvertent additions to the public C API in the PEP 380 + implementation have either been removed or marked as private interfaces. Extension Modules -----------------