]> granicus.if.org Git - python/commitdiff
Merge fixes for #13854 and #12157.
authorRichard Oudkerk <shibturn@gmail.com>
Thu, 7 Jun 2012 19:38:11 +0000 (20:38 +0100)
committerRichard Oudkerk <shibturn@gmail.com>
Thu, 7 Jun 2012 19:38:11 +0000 (20:38 +0100)
1  2 
Lib/multiprocessing/pool.py
Lib/multiprocessing/process.py
Lib/test/test_multiprocessing.py
Misc/NEWS

index 149e32a0e1c6ae0b177f77dd9b023dc1bea28b33,ccee9612d4cc2bd7a226e5dcd0d56a8f166ab569..7f5a7e329665763cb5173d9278fcd4abc3983a85
@@@ -575,7 -583,8 +575,8 @@@ class MapResult(ApplyResult)
          self._chunksize = chunksize
          if chunksize <= 0:
              self._number_left = 0
 -            self._ready = True
 +            self._event.set()
+             del cache[self._job]
          else:
              self._number_left = length//chunksize + bool(length % chunksize)
  
Simple merge
Simple merge
diff --cc Misc/NEWS
index 70feaf0cf6f7ef52f288fda855acab39e5a1842d,3f5c867a39096675f4f257694dfdff553414a54e..25e353869f84a730e7338247678c6ed2b729c3d1
+++ b/Misc/NEWS
@@@ -10,128 -10,79 +10,134 @@@ What's New in Python 3.3.0 Beta 1
  Core and Builtins
  -----------------
  
 -- Issue #14775: Fix a potential quadratic dict build-up due to the garbage
 -  collector repeatedly trying to untrack dicts.
 +- 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 #14494: Fix __future__.py and its documentation to note that
 -  absolute imports are the default behavior in 3.0 instead of 2.7.
 -  Patch by Sven Marnach.
 +- Issue #14673: Add Eric Snow's sys.implementation implementation.
  
 -- Issue #14761: Fix potential leak on an error case in the import machinery.
 +Library
 +-------
  
 -- Issue #14699: Fix calling the classmethod descriptor directly.
++- Issue #13854: Make multiprocessing properly handle non-integer
++  non-string argument to SystemExit.
 -- Issue #14433: Prevent msvcrt crash in interactive prompt when stdin
 -  is closed.
++- Issue #12157: Make pool.map() empty iterables correctly.  Initial
++  patch by mouad.
 -- Issue #11603 (again): Setting __repr__ to __str__ now raises a RuntimeError
 -  when repr() or str() is called on such an object.
 +- Issue #11823: disassembly now shows argument counts on calls with keyword args.
  
 -- Issue #14658: Fix binding a special method to a builtin implementation of a
 -  special method with a different name.
 +- Issue #14711: os.stat_float_times() has been deprecated.
  
 -- Issue #14630: Fix a memory access bug for instances of a subclass of int
 -  with value 0.
 +- LZMAFile now accepts the modes "rb"/"wb"/"ab" as synonyms of "r"/"w"/"a".
  
 -- Issue #14612: Fix jumping around with blocks by setting f_lineno.
 +- 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.
  
 -- Issue #14607: Fix keyword-only arguments which started with ``__``.
 +- BZ2File.__init__() and LZMAFile.__init__() now accept a file object as their
 +  first argument, rather than requiring a separate "fileobj" argument.
  
 -- Issue #13889: Check and (if necessary) set FPU control word before calling
 -  any of the dtoa.c string <-> float conversion functions, on MSVC builds of
 -  Python.  This fixes issues when embedding Python in a Delphi app.
 +- gzip.open() now accepts file objects as well as filenames.
  
 -- Issue #14474: Save and restore exception state in thread.start_new_thread()
 -  while writing error message if the thread leaves a unhandled exception.
 +- 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 #13019: Fix potential reference leaks in bytearray.extend().  Patch
 -  by Suman Saha.
 +- Issue #14989: Make the CGI enable option to http.server available via command
 +  line.
  
 -- Issue #14378: Fix compiling ast.ImportFrom nodes with a "__future__" string as
 -  the module name that was not interned.
 +- Issue #14987: Add a missing import statement to inspect.
  
 -- Issue #14331: Use significantly less stack space when importing modules by
 -  allocating path buffers on the heap instead of the stack.
 +- 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 #14334: Prevent in a segfault in type.__getattribute__ when it was not
 -  passed strings.
 +- Issue #14969: Better handling of exception chaining in contextlib.ExitStack
  
 -- Issue #1469629: Allow cycles through an object's __dict__ slot to be
 -  collected. (For example if ``x.__dict__ is x``).
 +- Issue #14962: Update text coloring in IDLE shell window after changing
 +  options.  Patch by Roger Serwy.
  
 -- Issue #14172: Fix reference leak when marshalling a buffer-like object
 -  (other than a bytes object).
 +- Issue #14963: Convert contextlib.ExitStack.__exit__ to use an iterative
 +  algorithm (Patch by Alon Horev)
  
 -- Issue #13521: dict.setdefault() now does only one lookup for the given key,
 -  making it "atomic" for many purposes.  Patch by Filip Gruszczyński.
 +Extension Modules
 +-----------------
  
 -- Issue #14471: Fix a possible buffer overrun in the winreg module.
 +- Issue #15000: Support the "unique" x32 architecture in _posixsubprocess.c.
  
 -Library
 --------
 +Tests
 +-----
  
 -- Issue #13854: Make multiprocessing properly handle non-integer
 -  non-string argument to SystemExit.
 +- Issue #14963 (partial): Add test cases for exception handling behaviour
 +  in contextlib.ExitStack (Initial patch by Alon Horev)
  
 -- Issue #12157: Make pool.map() empty iterables correctly.  Initial
 -  patch by mouad.
  
 -- 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.
 +What's New in Python 3.3.0 Alpha 4?
 +===================================
  
 -- Issue #14962: Update text coloring in IDLE shell window after changing
 -  options.  Patch by Roger Serwy.
 +*Release date: 31-May-2012*
 +
 +Core and Builtins
 +-----------------
 +
 +- Issue #14835: Make plistlib output empty arrays & dicts like OS X.
 +  Patch by Sidney San Martín.
 +
 +- Issue #14744: Use the new _PyUnicodeWriter internal API to speed up
 +  str%args and str.format(args).
 +
 +- Issue #14930: Make memoryview objects weakrefable.
 +
 +- Issue #14775: Fix a potential quadratic dict build-up due to the garbage
 +  collector repeatedly trying to untrack dicts.
 +
 +- Issue #14857: fix regression in references to PEP 3135 implicit __class__
 +  closure variable (Reopens issue #12370)
 +
 +- Issue #14712 (PEP 405): Virtual environments. Implemented by Vinay Sajip.
 +
 +- Issue #14660 (PEP 420): Namespace packages. Implemented by Eric Smith.
 +
 +- Issue #14494: Fix __future__.py and its documentation to note that
 +  absolute imports are the default behavior in 3.0 instead of 2.7.
 +  Patch by Sven Marnach.
 +
 +- Issue #9260: A finer-grained import lock.  Most of the import sequence
 +  now uses per-module locks rather than the global import lock, eliminating
 +  well-known issues with threads and imports.
 +
 +- Issue #14624: UTF-16 decoding is now 3x to 4x faster on various inputs.
 +  Patch by Serhiy Storchaka.
 +
 +- asdl_seq and asdl_int_seq are now Py_ssize_t sized.
 +
 +- Issue #14133 (PEP 415): Implement suppression of __context__ display with an
 +  attribute on BaseException. This replaces the original mechanism of PEP 409.
 +
 +- Issue #14417: Mutating a dict during lookup now restarts the lookup instead
 +  of raising a RuntimeError (undoes issue #14205).
 +
 +- Issue #14738: Speed-up UTF-8 decoding on non-ASCII data.  Patch by Serhiy
 +  Storchaka.
 +
 +- Issue #14700: Fix two broken and undefined-behaviour-inducing overflow checks
 +  in old-style string formatting.
 +
 +- Issue #14705: The PyArg_Parse() family of functions now support the 'p' format
 +  unit, which accepts a "boolean predicate" argument.  It converts any Python
 +  value into an integer--0 if it is "false", and 1 otherwise.
 +
 +Library
 +-------
 +
 +- Issue #14690: Use monotonic clock instead of system clock in the sched,
 +  subprocess and trace modules.
 +
 +- Issue #14958: Change IDLE systax highlighting to recognize all string and
 +  byte literals supported in Python 3.3.
  
  - Issue #10997: Prevent a duplicate entry in IDLE's "Recent Files" menu.