]> granicus.if.org Git - python/log
python
9 years agoIssue #23618: Ooops, remove abort() added for debug purpose
Victor Stinner [Thu, 2 Apr 2015 13:17:12 +0000 (15:17 +0200)]
Issue #23618: Ooops, remove abort() added for debug purpose

9 years agoIssue #23618: Fix sock_connect_impl(), set the socket error code
Victor Stinner [Thu, 2 Apr 2015 12:37:20 +0000 (14:37 +0200)]
Issue #23618: Fix sock_connect_impl(), set the socket error code

sock_call_ex() gets the socket error code when the socket function fails.
sock_connect_impl() didn't set the error correctly.

9 years agoMerge 3.4 (test_exceptions)
Victor Stinner [Thu, 2 Apr 2015 12:22:44 +0000 (14:22 +0200)]
Merge 3.4 (test_exceptions)

9 years agoIssue #22977: Fix test_exceptions
Victor Stinner [Thu, 2 Apr 2015 12:17:38 +0000 (14:17 +0200)]
Issue #22977: Fix test_exceptions

9 years agoIssue #23648: Complete the list of modified functions for the PEP 475
Victor Stinner [Thu, 2 Apr 2015 11:56:29 +0000 (13:56 +0200)]
Issue #23648: Complete the list of modified functions for the PEP 475

9 years agoIssue #23618: socket.socket.connect() now waits until the connection completes
Victor Stinner [Thu, 2 Apr 2015 09:50:57 +0000 (11:50 +0200)]
Issue #23618: socket.socket.connect() now waits until the connection completes
instead of raising InterruptedError if the connection is interrupted by
signals, signal handlers don't raise an exception and the socket is blocking or
has a timeout.

socket.socket.connect() still raise InterruptedError for non-blocking sockets.

9 years agoIssue #23618: Document EINTR changes in socket documentation
Victor Stinner [Thu, 2 Apr 2015 09:49:42 +0000 (11:49 +0200)]
Issue #23618: Document EINTR changes in socket documentation

9 years agoIssue #23618: Don't declare recvmsg/sendmsg helper functions on Windows
Victor Stinner [Thu, 2 Apr 2015 10:28:07 +0000 (12:28 +0200)]
Issue #23618: Don't declare recvmsg/sendmsg helper functions on Windows

9 years agoIssue #21526: Fixed the test_booleans test for wantobjects = 0.
Serhiy Storchaka [Thu, 2 Apr 2015 08:47:51 +0000 (11:47 +0300)]
Issue #21526: Fixed the test_booleans test for wantobjects = 0.

9 years agoIssue #21526: Fixed the test_booleans test for wantobjects = 0.
Serhiy Storchaka [Thu, 2 Apr 2015 08:46:07 +0000 (11:46 +0300)]
Issue #21526: Fixed the test_booleans test for wantobjects = 0.

9 years agoIssue #21526: Fixed support of new boolean type in Tcl 8.5.
Serhiy Storchaka [Thu, 2 Apr 2015 07:58:40 +0000 (10:58 +0300)]
Issue #21526: Fixed support of new boolean type in Tcl 8.5.

9 years agoIssue #21526: Tkinter now supports new boolean type in Tcl 8.5.
Serhiy Storchaka [Thu, 2 Apr 2015 07:35:57 +0000 (10:35 +0300)]
Issue #21526: Tkinter now supports new boolean type in Tcl 8.5.

9 years agoIssue #22977: Fixed formatting Windows error messages on Wine.
Serhiy Storchaka [Thu, 2 Apr 2015 06:50:06 +0000 (09:50 +0300)]
Issue #22977: Fixed formatting Windows error messages on Wine.
Patch by Martin Panter.

9 years agoIssue #22977: Fixed formatting Windows error messages on Wine.
Serhiy Storchaka [Thu, 2 Apr 2015 06:47:27 +0000 (09:47 +0300)]
Issue #22977: Fixed formatting Windows error messages on Wine.
Patch by Martin Panter.

9 years agomerge 3.4 (#23844)
Benjamin Peterson [Thu, 2 Apr 2015 04:08:10 +0000 (00:08 -0400)]
merge 3.4 (#23844)

9 years agoreplace 512 bit dh key with a 2014 bit one (closes #23844)
Benjamin Peterson [Thu, 2 Apr 2015 04:04:06 +0000 (00:04 -0400)]
replace 512 bit dh key with a 2014 bit one (closes #23844)

Patch by Cédric Krier.

9 years agoIssue #23834: Fix sock_call(), set deadline_initialized to recompute the timeout
Victor Stinner [Thu, 2 Apr 2015 01:22:49 +0000 (03:22 +0200)]
Issue #23834: Fix sock_call(), set deadline_initialized to recompute the timeout

9 years agoIssue #23834: Modify socket.sendall() to reuse sock_call() with
Victor Stinner [Wed, 1 Apr 2015 20:53:26 +0000 (22:53 +0200)]
Issue #23834: Modify socket.sendall() to reuse sock_call() with
sock_send_impl()

9 years agoIssue #23834: Add sock_call() helper function
Victor Stinner [Wed, 1 Apr 2015 19:57:09 +0000 (21:57 +0200)]
Issue #23834: Add sock_call() helper function

The BEGIN_SELECT_LOOP and END_SELECT_LOOP macros of socketmodule.c don't handle
EINTR. Functions using these macros use an inner loop to handle EINTR, but they
don't recompute the timeout.

This changes replaces the two macros with a new sock_call() function which
takes a function as a parameter. sock_call() recomputes the timeout, handle
false positive and handle EINTR.

9 years agoIssue #23836: Fix the faulthandler module to handle reentrant calls
Victor Stinner [Wed, 1 Apr 2015 16:48:58 +0000 (18:48 +0200)]
Issue #23836: Fix the faulthandler module to handle reentrant calls
to its signal handlers.

Use also _Py_write_noraise() instead of write() to retry write() if it is
interrupted by a signal (fail with EINTR).

faulthandler.dump_traceback() also calls PyErr_CheckSignals() to call the
Python signal handler if a signal was received.

9 years agoIssue #23836: Use _Py_write_noraise() to retry on EINTR in _Py_DumpTraceback()
Victor Stinner [Wed, 1 Apr 2015 16:38:01 +0000 (18:38 +0200)]
Issue #23836: Use _Py_write_noraise() to retry on EINTR in _Py_DumpTraceback()
and _Py_DumpTracebackThreads(). Document also these functions to explain that
the caller is responsible to call PyErr_CheckSignals().

9 years agoIssue #23836: Use _Py_write_noraise() to retry on EINTR in child_exec() of
Victor Stinner [Wed, 1 Apr 2015 16:35:53 +0000 (18:35 +0200)]
Issue #23836: Use _Py_write_noraise() to retry on EINTR in child_exec() of
_posixsubprocess

9 years agoIssue #23836: Use _Py_write_noraise() to retry on EINTR in trip_signal() of
Victor Stinner [Wed, 1 Apr 2015 16:35:22 +0000 (18:35 +0200)]
Issue #23836: Use _Py_write_noraise() to retry on EINTR in trip_signal() of
signalmodule.c

9 years agoIssue #23836: Document functions releasing the GIL in fileutils.c
Victor Stinner [Wed, 1 Apr 2015 16:34:32 +0000 (18:34 +0200)]
Issue #23836: Document functions releasing the GIL in fileutils.c

9 years agoIssue #23836: Add _Py_write_noraise() function
Victor Stinner [Wed, 1 Apr 2015 16:34:45 +0000 (18:34 +0200)]
Issue #23836: Add _Py_write_noraise() function

Helper to write() which retries write() if it is interrupted by a signal (fails
with EINTR).

9 years agomerge 3.4
Benjamin Peterson [Wed, 1 Apr 2015 16:37:34 +0000 (12:37 -0400)]
merge 3.4

9 years agoIssue #22117, issue #23485: Fix _PyTime_AsMilliseconds() and
Victor Stinner [Wed, 1 Apr 2015 15:47:07 +0000 (17:47 +0200)]
Issue #22117, issue #23485: Fix _PyTime_AsMilliseconds() and
_PyTime_AsMicroseconds() rounding.

Add also unit tests.

9 years agoremove assignment in conditional
Benjamin Peterson [Wed, 1 Apr 2015 15:16:40 +0000 (11:16 -0400)]
remove assignment in conditional

9 years agoCheck deques against common sequence tests (except for slicing).
Raymond Hettinger [Wed, 1 Apr 2015 15:11:09 +0000 (08:11 -0700)]
Check deques against common sequence tests (except for slicing).

9 years agoWhat's New in Python 3.5: mention signal.set_wakeup_fd() enhancement on Windows
Victor Stinner [Wed, 1 Apr 2015 14:32:32 +0000 (16:32 +0200)]
What's New in Python 3.5: mention signal.set_wakeup_fd() enhancement on Windows

9 years agoIssue #23821: Fixed test_pdb failure under -O.
Serhiy Storchaka [Wed, 1 Apr 2015 13:58:39 +0000 (16:58 +0300)]
Issue #23821: Fixed test_pdb failure under -O.

9 years agoIssue #23821: Fixed test_pdb failure under -O.
Serhiy Storchaka [Wed, 1 Apr 2015 13:58:19 +0000 (16:58 +0300)]
Issue #23821: Fixed test_pdb failure under -O.

9 years agoIssue #23838: linecache now clears the cache and returns an empty result on
Serhiy Storchaka [Wed, 1 Apr 2015 13:56:13 +0000 (16:56 +0300)]
Issue #23838: linecache now clears the cache and returns an empty result on
MemoryError.

9 years agoIssue #23838: linecache now clears the cache and returns an empty result on
Serhiy Storchaka [Wed, 1 Apr 2015 13:54:05 +0000 (16:54 +0300)]
Issue #23838: linecache now clears the cache and returns an empty result on
MemoryError.

9 years agoIt wasn't a typo, it is the mnemonic (AT=@).
R David Murray [Wed, 1 Apr 2015 13:15:02 +0000 (09:15 -0400)]
It wasn't a typo, it is the mnemonic (AT=@).

9 years agoIssue #23799: Added test.support.start_threads() for running and cleaning up
Serhiy Storchaka [Wed, 1 Apr 2015 10:06:18 +0000 (13:06 +0300)]
Issue #23799: Added test.support.start_threads() for running and cleaning up
multiple threads.

9 years agoIssue #23799: Added test.support.start_threads() for running and cleaning up
Serhiy Storchaka [Wed, 1 Apr 2015 10:01:14 +0000 (13:01 +0300)]
Issue #23799: Added test.support.start_threads() for running and cleaning up
multiple threads.

9 years agoIssue #23618: Fix EINTR handling on Windows
Victor Stinner [Wed, 1 Apr 2015 09:09:43 +0000 (11:09 +0200)]
Issue #23618: Fix EINTR handling on Windows

Windows uses WSAEINTR error code, not EINTR, for socket functions.

9 years agomerge 3.4 (#12855)
Benjamin Peterson [Wed, 1 Apr 2015 01:21:09 +0000 (21:21 -0400)]
merge 3.4 (#12855)

9 years agodocument what exactly str.splitlines() splits on (closes #12855)
Benjamin Peterson [Wed, 1 Apr 2015 01:20:36 +0000 (21:20 -0400)]
document what exactly str.splitlines() splits on (closes #12855)

Patch by Martin Panter.

9 years agoIssue #23618: Enhance EINTR handling in socket.connect()
Victor Stinner [Tue, 31 Mar 2015 20:03:59 +0000 (22:03 +0200)]
Issue #23618: Enhance EINTR handling in socket.connect()

Call PyErr_CheckSignals() immediatly if connect() or select() fails with EINTR
in internal_connect().

Refactor also the code to limit indentaton and make it more readable.

9 years agoIssue #23618: Fix EINTR handling in socket.connect()
Victor Stinner [Tue, 31 Mar 2015 19:28:42 +0000 (21:28 +0200)]
Issue #23618: Fix EINTR handling in socket.connect()

Call PyErr_CheckSignals() if connect(), select() or getsockopt() failed with
EINTR.

9 years agoIssue #23618: Cleanup internal_connect() in socketmodule.c
Victor Stinner [Tue, 31 Mar 2015 19:23:10 +0000 (21:23 +0200)]
Issue #23618: Cleanup internal_connect() in socketmodule.c

On Windows, it looks like using the C type socklen_t for getsockopt() (instead
of int) is fine, it was already used in socket.getsockopt().

9 years agoIssue 23793: Add deque support for __add__(), __mul__(), and __imul__().
Raymond Hettinger [Tue, 31 Mar 2015 15:12:23 +0000 (08:12 -0700)]
Issue 23793:  Add deque support for __add__(), __mul__(), and __imul__().

9 years agoIssue #23618: Refactor internal_connect()
Victor Stinner [Tue, 31 Mar 2015 14:35:35 +0000 (16:35 +0200)]
Issue #23618: Refactor internal_connect()

On Windows, internal_connect() now reuses internal_connect_select() and always
calls getsockopt().

9 years agoIssue #23618: Refactor internal_connect()
Victor Stinner [Tue, 31 Mar 2015 14:08:22 +0000 (16:08 +0200)]
Issue #23618: Refactor internal_connect()

The function now returns the error code instead of using the global errno
(POSIX) or WSAGetLastError() (Windows).

internal_connect() now returns errno if getsockopt() fails.

9 years agoIssue #22117: Fix integer overflow check in socket_parse_timeout() on Windows
Victor Stinner [Tue, 31 Mar 2015 14:31:19 +0000 (16:31 +0200)]
Issue #22117: Fix integer overflow check in socket_parse_timeout() on Windows

9 years agoIssue #23611: Fixed enums pickling tests. Now all picklings work with all
Serhiy Storchaka [Tue, 31 Mar 2015 13:56:49 +0000 (16:56 +0300)]
Issue #23611: Fixed enums pickling tests.  Now all picklings work with all
protocols.

9 years agoIssue #18473: Fixed pickle compatibility tests for optional modules.
Serhiy Storchaka [Tue, 31 Mar 2015 13:49:48 +0000 (16:49 +0300)]
Issue #18473: Fixed pickle compatibility tests for optional modules.
Added WindowsError to compatibility mappings.

9 years agoIssue #18473: Fixed pickle compatibility tests for optional modules.
Serhiy Storchaka [Tue, 31 Mar 2015 13:49:26 +0000 (16:49 +0300)]
Issue #18473: Fixed pickle compatibility tests for optional modules.
Added WindowsError to compatibility mappings.

9 years agoIssue #10395: Added os.path.commonpath(). Implemented in posixpath and ntpath.
Serhiy Storchaka [Tue, 31 Mar 2015 12:31:53 +0000 (15:31 +0300)]
Issue #10395: Added os.path.commonpath().  Implemented in posixpath and ntpath.
Based on patch by Rafik Draoui.

9 years agoIssue #23618: Fix internal_connect_select()
Victor Stinner [Tue, 31 Mar 2015 12:24:47 +0000 (14:24 +0200)]
Issue #23618: Fix internal_connect_select()

9 years agoIssue #23618: internal_connect_select() now waits also for error events
Victor Stinner [Tue, 31 Mar 2015 11:56:29 +0000 (13:56 +0200)]
Issue #23618: internal_connect_select() now waits also for error events

9 years agoIssue #23618: Refactor internal_select() to prepare socket.connect() for EINTR
Victor Stinner [Tue, 31 Mar 2015 11:50:44 +0000 (13:50 +0200)]
Issue #23618: Refactor internal_select() to prepare socket.connect() for EINTR

9 years agoIssue #23618: Refactor the _socket module
Victor Stinner [Tue, 31 Mar 2015 11:15:31 +0000 (13:15 +0200)]
Issue #23618: Refactor the _socket module

* Inline internal_select() function
* Rename internal_select_ex() internal_select()

9 years agoWhat's New in Python 3.5, PEP 475: mention modified signal functions
Victor Stinner [Tue, 31 Mar 2015 10:19:15 +0000 (12:19 +0200)]
What's New in Python 3.5, PEP 475: mention modified signal functions

9 years agoIssue #23611: Serializing more "lookupable" objects (such as unbound methods
Serhiy Storchaka [Tue, 31 Mar 2015 11:07:24 +0000 (14:07 +0300)]
Issue #23611: Serializing more "lookupable" objects (such as unbound methods
or nested classes) now are supported with pickle protocols < 4.

9 years agoIssue #13583: sqlite3.Row now supports slice indexing.
Serhiy Storchaka [Tue, 31 Mar 2015 10:33:11 +0000 (13:33 +0300)]
Issue #13583: sqlite3.Row now supports slice indexing.

Tests by Jessica McKellar.

9 years agoMerge heads
Serhiy Storchaka [Tue, 31 Mar 2015 10:18:35 +0000 (13:18 +0300)]
Merge heads

9 years agoIssue #18473: Fixed 2to3 and 3to2 compatible pickle mappings.
Serhiy Storchaka [Tue, 31 Mar 2015 10:17:10 +0000 (13:17 +0300)]
Issue #18473: Fixed 2to3 and 3to2 compatible pickle mappings.
Fixed ambigious reverse mappings.  Added many new mappings.  Import mapping
is no longer applied to modules already mapped with full name mapping.

Added tests for compatible pickling and unpickling and for consistency of
_compat_pickle mappings.

9 years agoIssue #18473: Fixed 2to3 and 3to2 compatible pickle mappings.
Serhiy Storchaka [Tue, 31 Mar 2015 10:12:37 +0000 (13:12 +0300)]
Issue #18473: Fixed 2to3 and 3to2 compatible pickle mappings.
Fixed ambigious reverse mappings.  Added many new mappings.  Import mapping
is no longer applied to modules already mapped with full name mapping.

Added tests for compatible pickling and unpickling and for consistency of
_compat_pickle mappings.

9 years agoIssue #23485: Enhance and update selectors doc and test_selectors
Victor Stinner [Tue, 31 Mar 2015 10:08:09 +0000 (12:08 +0200)]
Issue #23485: Enhance and update selectors doc and test_selectors

Selector.select() is now retried with the recomputed timeout when interrupted
by a signal.

Write an unit test with a signal handler raising an exception, and a unit with
a signal handler which does not raise an exception (it does nothing).

9 years agoIssue #23485: select.devpoll.poll() is now retried when interrupted by a signal
Victor Stinner [Tue, 31 Mar 2015 10:10:33 +0000 (12:10 +0200)]
Issue #23485: select.devpoll.poll() is now retried when interrupted by a signal

9 years agoIssue #23485: select.kqueue.control() is now retried when interrupted by a signal
Victor Stinner [Tue, 31 Mar 2015 09:48:34 +0000 (11:48 +0200)]
Issue #23485: select.kqueue.control() is now retried when interrupted by a signal

9 years agoFix typo in Doc/whatsnew/3.5.rst.
Berker Peksag [Tue, 31 Mar 2015 04:20:03 +0000 (07:20 +0300)]
Fix typo in Doc/whatsnew/3.5.rst.

9 years agomerge
Raymond Hettinger [Tue, 31 Mar 2015 03:29:55 +0000 (20:29 -0700)]
merge

9 years agoIssue #23729: Improve docs for ElementTree namespace parsing
Raymond Hettinger [Tue, 31 Mar 2015 03:29:28 +0000 (20:29 -0700)]
Issue #23729:  Improve docs for ElementTree namespace parsing

9 years agoIssue #23485: select.epoll.poll() is now retried when interrupted by a signal
Victor Stinner [Mon, 30 Mar 2015 19:59:21 +0000 (21:59 +0200)]
Issue #23485: select.epoll.poll() is now retried when interrupted by a signal

9 years agoIssue #23485: select.poll.poll() is now retried when interrupted by a signal
Victor Stinner [Mon, 30 Mar 2015 19:38:00 +0000 (21:38 +0200)]
Issue #23485: select.poll.poll() is now retried when interrupted by a signal

9 years agoIssue #23485: Add _PyTime_FromMillisecondsObject() function
Victor Stinner [Mon, 30 Mar 2015 19:36:10 +0000 (21:36 +0200)]
Issue #23485: Add _PyTime_FromMillisecondsObject() function

9 years agoIssue #23485: Fix test_signal, select.select() now retries the syscall if the
Victor Stinner [Mon, 30 Mar 2015 20:09:14 +0000 (22:09 +0200)]
Issue #23485: Fix test_signal, select.select() now retries the syscall if the
signal handler does not raise an exception

9 years agoIgnore .rst files in the venv directory.
Brett Cannon [Mon, 30 Mar 2015 19:35:37 +0000 (15:35 -0400)]
Ignore .rst files in the venv directory.

9 years agoPEP 475: on EINTR, retry the function even if the timeout is equals to zero
Victor Stinner [Mon, 30 Mar 2015 19:33:51 +0000 (21:33 +0200)]
PEP 475: on EINTR, retry the function even if the timeout is equals to zero

Retry:

* signal.sigtimedwait()
* threading.Lock.acquire()
* threading.RLock.acquire()
* time.sleep()

9 years agoIssue #23485: select.select() is now retried automatically with the recomputed
Victor Stinner [Mon, 30 Mar 2015 19:16:11 +0000 (21:16 +0200)]
Issue #23485: select.select() is now retried automatically with the recomputed
timeout when interrupted by a signal, except if the signal handler raises an
exception. This change is part of the PEP 475.

The asyncore and selectors module doesn't catch the InterruptedError exception
anymore when calling select.select(), since this function should not raise
InterruptedError anymore.

9 years agoPartially revert 3603bae63c13 (issue23326) for asyncio.
Serhiy Storchaka [Mon, 30 Mar 2015 19:25:16 +0000 (22:25 +0300)]
Partially revert 3603bae63c13 (issue23326) for asyncio.

9 years ago#2211: Fix typo, address missed review comment.
R David Murray [Mon, 30 Mar 2015 15:48:50 +0000 (11:48 -0400)]
#2211: Fix typo, address missed review comment.

9 years agoMerge: #23792: also catch interrupt around pipe.write.
R David Murray [Mon, 30 Mar 2015 14:15:22 +0000 (10:15 -0400)]
Merge: #23792: also catch interrupt around pipe.write.

9 years ago#23792: also catch interrupt around pipe.write.
R David Murray [Mon, 30 Mar 2015 14:14:47 +0000 (10:14 -0400)]
#23792: also catch interrupt around pipe.write.

The previous patch only dealt with KeyboardInterrupt when all of the
data had been consumed by the pager.  This deals with the interrupt
when some data is still pending.

9 years agoWhat's New in Python 3.5: add pep 461 (bytes%args) and 465 (a@b)
Victor Stinner [Mon, 30 Mar 2015 13:04:45 +0000 (15:04 +0200)]
What's New in Python 3.5: add pep 461 (bytes%args) and 465 (a@b)

9 years agoIssue #23605: Fix typo in an os.walk() comment
Victor Stinner [Mon, 30 Mar 2015 09:54:05 +0000 (11:54 +0200)]
Issue #23605: Fix typo in an os.walk() comment

Thanks Ben Hoyt for the report.

9 years ago(Merge 3.4) Issue #22585: os.urandom() now releases the GIL when the
Victor Stinner [Mon, 30 Mar 2015 09:19:07 +0000 (11:19 +0200)]
(Merge 3.4) Issue #22585: os.urandom() now releases the GIL when the
getentropy() is used (OpenBSD 5.6+).

9 years agoIssue #22585: os.urandom() now releases the GIL when the getentropy() is used
Victor Stinner [Mon, 30 Mar 2015 09:18:30 +0000 (11:18 +0200)]
Issue #22585: os.urandom() now releases the GIL when the getentropy() is used
(OpenBSD 5.6+).

9 years agoIssue #22181: os.urandom() now releases the GIL when the getrandom()
Victor Stinner [Mon, 30 Mar 2015 09:16:40 +0000 (11:16 +0200)]
Issue #22181: os.urandom() now releases the GIL when the getrandom()
implementation is used.

9 years agoFix PY_VERSION in Include/patchlevel.h to reflect our post-3.5.0a3 state.
Larry Hastings [Mon, 30 Mar 2015 08:56:27 +0000 (01:56 -0700)]
Fix PY_VERSION in Include/patchlevel.h to reflect our post-3.5.0a3 state.

9 years agoMerge 3.5.0a3 release engineering changes back into trunk.
Larry Hastings [Mon, 30 Mar 2015 08:50:00 +0000 (01:50 -0700)]
Merge 3.5.0a3 release engineering changes back into trunk.

9 years agoIssue #22117: Try to fix rounding in conversion from Python double to _PyTime_t
Victor Stinner [Mon, 30 Mar 2015 08:22:16 +0000 (10:22 +0200)]
Issue #22117: Try to fix rounding in conversion from Python double to _PyTime_t
using the C volatile keyword.

9 years agoIssue #23752: _Py_fstat() is now responsible to raise the Python exception
Victor Stinner [Mon, 30 Mar 2015 08:09:31 +0000 (10:09 +0200)]
Issue #23752: _Py_fstat() is now responsible to raise the Python exception

Add _Py_fstat_noraise() function when a Python exception is not welcome.

9 years agoIssue #23785: Fixed memory leak in TextIOWrapper.tell() in rare circumstances.
Serhiy Storchaka [Mon, 30 Mar 2015 07:00:40 +0000 (10:00 +0300)]
Issue #23785: Fixed memory leak in TextIOWrapper.tell() in rare circumstances.

9 years agoIssue #23785: Fixed memory leak in TextIOWrapper.tell() in rare circumstances.
Serhiy Storchaka [Mon, 30 Mar 2015 06:58:41 +0000 (09:58 +0300)]
Issue #23785: Fixed memory leak in TextIOWrapper.tell() in rare circumstances.

9 years agoIssue #23783: Fixed memory leak in PyObject_ClearWeakRefs() in case of
Serhiy Storchaka [Mon, 30 Mar 2015 06:52:53 +0000 (09:52 +0300)]
Issue #23783: Fixed memory leak in PyObject_ClearWeakRefs() in case of
MemoryError.

9 years agoIssue #23783: Fixed memory leak in PyObject_ClearWeakRefs() in case of
Serhiy Storchaka [Mon, 30 Mar 2015 06:52:29 +0000 (09:52 +0300)]
Issue #23783: Fixed memory leak in PyObject_ClearWeakRefs() in case of
MemoryError.

9 years agoIssue #23466: %c, %o, %x, and %X in bytes formatting now raise TypeError on
Serhiy Storchaka [Mon, 30 Mar 2015 06:19:08 +0000 (09:19 +0300)]
Issue #23466: %c, %o, %x, and %X in bytes formatting now raise TypeError on
non-integer input.

9 years agoIssue #23171: csv.Writer.writerow() now supports arbitrary iterables.
Serhiy Storchaka [Mon, 30 Mar 2015 06:09:54 +0000 (09:09 +0300)]
Issue #23171: csv.Writer.writerow() now supports arbitrary iterables.

9 years agoIssue #22117: Remove _PyTime_ROUND_DOWN and _PyTime_ROUND_UP rounding methods
Victor Stinner [Mon, 30 Mar 2015 01:57:14 +0000 (03:57 +0200)]
Issue #22117: Remove _PyTime_ROUND_DOWN and _PyTime_ROUND_UP rounding methods

Use _PyTime_ROUND_FLOOR and _PyTime_ROUND_CEILING instead.

9 years ago#23745: handle duplicate MIME parameter names in new parser.
R David Murray [Mon, 30 Mar 2015 01:53:05 +0000 (21:53 -0400)]
#23745: handle duplicate MIME parameter names in new parser.

This mimics get_param's error handling for the most part.  It is slightly
better in some regards as get_param can produce some really weird results for
duplicate *0* parts.  It departs from get_param slightly in that if we have a
mix of non-extended and extended pieces for the same parameter name, the new
parser assumes they were all supposed to be extended and concatenates all the
values, whereas get_param always picks the non-extended parameter value.  All
of this error recovery is pretty much arbitrary decisions...

9 years agoIssue #22117: Replace usage of _PyTime_ROUND_UP with _PyTime_ROUND_CEILING
Victor Stinner [Mon, 30 Mar 2015 01:49:14 +0000 (03:49 +0200)]
Issue #22117: Replace usage of _PyTime_ROUND_UP with _PyTime_ROUND_CEILING

All these functions only accept positive timeouts, so this change has no effect
in practice.

9 years agoIssue #22117: Add _PyTime_ROUND_CEILING rounding method for timestamps
Victor Stinner [Mon, 30 Mar 2015 01:52:49 +0000 (03:52 +0200)]
Issue #22117: Add _PyTime_ROUND_CEILING rounding method for timestamps

Add also more tests for ROUNd_FLOOR.

9 years agoMerge: #23745: handle duplicate MIME parameter names in new parser.
R David Murray [Mon, 30 Mar 2015 01:54:27 +0000 (21:54 -0400)]
Merge: #23745: handle duplicate MIME parameter names in new parser.

9 years agoIssue #23752: When built from an existing file descriptor, io.FileIO() now only
Victor Stinner [Mon, 30 Mar 2015 01:21:06 +0000 (03:21 +0200)]
Issue #23752: When built from an existing file descriptor, io.FileIO() now only
calls fstat() once. Before fstat() was called twice, which was not necessary.

9 years agoIssue #22117: Add assertions to _PyTime_AsTimeval() and _PyTime_AsTimespec() to
Victor Stinner [Mon, 30 Mar 2015 00:54:57 +0000 (02:54 +0200)]
Issue #22117: Add assertions to _PyTime_AsTimeval() and _PyTime_AsTimespec() to
check that microseconds and nanoseconds fits into the specified range.