]> granicus.if.org Git - python/log
python
9 years agoIssue #4727: Fixed issue number in Misc/NEWS.
Serhiy Storchaka [Tue, 24 Mar 2015 20:37:08 +0000 (22:37 +0200)]
Issue #4727: Fixed issue number in Misc/NEWS.

9 years agoIssue #23671: string.Template now allows to specify the "self" parameter as
Serhiy Storchaka [Tue, 24 Mar 2015 20:30:46 +0000 (22:30 +0200)]
Issue #23671: string.Template now allows to specify the "self" parameter as
keyword argument.  string.Formatter now allows to specify the "self" and
the "format_string" parameters as keyword arguments.

9 years agoIssue #23671: string.Template now allows to specify the "self" parameter as
Serhiy Storchaka [Tue, 24 Mar 2015 20:28:43 +0000 (22:28 +0200)]
Issue #23671: string.Template now allows to specify the "self" parameter as
keyword argument.  string.Formatter now allows to specify the "self" and
the "format_string" parameters as keyword arguments.

9 years agoIssue #23573: Increased performance of string search operations (str.find,
Serhiy Storchaka [Tue, 24 Mar 2015 19:55:47 +0000 (21:55 +0200)]
Issue #23573: Increased performance of string search operations (str.find,
str.index, str.count, the in operator, str.split, str.partition) with
arguments of different kinds (UCS1, UCS2, UCS4).

9 years agoAdded tests for mixed kinds of Unicode strings.
Serhiy Storchaka [Tue, 24 Mar 2015 19:49:53 +0000 (21:49 +0200)]
Added tests for mixed kinds of Unicode strings.

9 years agoAdded tests for mixed kinds of Unicode strings.
Serhiy Storchaka [Tue, 24 Mar 2015 19:48:30 +0000 (21:48 +0200)]
Added tests for mixed kinds of Unicode strings.

9 years agoIssue #23583: Added tests for standard IO streams in IDLE.
Serhiy Storchaka [Tue, 24 Mar 2015 17:49:23 +0000 (19:49 +0200)]
Issue #23583: Added tests for standard IO streams in IDLE.

9 years agoIssue #23583: Added tests for standard IO streams in IDLE.
Serhiy Storchaka [Tue, 24 Mar 2015 17:46:54 +0000 (19:46 +0200)]
Issue #23583: Added tests for standard IO streams in IDLE.

9 years agoIssue #23502: The pprint module now supports mapping proxies.
Serhiy Storchaka [Tue, 24 Mar 2015 17:31:50 +0000 (19:31 +0200)]
Issue #23502: The pprint module now supports mapping proxies.
In particular the __dict__ attributes of building types.

9 years agoIssue #17530: pprint now wraps long bytes objects and bytearrays.
Serhiy Storchaka [Tue, 24 Mar 2015 17:22:37 +0000 (19:22 +0200)]
Issue #17530: pprint now wraps long bytes objects and bytearrays.

9 years agoIssue #23741: Slightly refactor the pprint module to make it a little more
Serhiy Storchaka [Tue, 24 Mar 2015 16:45:23 +0000 (18:45 +0200)]
Issue #23741: Slightly refactor the pprint module to make it a little more
extesible.  No public API is added.

9 years agoIssue #22687: Fixed some corner cases in breaking words in tetxtwrap.
Serhiy Storchaka [Tue, 24 Mar 2015 16:32:27 +0000 (18:32 +0200)]
Issue #22687: Fixed some corner cases in breaking words in tetxtwrap.
Got rid of quadratic complexity in breaking long words.

9 years agochange Σ to ν for obscure joke reasons
Benjamin Peterson [Tue, 24 Mar 2015 16:12:44 +0000 (12:12 -0400)]
change Σ to ν for obscure joke reasons

https://twitter.com/ncoghlan_dev/status/579173053793353728

9 years agoIssue #20289: The copy module now uses pickle protocol 4 (PEP 3154) and
Serhiy Storchaka [Tue, 24 Mar 2015 16:06:42 +0000 (18:06 +0200)]
Issue #20289: The copy module now uses pickle protocol 4 (PEP 3154) and
supports copying of instances of classes whose __new__ method takes
keyword-only arguments.

9 years agoIssue #23571: Enhance _Py_CheckFunctionResult()
Victor Stinner [Tue, 24 Mar 2015 15:28:52 +0000 (16:28 +0100)]
Issue #23571: Enhance _Py_CheckFunctionResult()

Too bad, sometimes Py_FatalError() is unable to write the exception into
sys.stderr (on "AMD64 OpenIndiana 3.x" buildbot, the buildbot was probably out
of memory).

Call Py_FatalError() with a different message for the two cases (result+error,
or no result and no error).

9 years agoIssue #23571: Update test_capi
Victor Stinner [Tue, 24 Mar 2015 13:01:32 +0000 (14:01 +0100)]
Issue #23571: Update test_capi

9 years ago(Merge 3.4) Issue #23571: Py_FatalError() now tries to flush sys.stdout and
Victor Stinner [Tue, 24 Mar 2015 12:46:18 +0000 (13:46 +0100)]
(Merge 3.4) Issue #23571: Py_FatalError() now tries to flush sys.stdout and
sys.stderr

It should help to see exceptions when stderr if buffered: PyErr_Display() calls
sys.stderr.write(), it doesn't write into stderr file descriptor directly.

9 years agoIssue #23571: Py_FatalError() now tries to flush sys.stdout and sys.stderr
Victor Stinner [Tue, 24 Mar 2015 12:44:35 +0000 (13:44 +0100)]
Issue #23571: Py_FatalError() now tries to flush sys.stdout and sys.stderr

It should help to see exceptions when stderr if buffered: PyErr_Display() calls
sys.stderr.write(), it doesn't write into stderr file descriptor directly.

9 years agostdprinter_write(): mention the encoding
Victor Stinner [Tue, 24 Mar 2015 12:40:29 +0000 (13:40 +0100)]
stdprinter_write(): mention the encoding

9 years agoIssue #23571: In debug mode, _Py_CheckFunctionResult() now calls
Victor Stinner [Tue, 24 Mar 2015 11:53:59 +0000 (12:53 +0100)]
Issue #23571: In debug mode, _Py_CheckFunctionResult() now calls
Py_FatalError() instead of using an assertion in debug mode. Py_FatalError()
displays the current exception and the traceback which contain more information
than just the assertion error.

9 years agoIssue #23571: PyErr_FormatV() and PyErr_SetObject() now always clear the
Victor Stinner [Tue, 24 Mar 2015 11:41:23 +0000 (12:41 +0100)]
Issue #23571: PyErr_FormatV() and PyErr_SetObject() now always clear the
current exception because they can run arbitrary Python code and so no
exception must be set.

9 years agoIssue #23753: Move _Py_wstat() from Python/fileutils.c to Modules/getpath.c
Victor Stinner [Tue, 24 Mar 2015 11:16:28 +0000 (12:16 +0100)]
Issue #23753: Move _Py_wstat() from Python/fileutils.c to Modules/getpath.c

I expected more users of _Py_wstat(), but in practice it's only used by
Modules/getpath.c. Move the function because it's not needed on Windows.
Windows uses PC/getpathp.c which uses the Win32 API (ex: GetFileAttributesW())
not the POSIX API.

9 years ago(Merge 3.4) Issue #23571: Enhance Py_FatalError()
Victor Stinner [Tue, 24 Mar 2015 11:01:30 +0000 (12:01 +0100)]
(Merge 3.4) Issue #23571: Enhance Py_FatalError()

* Display the current Python stack if an exception was raised but the exception
  has no traceback
* Disable faulthandler if an exception was raised (before it was only disabled
  if no exception was raised)
* To display the current Python stack, call PyGILState_GetThisThreadState()
  which works even if the GIL was released

9 years ago#11468: merge with 3.4.
Ezio Melotti [Tue, 24 Mar 2015 10:52:13 +0000 (12:52 +0200)]
#11468: merge with 3.4.

9 years ago#11468: improve unittest basic example. Initial patch by Florian Preinstorfer.
Ezio Melotti [Tue, 24 Mar 2015 10:42:41 +0000 (12:42 +0200)]
#11468: improve unittest basic example.  Initial patch by Florian Preinstorfer.

9 years agoIssue #23571: Enhance Py_FatalError()
Victor Stinner [Tue, 24 Mar 2015 10:24:06 +0000 (11:24 +0100)]
Issue #23571: Enhance Py_FatalError()

* Display the current Python stack if an exception was raised but the exception
  has no traceback
* Disable faulthandler if an exception was raised (before it was only disabled
  if no exception was raised)
* To display the current Python stack, call PyGILState_GetThisThreadState()
  which works even if the GIL was released

9 years agoIssue #23753: Python doesn't support anymore platforms without stat() or
Victor Stinner [Tue, 24 Mar 2015 09:27:50 +0000 (10:27 +0100)]
Issue #23753: Python doesn't support anymore platforms without stat() or
fstat(), these functions are always required.

Remove HAVE_STAT and HAVE_FSTAT defines, and stop supporting DONT_HAVE_STAT and
DONT_HAVE_FSTAT.

9 years agoImprove and fix-up comments.
Raymond Hettinger [Tue, 24 Mar 2015 07:19:53 +0000 (00:19 -0700)]
Improve and fix-up comments.

9 years agoIssue 23744: Minor speed-up for deque.__bool__().
Raymond Hettinger [Tue, 24 Mar 2015 06:23:55 +0000 (23:23 -0700)]
Issue 23744:  Minor speed-up for deque.__bool__().

9 years agoMisc/NEWS entries for zipapp changes
Paul Moore [Mon, 23 Mar 2015 21:40:43 +0000 (21:40 +0000)]
Misc/NEWS entries for zipapp changes

9 years agoMerge 3.4 (faulthandler ICC)
Victor Stinner [Mon, 23 Mar 2015 20:21:00 +0000 (21:21 +0100)]
Merge 3.4 (faulthandler ICC)

9 years agoIssue #23654: Fix faulthandler._stack_overflow() for the Intel C Compiler (ICC)
Victor Stinner [Mon, 23 Mar 2015 20:20:27 +0000 (21:20 +0100)]
Issue #23654: Fix faulthandler._stack_overflow() for the Intel C Compiler (ICC)

Issue #23654: Turn off ICC's tail call optimization for the stack_overflow
generator. ICC turns the recursive tail call into a loop.

Patch written by Matt Frank.

9 years agoNull merge
Serhiy Storchaka [Mon, 23 Mar 2015 13:26:49 +0000 (15:26 +0200)]
Null merge

9 years agoIssue #21560: An attempt to write a data of wrong type no longer cause
Serhiy Storchaka [Mon, 23 Mar 2015 13:25:43 +0000 (15:25 +0200)]
Issue #21560: An attempt to write a data of wrong type no longer cause
GzipFile corruption.  Original patch by Wolfgang Maier.

9 years agoIssue #23688: Added support of arbitrary bytes-like objects and avoided
Serhiy Storchaka [Mon, 23 Mar 2015 12:59:48 +0000 (14:59 +0200)]
Issue #23688: Added support of arbitrary bytes-like objects and avoided
unnecessary copying of memoryview in gzip.GzipFile.write().
Original patch by Wolfgang Maier.

9 years agoIssue #23252: Added support for writing ZIP files to unseekable streams.
Serhiy Storchaka [Sun, 22 Mar 2015 23:09:35 +0000 (01:09 +0200)]
Issue #23252:  Added support for writing ZIP files to unseekable streams.

9 years agoIssue #21526: Tkinter now supports new boolean type in Tcl 8.5.
Serhiy Storchaka [Sun, 22 Mar 2015 22:47:45 +0000 (00:47 +0200)]
Issue #21526: Tkinter now supports new boolean type in Tcl 8.5.

9 years agomerge
Raymond Hettinger [Sun, 22 Mar 2015 22:29:48 +0000 (15:29 -0700)]
merge

9 years agoIssue 23729: Document ElementTree namespace handling and fix an omission in the...
Raymond Hettinger [Sun, 22 Mar 2015 22:29:09 +0000 (15:29 -0700)]
Issue 23729:  Document ElementTree namespace handling and fix an omission in the XPATH predicate table.

9 years agoMerge: #23647: Increase imaplib's MAXLINE to accommodate modern mailbox sizes.
R David Murray [Sun, 22 Mar 2015 20:18:59 +0000 (16:18 -0400)]
Merge: #23647: Increase imaplib's MAXLINE to accommodate modern mailbox sizes.

9 years ago#23647: Increase imaplib's MAXLINE to accommodate modern mailbox sizes.
R David Murray [Sun, 22 Mar 2015 20:17:46 +0000 (16:17 -0400)]
#23647: Increase imaplib's MAXLINE to accommodate modern mailbox sizes.

9 years agoMerge: #23539: Set Content-Length to 0 for PUT, POST, and PATCH if body is None.
R David Murray [Sun, 22 Mar 2015 19:19:01 +0000 (15:19 -0400)]
Merge: #23539: Set Content-Length to 0 for PUT, POST, and PATCH if body is None.

9 years ago#23539: Set Content-Length to 0 for PUT, POST, and PATCH if body is None.
R David Murray [Sun, 22 Mar 2015 19:18:23 +0000 (15:18 -0400)]
#23539: Set Content-Length to 0 for PUT, POST, and PATCH if body is None.

Some http servers will reject PUT, POST, and PATCH requests if they
do not have a Content-Length header.

Patch by James Rutherford, with additional cleaning up of the
'request' documentation by me.

9 years agoMerge: #23700: fix/improve comment
R David Murray [Sun, 22 Mar 2015 16:34:50 +0000 (12:34 -0400)]
Merge: #23700: fix/improve comment

9 years ago#23700: fix/improve comment
R David Murray [Sun, 22 Mar 2015 16:33:46 +0000 (12:33 -0400)]
#23700: fix/improve comment

9 years ago#23657 Don't explicitly do an isinstance check for str in zipapp
Paul Moore [Sun, 22 Mar 2015 15:32:36 +0000 (15:32 +0000)]
#23657 Don't explicitly do an isinstance check for str in zipapp

As a result, explicitly support pathlib.Path objects as arguments.
Also added tests for the CLI interface.

9 years agomerge 3.4 (#22933)
Benjamin Peterson [Sun, 22 Mar 2015 14:15:12 +0000 (10:15 -0400)]
merge 3.4 (#22933)

9 years agoclarify behavior of shutil.move when destination exists (closes #22933)
Benjamin Peterson [Sun, 22 Mar 2015 14:11:54 +0000 (10:11 -0400)]
clarify behavior of shutil.move when destination exists (closes #22933)

Patch by Mike Short.

9 years agoIssue #22289: merge from 3.4
Ned Deily [Sun, 22 Mar 2015 08:19:10 +0000 (01:19 -0700)]
Issue #22289: merge from 3.4

9 years agoIssue #22289: Prevent test_urllib2net failures due to ftp connection timeout.
Ned Deily [Sun, 22 Mar 2015 08:14:48 +0000 (01:14 -0700)]
Issue #22289: Prevent test_urllib2net failures due to ftp connection timeout.

9 years agoNull merge
Serhiy Storchaka [Sun, 22 Mar 2015 07:47:20 +0000 (09:47 +0200)]
Null merge

9 years agoIssue #22079: Deprecation warning now is issued in PyType_Ready() instead of
Serhiy Storchaka [Sun, 22 Mar 2015 07:46:36 +0000 (09:46 +0200)]
Issue #22079: Deprecation warning now is issued in  PyType_Ready() instead of
raising TypeError when statically allocated type subclasses dynamically
allocated type

9 years agoIssue #23571: Fix test_capi
Victor Stinner [Sat, 21 Mar 2015 16:24:50 +0000 (17:24 +0100)]
Issue #23571: Fix test_capi

9 years agoIssue #23571: _Py_CheckFunctionResult() now gives the name of the function
Victor Stinner [Sat, 21 Mar 2015 14:04:43 +0000 (15:04 +0100)]
Issue #23571: _Py_CheckFunctionResult() now gives the name of the function
which returned an invalid result (result+error or no result without error) in
the exception message.

Add also unit test to check that the exception contains the name of the
function.

Special case: the final _PyEval_EvalFrameEx() check doesn't mention the
function since it didn't execute a single function but a whole frame.

9 years agoMinor nit. Make the rotate() success/fail tests consistent.
Raymond Hettinger [Sat, 21 Mar 2015 09:03:40 +0000 (02:03 -0700)]
Minor nit.  Make the rotate() success/fail tests consistent.

9 years agoFor safety, wait to decref deleted values until the deque state has been restored.
Raymond Hettinger [Sat, 21 Mar 2015 08:53:16 +0000 (01:53 -0700)]
For safety, wait to decref deleted values until the deque state has been restored.

9 years agoFix minor formatting nits and remove unnecessary comment.
Raymond Hettinger [Sat, 21 Mar 2015 08:42:10 +0000 (01:42 -0700)]
Fix minor formatting nits and remove unnecessary comment.

9 years agoIssue 23704: Add index(), copy(), and insert() to deques. Register deques as a...
Raymond Hettinger [Sat, 21 Mar 2015 08:37:37 +0000 (01:37 -0700)]
Issue 23704:  Add index(), copy(), and insert() to deques.  Register deques as a MutableSequence.

9 years agoIssue #22351: The nntplib.NNTP constructor no longer leaves the connection
Serhiy Storchaka [Sat, 21 Mar 2015 07:41:19 +0000 (09:41 +0200)]
Issue #22351: The nntplib.NNTP constructor no longer leaves the connection
and socket open until the garbage collector cleans them up.  Patch by
Martin Panter.

9 years agoIssue #22351: The nntplib.NNTP constructor no longer leaves the connection
Serhiy Storchaka [Sat, 21 Mar 2015 07:40:26 +0000 (09:40 +0200)]
Issue #22351: The nntplib.NNTP constructor no longer leaves the connection
and socket open until the garbage collector cleans them up.  Patch by
Martin Panter.

9 years agoRemoved trailing tabs.
Serhiy Storchaka [Sat, 21 Mar 2015 07:25:53 +0000 (09:25 +0200)]
Removed trailing tabs.

9 years agoUpdate Wix version and fixes wxs file.
Steve Dower [Sat, 21 Mar 2015 05:05:33 +0000 (22:05 -0700)]
Update Wix version and fixes wxs file.

9 years agoIssue 23705: Improve the performance of __contains__ checks for deques.
Raymond Hettinger [Fri, 20 Mar 2015 23:38:56 +0000 (16:38 -0700)]
Issue 23705:  Improve the performance of __contains__ checks for deques.

9 years agoIssue #22832: Tweaked parameter names for fcntl module to better match
Serhiy Storchaka [Fri, 20 Mar 2015 18:04:21 +0000 (20:04 +0200)]
Issue #22832: Tweaked parameter names for fcntl module to better match
official POSIX documentation.  Updated the documenttion for Python 3.
Patch by Alex Shkop.

9 years agoMerge: #11726: Make linecache docs reflect that all files are treated the same.
R David Murray [Fri, 20 Mar 2015 15:32:17 +0000 (11:32 -0400)]
Merge: #11726: Make linecache docs reflect that all files are treated the same.

9 years ago#11726: Make linecache docs reflect that all files are treated the same.
R David Murray [Fri, 20 Mar 2015 15:31:38 +0000 (11:31 -0400)]
#11726: Make linecache docs reflect that all files are treated the same.

Being able to read non-python text files is not a purpose of linecache, but it
does work and people use it.  This changeset adjusts the language to make it
clear that Python files are not treated uniquely, but does not go so far as to
say reading non-python files is explicitly supported.

9 years agoIssue #22181: Run "aclocal; autoconf; autoheader" to regenerate configure
Victor Stinner [Fri, 20 Mar 2015 15:03:14 +0000 (16:03 +0100)]
Issue #22181: Run "aclocal; autoconf; autoheader" to regenerate configure

9 years agoIssue #23681: The -b option now affects comparisons of bytes with int.
Serhiy Storchaka [Fri, 20 Mar 2015 14:54:57 +0000 (16:54 +0200)]
Issue #23681: The -b option now affects comparisons of bytes with int.

9 years agoIssue #23681: Fixed Python 2 to 3 poring bugs.
Serhiy Storchaka [Fri, 20 Mar 2015 14:48:02 +0000 (16:48 +0200)]
Issue #23681: Fixed Python 2 to 3 poring bugs.
Indexing bytes retiurns an integer, not bytes.

9 years agoIssue #23681: Fixed Python 2 to 3 poring bugs.
Serhiy Storchaka [Fri, 20 Mar 2015 14:46:19 +0000 (16:46 +0200)]
Issue #23681: Fixed Python 2 to 3 poring bugs.
Indexing bytes retiurns an integer, not bytes.

9 years agoIssue #23700: NamedTemporaryFile iterator closed underlied file object in
Serhiy Storchaka [Fri, 20 Mar 2015 14:12:43 +0000 (16:12 +0200)]
Issue #23700: NamedTemporaryFile iterator closed underlied file object in
some circunstances while NamedTemporaryFile object was living.  This causes
failing test_csv.  Changed the implementation of NamedTemporaryFile.__iter__
to make tests passed.

9 years agoIssue #23700: NamedTemporaryFile iterator closed underlied file object in
Serhiy Storchaka [Fri, 20 Mar 2015 14:11:20 +0000 (16:11 +0200)]
Issue #23700: NamedTemporaryFile iterator closed underlied file object in
some circunstances while NamedTemporaryFile object was living.  This causes
failing test_csv.  Changed the implementation of NamedTemporaryFile.__iter__
to make tests passed.

9 years agoIssue #23715: Fix test_script_helper
Victor Stinner [Fri, 20 Mar 2015 13:02:33 +0000 (14:02 +0100)]
Issue #23715: Fix test_script_helper

9 years agoIssue #23696: Remove test on ZipImportError.__context__ because the context is
Victor Stinner [Fri, 20 Mar 2015 12:48:36 +0000 (13:48 +0100)]
Issue #23696: Remove test on ZipImportError.__context__ because the context is
None on Windows.

When the file is not readable, the error occurs at open on UNIX. On Windows,
the error only occurs at the first operation on the open file. It would require
to many changes to set __context__ to an OSError for all file operations, for a
little benefit (__context__ is almost never used).

9 years agoIssue #23715: Fix test_eintr, skip tests on signal.sigwaitinfo() and
Victor Stinner [Fri, 20 Mar 2015 12:42:52 +0000 (13:42 +0100)]
Issue #23715: Fix test_eintr, skip tests on signal.sigwaitinfo() and
signal.sigtimedwait() if functions are missing

9 years agoIssue #23715: Enhance test.script_helper to investigate test_eintr failure
Victor Stinner [Fri, 20 Mar 2015 12:38:08 +0000 (13:38 +0100)]
Issue #23715: Enhance test.script_helper to investigate test_eintr failure

If Python failed, show also stdout in the assertion error.

9 years agoIssue #23715: signal.sigwaitinfo() and signal.sigtimedwait() are now retried
Victor Stinner [Fri, 20 Mar 2015 11:54:28 +0000 (12:54 +0100)]
Issue #23715: signal.sigwaitinfo() and signal.sigtimedwait() are now retried
when interrupted by a signal not in the *sigset* parameter, if the signal
handler does not raise an exception. signal.sigtimedwait() recomputes the
timeout with a monotonic clock when it is retried.

Remove test_signal.test_sigwaitinfo_interrupted() because sigwaitinfo() doesn't
raise InterruptedError anymore if it is interrupted by a signal not in its
sigset parameter.

9 years agoIssue #23708: Save/restore errno in _Py_read() and _Py_write()
Victor Stinner [Fri, 20 Mar 2015 10:58:18 +0000 (11:58 +0100)]
Issue #23708: Save/restore errno in _Py_read() and _Py_write()

Save and then restore errno because PyErr_CheckSignals() and
PyErr_SetFromErrno() can modify it.

9 years agoFix compiler warnings: comparison between signed and unsigned numbers
Victor Stinner [Fri, 20 Mar 2015 10:32:24 +0000 (11:32 +0100)]
Fix compiler warnings: comparison between signed and unsigned numbers

9 years agoIssue #23708: Split assertion expression in two assertions in _Py_read() and
Victor Stinner [Fri, 20 Mar 2015 10:21:41 +0000 (11:21 +0100)]
Issue #23708: Split assertion expression in two assertions in _Py_read() and
_Py_write() to know which test failed on the buildbot "AMD64 Snow Leop 3.x".

9 years agoIssue #23696: Chain ZipImportError to the OSError
Victor Stinner [Fri, 20 Mar 2015 09:52:25 +0000 (10:52 +0100)]
Issue #23696: Chain ZipImportError to the OSError

9 years agoIssue #23709, #23001: ossaudiodev now uses Py_ssize_t for sizes instead of int
Victor Stinner [Fri, 20 Mar 2015 09:37:34 +0000 (10:37 +0100)]
Issue #23709, #23001: ossaudiodev now uses Py_ssize_t for sizes instead of int

The module is now also "SSIZE_T clean" (for PyArg_Parse...() functions) since
it switched to Py_buffer ("y*" argument format).

9 years agoIssue #23001: Fix typo
Victor Stinner [Fri, 20 Mar 2015 09:24:18 +0000 (10:24 +0100)]
Issue #23001: Fix typo

9 years agoIssue #22826: The result of open() in Tools/freeze/bkfile.py is now better
Serhiy Storchaka [Fri, 20 Mar 2015 07:21:59 +0000 (09:21 +0200)]
Issue #22826: The result of open() in Tools/freeze/bkfile.py is now better
compatible with regular files (in particular it now supports the context
management protocol).

9 years agoIssue #23001: Few functions in modules mmap, ossaudiodev, socket, ssl, and
Serhiy Storchaka [Fri, 20 Mar 2015 07:00:36 +0000 (09:00 +0200)]
Issue #23001: Few functions in modules mmap, ossaudiodev, socket, ssl, and
codecs, that accepted only read-only bytes-like object now accept writable
bytes-like object too.

9 years agoIssue #23646: Fix test_threading on Windows
Victor Stinner [Fri, 20 Mar 2015 02:06:12 +0000 (03:06 +0100)]
Issue #23646: Fix test_threading on Windows

9 years agoCleanup pytime.c: add XXX_TO_YYY constants (ex: SEC_TO_US)
Victor Stinner [Fri, 20 Mar 2015 00:55:04 +0000 (01:55 +0100)]
Cleanup pytime.c: add XXX_TO_YYY constants (ex: SEC_TO_US)

9 years agoIssue #23646: Enhance precision of time.sleep() and socket timeout when
Victor Stinner [Fri, 20 Mar 2015 00:42:20 +0000 (01:42 +0100)]
Issue #23646: Enhance precision of time.sleep() and socket timeout when
interrupted by a signal

Add a new _PyTime_AddDouble() function and remove _PyTime_ADD_SECONDS() macro.
The _PyTime_ADD_SECONDS only supported an integer number of seconds, the
_PyTime_AddDouble() has subsecond resolution.

9 years agoIssue #23709: The ossaudiodev module now retries read/write when interrupted by
Victor Stinner [Thu, 19 Mar 2015 23:27:28 +0000 (00:27 +0100)]
Issue #23709: The ossaudiodev module now retries read/write when interrupted by
a signal (PEP 475).

Use he new _Py_read() and _Py_write() functions.

9 years agoIssue #23686: Update OS X 10.5 installer build to use OpenSSL 1.0.2a.
Ned Deily [Thu, 19 Mar 2015 23:22:14 +0000 (16:22 -0700)]
Issue #23686: Update OS X 10.5 installer build to use OpenSSL 1.0.2a.

9 years agoIssue #23686: Update OS X 10.5 installer build to use OpenSSL 1.0.2a.
Ned Deily [Thu, 19 Mar 2015 23:21:10 +0000 (16:21 -0700)]
Issue #23686: Update OS X 10.5 installer build to use OpenSSL 1.0.2a.

9 years agoMerge
Antoine Pitrou [Thu, 19 Mar 2015 23:10:23 +0000 (00:10 +0100)]
Merge

9 years agoIssue #23708: Fix _Py_read() compilation error on Windows
Victor Stinner [Thu, 19 Mar 2015 22:53:04 +0000 (23:53 +0100)]
Issue #23708: Fix _Py_read() compilation error on Windows

Fix typo: self->fd => fd

9 years agoIssue #23707: On UNIX, os.urandom() now calls the Python signal handler when
Victor Stinner [Thu, 19 Mar 2015 22:36:33 +0000 (23:36 +0100)]
Issue #23707: On UNIX, os.urandom() now calls the Python signal handler when
read() is interrupted by a signal.

dev_urandom_python() now calls _Py_read() helper instead of calling directly
read().

9 years agoIssue #23708: select.devpoll now retries its internal write() when interrupted
Victor Stinner [Thu, 19 Mar 2015 22:33:09 +0000 (23:33 +0100)]
Issue #23708: select.devpoll now retries its internal write() when interrupted
by a signal (EINTR).

Modify devpoll_flush() to use _Py_write() instead of calling directly write().

9 years agoIssue #23632: Memoryviews now allow tuple indexing (including for multi-dimensional...
Antoine Pitrou [Thu, 19 Mar 2015 22:29:36 +0000 (23:29 +0100)]
Issue #23632: Memoryviews now allow tuple indexing (including for multi-dimensional memoryviews).

9 years agoIssue #22181: Fix dev_urandom_noraise(), try calling py_getrandom() before
Victor Stinner [Thu, 19 Mar 2015 22:24:45 +0000 (23:24 +0100)]
Issue #22181: Fix dev_urandom_noraise(), try calling py_getrandom() before
opening /dev/urandom.

9 years agoIssue #23708: Add _Py_read() and _Py_write() functions to factorize code handle
Victor Stinner [Thu, 19 Mar 2015 21:53:20 +0000 (22:53 +0100)]
Issue #23708: Add _Py_read() and _Py_write() functions to factorize code handle
EINTR error and special cases for Windows.

These functions now truncate the length to PY_SSIZE_T_MAX to have a portable
and reliable behaviour. For example, read() result is undefined if counter is
greater than PY_SSIZE_T_MAX on Linux.

9 years agoIssue #22181: The availability of the getrandom() is now checked in configure,
Victor Stinner [Thu, 19 Mar 2015 21:21:49 +0000 (22:21 +0100)]
Issue #22181: The availability of the getrandom() is now checked in configure,
and stored in pyconfig.h as the new HAVE_GETRANDOM_SYSCALL define.

Fix os.urandom() tests using file descriptors if os.urandom() uses getrandom().

9 years agoIssue #23646: If time.sleep() is interrupted by a signal, the sleep is now
Victor Stinner [Thu, 19 Mar 2015 20:54:09 +0000 (21:54 +0100)]
Issue #23646: If time.sleep() is interrupted by a signal, the sleep is now
retried with the recomputed delay, except if the signal handler raises an
exception (PEP 475).

Modify also test_signal to use a monotonic clock instead of the system clock.