Commit Graph

4814 Commits

Author SHA1 Message Date
Victor Stinner
24b822e21e Issue #23517: Try to fix test_time on "x86 Ubuntu Shared 3.x" buildbot 2015-09-02 11:58:56 +02:00
Victor Stinner
67edcc905d Issue #23517: Fix _PyTime_ObjectToDenominator()
* initialize numerator on overflow error ensure that numerator is smaller than
* denominator.
2015-09-02 10:37:46 +02:00
Victor Stinner
744742320f Issue #23517: Add "half up" rounding mode to the _PyTime API 2015-09-02 01:43:56 +02:00
Victor Stinner
bbdda21a7a Move assertion inside _PyTime_ObjectToTimeval()
Change also _PyTime_FromSeconds() assertion to ensure that the _PyTime_t type
is used.
2015-09-02 00:50:43 +02:00
Victor Stinner
53e137c8dd Refactor pytime.c
Move code to convert double timestamp to subfunctions.
2015-09-02 00:49:16 +02:00
Larry Hastings
45d1c00831 Merge from 3.5 (with 3.5.0rc2 changes) into default (3.6). Messy! 2015-08-25 14:21:59 -07:00
Larry Hastings
01b1ff6970 Rebuilt Clinic generated code. 2015-08-24 20:23:27 -07:00
Larry Hastings
1df0b35e3d Issue #24769: Interpreter now starts properly when dynamic loading
is disabled.  Patch by Petr Viktorin.
2015-08-24 19:53:56 -07:00
Eric V. Smith
163b5c668d Fix a trivial typo. 2015-08-21 09:40:38 -04:00
Raymond Hettinger
501b4a7398 Use PyTuple_GET_SIZE like the adjacent code does. 2015-08-18 08:07:16 -07:00
Raymond Hettinger
f109414094 Inline PyIter_Next() matching the other itertools code. 2015-08-18 00:20:20 -07:00
Brett Cannon
d868376288 Merge from 3.5 for issue #24492 2015-08-14 11:09:56 -07:00
Brett Cannon
3008bc0f4a Issue #24492: make sure that `from ... import ... raises an
ImportError if __name__ is not defined on a package.

Thanks to Armin Rigo for the bug report and diagnosing the cause.
2015-08-11 18:01:31 -07:00
Robert Collins
df395991f6 Issue #9232: Support trailing commas in function declarations.
For example, "def f(*, a = 3,): pass" is now legal.

Patch from Mark Dickinson.
2015-08-12 08:00:06 +12:00
Yury Selivanov
dca249b17c Merge 3.5 (issue #24791) 2015-08-05 17:55:12 -04:00
Yury Selivanov
14acf5f41d Issue #24791: Fix grammar regression for call syntax: 'g(*a or b)'. 2015-08-05 17:54:10 -04:00
Victor Stinner
f716e74d5a Merge 3.5 (os.urandom) 2015-07-30 10:14:52 +02:00
Victor Stinner
61d5aab9b9 py_getrandom(): getrandom() *can* return EINTR
See the latest version of getrandom() manual page:
http://man7.org/linux/man-pages/man2/getrandom.2.html#NOTES

    The behavior when a call to getrandom() that is blocked while reading from
    /dev/urandom is interrupted by a signal handler depends on the
    initialization state of the entropy buffer and on the request size, buflen.
    If the entropy is not yet initialized, then the call will fail with the
    EINTR error.  If the entropy pool has been initialized and the request size
    is large (buflen > 256), the call either succeeds, returning a partially
    filled buffer, or fails with the error EINTR.  If the entropy pool has been
    initialized and the request size is small (buflen <= 256), then getrandom()
    will not fail with EINTR.  Instead, it will return all of the bytes that
    have been requested.

Note: py_getrandom() calls getrandom() with flags=0.
2015-07-30 10:13:52 +02:00
Stefan Krah
ff9fe230d0 Fix refleak. 2015-07-27 12:57:21 +02:00
Stefan Krah
c0cbed1554 Fix refleak. 2015-07-27 12:56:49 +02:00
Yury Selivanov
6d35043e49 Merge 3.5 (Issue #24687) 2015-07-23 09:11:13 +03:00
Yury Selivanov
f315c1c016 Issue #24687: Plug refleak on SyntaxError in function parameters annotations. 2015-07-23 09:10:44 +03:00
Yury Selivanov
0811c5d7ba Merge 3.5 (Issue #24619) 2015-07-22 14:49:13 +03:00
Yury Selivanov
b7666a3093 Issue #24619: More tests; fix nits in compiler.c 2015-07-22 14:48:57 +03:00
Benjamin Peterson
9f71cb0fee merge 3.5 (#24569) 2015-07-05 10:38:05 -05:00