Commit Graph

97315 Commits

Author SHA1 Message Date
Martin Panter a27b3b3192 Issue #15657: Merge other doc fix from 3.5 2017-01-11 11:51:02 +00:00
Martin Panter 5b66723b0b Issue #15657: Delete incorrect statement from PyMethodDef documentation
Patch by Berker Peksag.
2017-01-11 11:50:06 +00:00
Martin Panter 9da31f7274 Issue #15657: METH_KEYWORDS cannot be used alone in Python 3 2017-01-11 11:41:03 +00:00
Xiang Zhang 2427d00298 Issue #29217: Merge 3.5. 2017-01-10 11:30:02 +08:00
Xiang Zhang 8a17995589 Issue #29217: Fix the wrong type description of UUID.variant. 2017-01-10 11:29:27 +08:00
Xiang Zhang 95403d74d7 Issue #29145: Merge 3.5. 2017-01-10 10:54:19 +08:00
Xiang Zhang b0541f4cdf Issue #29145: Fix overflow checks in str.replace() and str.join().
Based on patch by Martin Panter.
2017-01-10 10:52:00 +08:00
Vinay Sajip 1e6499c19c Fixes #29177: Improved resilience of logging tests which use socket servers.
Thanks to Xavier de Gaye for the report and patch improvements.
2017-01-09 16:54:12 +00:00
Vinay Sajip aa655b3a8e Fixes #29133: clarified shlex documentation. 2017-01-09 16:46:04 +00:00
Stefan Krah e660335b7e Merge 3.5. 2017-01-09 13:11:51 +01:00
Stefan Krah 18e0a97a1a Issue #28701: Revert part of 5bdc8e1a50c8 for the following reasons:
- There was no real problem to begin with.

  - The hypothetical problem has been fixed by 5bdc8e1a50c8.
2017-01-09 13:11:27 +01:00
Victor Stinner a0be562daf Null merge 3.5
Python/random.c is more then in the 3.6 branch.
2017-01-09 11:21:26 +01:00
Victor Stinner 035ba5da3e Issue #29157: Prefer getrandom() over getentropy()
Copy and then adapt Python/random.c from default branch. Difference between 3.5
and default branches:

* Python 3.5 only uses getrandom() in non-blocking mode: flags=GRND_NONBLOCK
* If getrandom() fails with EAGAIN: py_getrandom() immediately fails and
  remembers that getrandom() doesn't work.
* Python 3.5 has no _PyOS_URandomNonblock() function: _PyOS_URandom()
  works in non-blocking mode on Python 3.5
2017-01-09 11:18:53 +01:00
Serhiy Storchaka f0f35a6720 Issue #29190: Fixed possible errors in comparing strings in the pickle module. 2017-01-09 10:09:43 +02:00
Serhiy Storchaka 9937d90ee8 Issue #29190: Fixed possible errors in comparing strings in the pickle module. 2017-01-09 10:04:34 +02:00
Xiang Zhang c44d58a77a Issue #29142: Merge 3.5. 2017-01-09 11:50:02 +08:00
Xiang Zhang 959ff7f1c6 Issue #29142: Fix suffixes in no_proxy handling in urllib.
In urllib.request, suffixes in no_proxy environment variable with
leading dots could match related hostnames again (e.g. .b.c matches a.b.c).
Patch by Milan Oberkirch.
2017-01-09 11:47:55 +08:00
Raymond Hettinger 19c7238560 Sync-up with 3.7 by backporting minor lru_cache code beautification 2017-01-08 18:22:24 -08:00
Raymond Hettinger 4ee39141e8 Issue #29203: functools.lru_cache() now respects PEP 468 2017-01-08 17:28:20 -08:00
Xiang Zhang 04316c4cc8 Issue #29034: Fix memory leak and use-after-free in path_converter. 2017-01-08 23:26:57 +08:00
Raymond Hettinger ec53b07ef1 Add OrderedDict test for PEP 468 (guaranteed ordered of kwargs) 2017-01-08 00:37:13 -08:00
Raymond Hettinger d15bb26248 Update OrderedDict docs to reflect acceptance of PEP 468 2017-01-07 22:05:12 -08:00
Martin Panter 625fb648f7 Issue #28815: Merge test tweak from 3.5 2017-01-08 01:06:18 +00:00
Martin Panter 8cbd46f19f Issue #28815: Use new exception subclasses 2017-01-08 00:46:25 +00:00
Stefan Krah 0b64a0fc64 Add comment why the change in d83884b3a427 wasn't necessary. 2017-01-08 01:36:00 +01:00
Stefan Krah dada5a8d75 Revert part of 3cb3e224b692 in code that I maintain. 2017-01-08 01:11:27 +01:00
Berker Peksag 631ada8424 Issue #16026: Fix parameter names of DictReader and DictWriter
CPython and PyPy use f as the name of the first parameter of
DictReader and DictWriter classes.

Patch by James Salt and Greg Bengeult.
2017-01-07 09:32:56 +03:00
Victor Stinner ff558f5aba Issue #29157: Prefer getrandom() over getentropy()
* dev_urandom() now calls py_getentropy(). Prepare the fallback to support
  getentropy() failure and falls back on reading from /dev/urandom.
* Simplify dev_urandom(). pyurandom() is now responsible to call getentropy()
  or getrandom(). Enhance also dev_urandom() and pyurandom() documentation.
* getrandom() is now preferred over getentropy(). The glibc 2.24 now implements
  getentropy() on Linux using the getrandom() syscall.  But getentropy()
  doesn't support non-blocking mode. Since getrandom() is tried first, it's not
  more needed to explicitly exclude getentropy() on Solaris. Replace:
  "if defined(HAVE_GETENTROPY) && !defined(sun)"
  with "if defined(HAVE_GETENTROPY)"
* Enhance py_getrandom() documentation. py_getentropy() now supports ENOSYS,
  EPERM & EINTR
2017-01-07 00:07:45 +01:00
Victor Stinner 84b6fb0eea Fix unittest.mock._Call: don't ignore name
Issue #28961: Fix unittest.mock._Call helper: don't ignore the name parameter
anymore.

Patch written by Jiajun Huang.
2017-01-06 18:15:51 +01:00
Victor Stinner 9505b03bb0 Fix subprocess.Popen.__del__() fox Python shutdown
Issue #29174, #26741: subprocess.Popen.__del__() now keeps a strong reference
to warnings.warn() function.
2017-01-06 10:44:44 +01:00
Xavier de Gaye 94d1bfa2ef test_curses - substitute self.skip() with self.skipTest() 2017-01-06 09:51:22 +01:00
Xavier de Gaye 645bc80918 test_curses - substitute self.skip() with self.skipTest() 2017-01-06 09:50:27 +01:00
INADA Naoki a634e23209 Issue #29159: Fix regression in bytes(x) when x.__index__() raises Exception. 2017-01-06 17:32:01 +09:00
Victor Stinner a251fb02f4 Issue #27961: Define HAVE_LONG_LONG as 1.
Fix backward compatibility issue, HAVE_LONG_LONG was defined but empty, whereas
it is defined as 1 in Python 3.5.
2017-01-05 22:58:53 +01:00
Terry Jan Reedy e16265d367 Issue #29162: Don't depend on 'from tkinter import *' importing sys.
Fix error in format string.
2017-01-04 23:17:47 -05:00
Xavier de Gaye 2a352b667b Issue #26851: Set Android compilation and link flags. 2017-01-04 21:51:16 +01:00
Serhiy Storchaka 4fd9cc14b4 Issue #29156: Remove superfluous pow test.
test_powlong is the same as test_powint.
Patch by Lukas Schwaighofer.
2017-01-04 18:53:00 +02:00
Serhiy Storchaka 1d54b114c5 Issue #29156: Remove superfluous pow test.
test_powlong is the same as test_powint.
Patch by Lukas Schwaighofer.
2017-01-04 18:52:40 +02:00
Victor Stinner 51b90d28e2 Issue #24773: fix datetime.time constructor docstring
The default value of fold is zero, not True. Fix the docstring of the Python
implementation.
2017-01-04 12:01:16 +01:00
Victor Stinner 423c16b4c3 Issue #29140: Fix hash(datetime.time)
Fix time_hash() function: replace DATE_xxx() macros with TIME_xxx() macros.
Before, the hash function used a wrong value for microseconds if fold is set
(equal to 1).
2017-01-03 23:47:12 +01:00
Serhiy Storchaka 8d979d576e Fixed possible reference leaks in the _json module. 2017-01-03 11:19:48 +02:00
Serhiy Storchaka 21fe721345 Fixed possible reference leaks in the _json module. 2017-01-03 11:17:44 +02:00
Larry Hastings c70225c98c Null-merge from 3.5. 2017-01-02 18:39:09 -08:00
Larry Hastings d9cb1b0c2d Forward-merge from 3.4. 2017-01-02 18:36:52 -08:00
Larry Hastings 31f9d9d340 Merge Python 3.5.3rc1 release changes back into the main branch. 2017-01-02 18:32:30 -08:00
Larry Hastings e744804bc9 Post-release fixups for Python 3.5.3rc1. 2017-01-02 18:31:25 -08:00
Larry Hastings aa772e3cd2 Merge Python 3.4.6rc1 changes back into main branch. 2017-01-02 18:30:26 -08:00
Larry Hastings a7aa988ddc Post-release fixups for Python 3.4.6rc1. 2017-01-02 18:29:26 -08:00
Berker Peksag 3f988744b0 Issue #15812: Merge from 3.5 2017-01-03 03:48:34 +03:00
Berker Peksag 225b01b840 Issue #15812: Delete redundant max(start, 0)
Noticed by Serhiy Storchaka.
2017-01-03 03:48:04 +03:00