]> granicus.if.org Git - python/commitdiff
Issue #20572: Remove the subprocess.Popen.wait endtime parameter.
authorGregory P. Smith <greg@krypto.org>
Mon, 21 Nov 2016 00:31:07 +0000 (16:31 -0800)
committerGregory P. Smith <greg@krypto.org>
Mon, 21 Nov 2016 00:31:07 +0000 (16:31 -0800)
It was deprecated in 3.4 and undocumented prior to that.

1  2 
Lib/subprocess.py
Lib/test/test_subprocess.py
Misc/NEWS

index e742a4e199b25be32da1862d164aca38b3ee6fbe,0b880f68d9120408f2ff4a9474a062a483198b19..c40f0179eef9970974978e41e96f53f68b69e360
@@@ -1027,11 -1027,15 +1027,9 @@@ class Popen(object)
              return self.returncode
  
  
--        def wait(self, timeout=None, endtime=None):
++        def wait(self, timeout=None):
              """Wait for child process to terminate.  Returns returncode
              attribute."""
--            if endtime is not None:
 -                warnings.warn(
 -                    "'endtime' argument is deprecated; use 'timeout'.",
 -                    DeprecationWarning,
 -                    stacklevel=2)
--                timeout = self._remaining_time(endtime)
              if timeout is None:
                  timeout_millis = _winapi.INFINITE
              else:
              return (pid, sts)
  
  
--        def wait(self, timeout=None, endtime=None):
++        def wait(self, timeout=None):
              """Wait for child process to terminate.  Returns returncode
              attribute."""
              if self.returncode is not None:
                  return self.returncode
  
-             # endtime is preferred to timeout.  timeout is only used for
-             # printing.
 -            if endtime is not None:
 -                warnings.warn(
 -                    "'endtime' argument is deprecated; use 'timeout'.",
 -                    DeprecationWarning,
 -                    stacklevel=2)
--            if endtime is not None or timeout is not None:
--                if endtime is None:
--                    endtime = _time() + timeout
--                elif timeout is None:
--                    timeout = self._remaining_time(endtime)
--
--            if endtime is not None:
++            if timeout is not None:
++                endtime = _time() + timeout
                  # Enter a busy loop if we have a timeout.  This busy loop was
                  # cribbed from Lib/threading.py in Thread.wait() at r71065.
                  delay = 0.0005 # 500 us -> initial delay of 1 ms
Simple merge
diff --cc Misc/NEWS
index 72fb96c066f6cafbec11e23da5506ef2ec01a6b6,435fd0afcdb15428b64e35ea246c0f19016bd1c1..b9448dd377984ad907f4cb5d792df915e84d0975
+++ b/Misc/NEWS
@@@ -33,120 -27,115 +33,123 @@@ Core and Builtin
  - 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 #28128: Deprecation warning for invalid str and byte escape
 +  sequences now prints better information about where the error
 +  occurs. Patch by Serhiy Storchaka and Eric Smith.
  
 -- Issue #26182: Fix a refleak in code that raises DeprecationWarning.
 +- Issue #28509: dict.update() no longer allocate unnecessary large memory.
  
 -- Issue #28721: Fix asynchronous generators aclose() and athrow() to
 -  handle StopAsyncIteration propagation properly.
 +- Issue #28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug
 +  build.
  
 -Library
 --------
 +- Issue #28517: Fixed of-by-one error in the peephole optimizer that caused
 +  keeping unreachable code.
  
 -- Issue #20572: The subprocess.Popen.wait method's undocumented
 -  endtime parameter now raises a DeprecationWarning.
 +- Issue #28214: Improved exception reporting for problematic __set_name__
 +  attributes.
  
 -- Issue #25659: In ctypes, prevent a crash calling the from_buffer() and
 -  from_buffer_copy() methods on abstract classes like Array.
 +- Issue #23782: Fixed possible memory leak in _PyTraceback_Add() and exception
 +  loss in PyTraceBack_Here().
  
 -- Issue #19717: Makes Path.resolve() succeed on paths that do not exist.
 -  Patch by Vajrasky Kok
 +- Issue #28183: Optimize and cleanup dict iteration.
  
 -- Issue #28563: Fixed possible DoS and arbitrary code execution when handle
 -  plural form selections in the gettext module.  The expression parser now
 -  supports exact syntax supported by GNU gettext.
 +- Issue #26081: Added C implementation of asyncio.Future.
 +  Original patch by Yury Selivanov.
  
 -- Issue #28387: Fixed possible crash in _io.TextIOWrapper deallocator when
 -  the garbage collector is invoked in other thread.  Based on patch by
 -  Sebastian Cufre.
 +- Issue #28379: Added sanity checks and tests for PyUnicode_CopyCharacters().
 +  Patch by Xiang Zhang.
  
 -- Issue #28600: Optimize loop.call_soon.
 +- Issue #28376: The type of long range iterator is now registered as Iterator.
 +  Patch by Oren Milman.
  
 -- Issue #28613: Fix get_event_loop() return the current loop if
 -  called from coroutines/callbacks.
 +- Issue #28376: Creating instances of range_iterator by calling range_iterator
 +  type now is disallowed.  Calling iter() on range instance is the only way.
 +  Patch by Oren Milman.
  
 -- Issue #28634: Fix asyncio.isfuture() to support unittest.Mock.
 +- Issue #26906: Resolving special methods of uninitialized type now causes
 +  implicit initialization of the type instead of a fail.
  
 -- Issue #26081: Fix refleak in _asyncio.Future.__iter__().throw.
 +- Issue #18287: PyType_Ready() now checks that tp_name is not NULL.
 +  Original patch by Niklas Koep.
  
 -- Issue #28639: Fix inspect.isawaitable to always return bool
 -  Patch by Justin Mayfield.
 +- Issue #24098: Fixed possible crash when AST is changed in process of
 +  compiling it.
  
 -- Issue #28652: Make loop methods reject socket kinds they do not support.
 +- Issue #28201: Dict reduces possibility of 2nd conflict in hash table when
 +  hashes have same lower bits.
  
 -- Issue #28653: Fix a refleak in functools.lru_cache.
 +- Issue #28350: String constants with null character no longer interned.
  
 -- Issue #28703: Fix asyncio.iscoroutinefunction to handle Mock objects.
 +- Issue #26617: Fix crash when GC runs during weakref callbacks.
  
 -- Issue #28704: Fix create_unix_server to support Path-like objects 
 -  (PEP 519).
 +- Issue #27942: String constants now interned recursively in tuples and frozensets.
  
 -- Issue #28720: Add collections.abc.AsyncGenerator.
 +- Issue #28289: ImportError.__init__ now resets not specified attributes.
  
 -Documentation
 --------------
 +- Issue #21578: Fixed misleading error message when ImportError called with
 +  invalid keyword args.
  
 -- Issue #28513: Documented command-line interface of zipfile.
 +- Issue #28203: Fix incorrect type in complex(1.0, {2:3}) error message.
 +  Patch by Soumya Sharma.
  
 -Tests
 ------
 +- Issue #28086: Single var-positional argument of tuple subtype was passed
 +  unscathed to the C-defined function.  Now it is converted to exact tuple.
  
 -- Issue #28666: Now test.support.rmtree is able to remove unwritable or
 -  unreadable directories.
 +- Issue #28214: Now __set_name__ is looked up on the class instead of the
 +  instance.
  
 -- Issue #23839: Various caches now are cleared before running every test file.
 +- Issue #27955: Fallback on reading /dev/urandom device when the getrandom()
 +  syscall fails with EPERM, for example when blocked by SECCOMP.
  
 -Build
 ------
 +- Issue #28192: Don't import readline in isolated mode.
  
 -- Issue #10656: Fix out-of-tree building on AIX.  Patch by Tristan Carel and
 -  Michael Haubenwallner.
 +- Issue #27441: Remove some redundant assignments to ob_size in longobject.c.
 +  Thanks Oren Milman.
  
 -- Issue #26359: Rename --with-optimiations to --enable-optimizations.
 +- Issue #27222: Clean up redundant code in long_rshift function. Thanks
 +  Oren Milman.
  
 -- Issue #28676: Prevent missing 'getentropy' declaration warning on macOS.
 -  Patch by Gareth Rees.
 +- Upgrade internal unicode databases to Unicode version 9.0.0.
  
 +- Issue #28131: Fix a regression in zipimport's compile_source().  zipimport
 +  should use the same optimization level as the interpreter.
  
 -What's New in Python 3.6.0 beta 3
 -=================================
 +- Issue #28126: Replace Py_MEMCPY with memcpy(). Visual Studio can properly
 +  optimize memcpy().
  
 -*Release date: 2016-10-31*
 +- Issue #28120: Fix dict.pop() for splitted dictionary when trying to remove a
 +  "pending key" (Not yet inserted in split-table). Patch by Xiang Zhang.
  
 -Core and Builtins
 ------------------
 +- Issue #26182: Raise DeprecationWarning when async and await keywords are
 +  used as variable/attribute/class/function name.
  
 -- Issue #28128: Deprecation warning for invalid str and byte escape
 -  sequences now prints better information about where the error
 -  occurs. Patch by Serhiy Storchaka and Eric Smith.
 +- Issue #26182: Fix a refleak in code that raises DeprecationWarning.
  
 -- Issue #28509: dict.update() no longer allocate unnecessary large memory.
 +- Issue #28721: Fix asynchronous generators aclose() and athrow() to
 +  handle StopAsyncIteration propagation properly.
  
 -- Issue #28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug
 -  build.
 +Library
 +-------
  
 -- Issue #28517: Fixed of-by-one error in the peephole optimizer that caused
 -  keeping unreachable code.
++- Issue #20572: Remove the subprocess.Popen.wait endtime parameter.  It was
++  deprecated in 3.4 and undocumented prior to that.
 -- Issue #28214: Improved exception reporting for problematic __set_name__
 -  attributes.
 +- Issue #25659: In ctypes, prevent a crash calling the from_buffer() and
 +  from_buffer_copy() methods on abstract classes like Array.
  
 -- Issue #23782: Fixed possible memory leak in _PyTraceback_Add() and exception
 -  loss in PyTraceBack_Here().
 +- Issue #28548: In the "http.server" module, parse the protocol version if
 +  possible, to avoid using HTTP 0.9 in some error responses.
  
 -- Issue #28471: Fix "Python memory allocator called without holding the GIL"
 -  crash in socket.setblocking.
 +- Issue #19717: Makes Path.resolve() succeed on paths that do not exist.
 +  Patch by Vajrasky Kok
  
 -Library
 --------
 +- Issue #28563: Fixed possible DoS and arbitrary code execution when handle
 +  plural form selections in the gettext module.  The expression parser now
 +  supports exact syntax supported by GNU gettext.
 +
 +- Issue #28387: Fixed possible crash in _io.TextIOWrapper deallocator when
 +  the garbage collector is invoked in other thread.  Based on patch by
 +  Sebastian Cufre.
  
  - Issue #27517: LZMA compressor and decompressor no longer raise exceptions if
    given empty data twice.  Patch by Benjamin Fogle.