]> granicus.if.org Git - python/commitdiff
Issue #28779: multiprocessing.set_forkserver_preload() would crash the forkserver...
authorAntoine Pitrou <solipsis@pitrou.net>
Sat, 10 Dec 2016 16:16:17 +0000 (17:16 +0100)
committerAntoine Pitrou <solipsis@pitrou.net>
Sat, 10 Dec 2016 16:16:17 +0000 (17:16 +0100)
1  2 
Lib/multiprocessing/context.py
Lib/multiprocessing/spawn.py
Lib/test/_test_multiprocessing.py
Misc/NEWS

index 09455e2ec777b333569d749282fccf94332a1f71,115d4bf6542542dd11d9e81bfdfdbe62297aea7f..623f6fb733a57f5aa08939033b46037cd3eae1c6
@@@ -196,19 -195,9 +196,19 @@@ class BaseContext(object)
      def get_start_method(self, allow_none=False):
          return self._name
  
-     def set_start_method(self, method=None):
+     def set_start_method(self, method, force=False):
          raise ValueError('cannot set start method of concrete context')
  
 +    @property
 +    def reducer(self):
 +        '''Controls how objects will be reduced to a form that can be
 +        shared with other processes.'''
 +        return globals().get('reduction')
 +
 +    @reducer.setter
 +    def reducer(self, reduction):
 +        globals()['reduction'] = reduction
 +
      def _check_available(self):
          pass
  
Simple merge
Simple merge
diff --cc Misc/NEWS
index 587c4d24bd58e5594e34a5f271bd893e0928bcaf,80bb03e41091ada67cd499c55a094467025822bf..3de5be775f1f21e1acddaf0de886793520e47746
+++ b/Misc/NEWS
@@@ -19,126 -13,113 +19,130 @@@ Core and Builtin
  - Issue #5322: Fixed setting __new__ to a PyCFunction inside Python code.
    Original patch by Andreas Stührk.
  
 -- Issue #28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS X
 -  when decode astral characters.  Patch by Xiang Zhang.
 +Library
 +-------
  
 -- Issue #19398: Extra slash no longer added to sys.path components in case of
 -  empty compile-time PYTHONPATH components.
++- Issue #28779: multiprocessing.set_forkserver_preload() would crash the
++  forkserver process if a preloaded module instantiated some
++  multiprocessing objects such as locks.
 -- Issue #28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug
 -  build.
 +- Issue #28847: dbm.dumb now supports reading read-only files and no longer
 +  writes the index file when it is not changed.
  
 -- Issue #23782: Fixed possible memory leak in _PyTraceback_Add() and exception
 -  loss in PyTraceBack_Here().
 +- Issue #26937: The chown() method of the tarfile.TarFile class does not fail
 +  now when the grp module cannot be imported, as for example on Android
 +  platforms.
  
 -- Issue #28379: Added sanity checks and tests for PyUnicode_CopyCharacters().
 -  Patch by Xiang Zhang.
 +Windows
 +-------
  
 -- Issue #28376: The type of long range iterator is now registered as Iterator.
 -  Patch by Oren Milman.
 +- Issue #28896: Deprecate WindowsRegistryFinder
  
 -- Issue #28376: The constructor of range_iterator now checks that step is not 0.
 -  Patch by Oren Milman.
 +Tests
 +-----
  
 -- Issue #26906: Resolving special methods of uninitialized type now causes
 -  implicit initialization of the type instead of a fail.
 +- Issue #26939: Add the support.setswitchinterval() function to fix
 +  test_functools hanging on the Android armv7 qemu emulator.
  
 -- Issue #18287: PyType_Ready() now checks that tp_name is not NULL.
 -  Original patch by Niklas Koep.
  
 -- Issue #24098: Fixed possible crash when AST is changed in process of
 -  compiling it.
 +What's New in Python 3.6.0 release candidate 1
 +==============================================
  
 -- Issue #28350: String constants with null character no longer interned.
 +*Release date: 2016-12-06*
  
 -- Issue #26617: Fix crash when GC runs during weakref callbacks.
 +Core and Builtins
 +-----------------
  
 -- Issue #27942: String constants now interned recursively in tuples and frozensets.
 +- Issue #23722: Rather than silently producing a class that doesn't support
 +  zero-argument ``super()`` in methods, failing to pass the new
 +  ``__classcell__`` namespace entry up to ``type.__new__`` now results in a
 +  ``DeprecationWarning`` and a class that supports zero-argument ``super()``.
  
 -- Issue #21578: Fixed misleading error message when ImportError called with
 -  invalid keyword args.
 +- Issue #28797: Modifying the class __dict__ inside the __set_name__ method of
 +  a descriptor that is used inside that class no longer prevents calling the
 +  __set_name__ method of other descriptors.
  
 -- Issue #28203: Fix incorrect type in error message from
 -  ``complex(1.0, {2:3})``. Patch by Soumya Sharma.
 +- Issue #28782: Fix a bug in the implementation ``yield from`` when checking
 +  if the next instruction is YIELD_FROM. Regression introduced by WORDCODE
 +  (issue #26647).
  
 -- Issue #27955: Fallback on reading /dev/urandom device when the getrandom()
 -  syscall fails with EPERM, for example when blocked by SECCOMP.
 +Library
 +-------
  
 -- Issue #28131: Fix a regression in zipimport's compile_source().  zipimport
 -  should use the same optimization level as the interpreter.
 +- Issue #27030: Unknown escapes in re.sub() replacement template are allowed
 +  again.  But they still are deprecated and will be disabled in 3.7.
  
 -- Issue #25221: Fix corrupted result from PyLong_FromLong(0) when
 -  Python is compiled with NSMALLPOSINTS = 0.
 +- Issue #28835: Fix a regression introduced in warnings.catch_warnings():
 +  call warnings.showwarning() if it was overriden inside the context manager.
  
 -- Issue #25758: Prevents zipimport from unnecessarily encoding a filename
 -  (patch by Eryk Sun)
 +- Issue #27172: To assist with upgrades from 2.7, the previously documented
 +  deprecation of ``inspect.getfullargspec()`` has been reversed. This decision
 +  may be revisited again after the Python 2.7 branch is no longer officially
 +  supported.
  
 -- Issue #28189: dictitems_contains no longer swallows compare errors.
 -  (Patch by Xiang Zhang)
 +- Issue #24142: Reading a corrupt config file left configparser in an
 +  invalid state.  Original patch by Florian Höch.
  
 -- Issue #27812: Properly clear out a generator's frame's backreference to the
 -  generator to prevent crashes in frame.clear().
 +- Issue #28843: Fix asyncio C Task to handle exceptions __traceback__.
  
 -- Issue #27811: Fix a crash when a coroutine that has not been awaited is
 -  finalized with warnings-as-errors enabled.
 +C API
 +-----
  
 -- Issue #27587: Fix another issue found by PVS-Studio: Null pointer check
 -  after use of 'def' in _PyState_AddModule().
 -  Initial patch by Christian Heimes.
 +- Issue #28808: PyUnicode_CompareWithASCIIString() now never raises exceptions.
 +
 +Documentation
 +-------------
  
 -- Issue #26020: set literal evaluation order did not match documented behaviour.
 +- Issue #23722: The data model reference and the porting section in the What's
 +  New guide now cover the additional ``__classcell__`` handling needed for
 +  custom metaclasses to fully support PEP 487 and zero-argument ``super()``.
  
 -- Issue #27782: Multi-phase extension module import now correctly allows the
 -  ``m_methods`` field to be used to add module level functions to instances
 -  of non-module types returned from ``Py_create_mod``. Patch by Xiang Zhang.
 +Tools/Demos
 +-----------
  
 -- Issue #27936: The round() function accepted a second None argument
 -  for some types but not for others.  Fixed the inconsistency by
 -  accepting None for all numeric types.
 +- Issue #28023: Fix python-gdb.py didn't support new dict implementation.
  
 -- Issue #27487: Warn if a submodule argument to "python -m" or
 -  runpy.run_module() is found in sys.modules after parent packages are
 -  imported, but before the submodule is executed.
  
 -- Issue #27558: Fix a SystemError in the implementation of "raise" statement.
 -  In a brand new thread, raise a RuntimeError since there is no active
 -  exception to reraise. Patch written by Xiang Zhang.
 +What's New in Python 3.6.0 beta 4
 +=================================
  
 -- Issue #27419: Standard __import__() no longer look up "__import__" in globals
 -  or builtins for importing submodules or "from import".  Fixed handling an
 -  error of non-string package name.
 +*Release date: 2016-11-21*
  
 -- Issue #27083: Respect the PYTHONCASEOK environment variable under Windows.
 +Core and Builtins
 +-----------------
  
 -- Issue #27514: Make having too many statically nested blocks a SyntaxError
 -  instead of SystemError.
 +- Issue #28532: Show sys.version when -V option is supplied twice.
  
 -- Issue #27473: Fixed possible integer overflow in bytes and bytearray
 -  concatenations.  Patch by Xiang Zhang.
 +- Issue #27100: The with-statement now checks for __enter__ before it
 +  checks for __exit__.  This gives less confusing error messages when
 +  both methods are missing. Patch by Jonathan Ellington.
  
 -- Issue #27507: Add integer overflow check in bytearray.extend().  Patch by
 -  Xiang Zhang.
 +- Issue #28746: Fix the set_inheritable() file descriptor method on platforms
 +  that do not have the ioctl FIOCLEX and FIONCLEX commands.
  
 -- Issue #27581: Don't rely on wrapping for overflow check in
 -  PySequence_Tuple().  Patch by Xiang Zhang.
 +- Issue #26920: Fix not getting the locale's charset upon initializing the
 +  interpreter, on platforms that do not have langinfo.
  
 -- Issue #27443: __length_hint__() of bytearray iterators no longer return a
 -  negative integer for a resized bytearray.
 +- Issue #28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS X
 +  when decode astral characters.  Patch by Xiang Zhang.
  
 -- Issue #27942: Fix memory leak in codeobject.c
 +- Issue #19398: Extra slash no longer added to sys.path components in case of
 +  empty compile-time PYTHONPATH components.
 +
 +- Issue #28665:  Improve speed of the STORE_DEREF opcode by 40%.
 +
 +- Issue #28583: PyDict_SetDefault didn't combine split table when needed.
 +  Patch by Xiang Zhang.
 +
 +- Issue #27243: Change PendingDeprecationWarning -> DeprecationWarning.
 +  As it was agreed in the issue, __aiter__ returning an awaitable
 +  should result in PendingDeprecationWarning in 3.5 and in
 +  DeprecationWarning in 3.6.
 +
 +- Issue #26182: Fix a refleak in code that raises DeprecationWarning.
 +
 +- Issue #28721: Fix asynchronous generators aclose() and athrow() to
 +  handle StopAsyncIteration propagation properly.
  
  Library
  -------