]> granicus.if.org Git - python/log
python
9 years agoIssue #24870: Reuse the new _Py_error_handler enum
Victor Stinner [Mon, 21 Sep 2015 22:26:54 +0000 (00:26 +0200)]
Issue #24870: Reuse the new _Py_error_handler enum

Factorize code with the new get_error_handler() function.

Add some empty lines for readability.

9 years agoIssue #24870: Optimize the ASCII decoder for error handlers: surrogateescape,
Victor Stinner [Mon, 21 Sep 2015 21:06:27 +0000 (23:06 +0200)]
Issue #24870: Optimize the ASCII decoder for error handlers: surrogateescape,
ignore and replace. Initial patch written by Naoki Inada.

The decoder is now up to 60 times as fast for these error handlers.

Add also unit tests for the ASCII decoder.

9 years agossue #25207: fix ICC compiler warning in msvcrtmodule.c
Victor Stinner [Mon, 21 Sep 2015 20:40:28 +0000 (22:40 +0200)]
ssue #25207: fix ICC compiler warning in msvcrtmodule.c

9 years agoIssue #25207, #14626: Fix ICC compiler warnings in posixmodule.c
Victor Stinner [Mon, 21 Sep 2015 20:37:15 +0000 (22:37 +0200)]
Issue #25207, #14626: Fix ICC compiler warnings in posixmodule.c

Replace "#if XXX" with #ifdef XXX".

9 years agoMerge 3.5 (Issue #23630, fix test_asyncio)
Victor Stinner [Mon, 21 Sep 2015 20:29:43 +0000 (22:29 +0200)]
Merge 3.5 (Issue #23630, fix test_asyncio)

9 years agoMerge 3.5 (test_asyncio)
Victor Stinner [Mon, 21 Sep 2015 20:20:52 +0000 (22:20 +0200)]
Merge 3.5 (test_asyncio)

9 years agoMerge 3.4 (test_asyncio)
Victor Stinner [Mon, 21 Sep 2015 20:20:36 +0000 (22:20 +0200)]
Merge 3.4 (test_asyncio)

9 years agoIssue #25114: Fix test_asyncio
Victor Stinner [Mon, 21 Sep 2015 20:20:19 +0000 (22:20 +0200)]
Issue #25114: Fix test_asyncio

ssl.SSLContext() does not always disable compression. Fix unit test.

9 years agoIssue #24779: Remove unused rawmode parameter to unicode_decode.
Eric V. Smith [Mon, 21 Sep 2015 17:36:09 +0000 (13:36 -0400)]
Issue #24779: Remove unused rawmode parameter to unicode_decode.

9 years agoMerge 3.5 (asyncio)
Victor Stinner [Mon, 21 Sep 2015 16:41:46 +0000 (18:41 +0200)]
Merge 3.5 (asyncio)

9 years agoMerge 3.4 (asyncio)
Victor Stinner [Mon, 21 Sep 2015 16:41:05 +0000 (18:41 +0200)]
Merge 3.4 (asyncio)

9 years agoIssue #23630, asyncio: host parameter of loop.create_server() can now be a
Victor Stinner [Mon, 21 Sep 2015 16:33:43 +0000 (18:33 +0200)]
Issue #23630, asyncio: host parameter of loop.create_server() can now be a
sequence of strings. Patch written by Yann Sionneau.

9 years agoMerge 3.5 (asyncio doc)
Victor Stinner [Mon, 21 Sep 2015 16:28:04 +0000 (18:28 +0200)]
Merge 3.5 (asyncio doc)

9 years agoIssue #25114: Adjust versionchanged in the doc
Victor Stinner [Mon, 21 Sep 2015 16:27:52 +0000 (18:27 +0200)]
Issue #25114: Adjust versionchanged in the doc

9 years agoMerge 3.5 (asyncio)
Victor Stinner [Mon, 21 Sep 2015 16:08:27 +0000 (18:08 +0200)]
Merge 3.5 (asyncio)

9 years agoMerge 3.4 (asyncio)
Victor Stinner [Mon, 21 Sep 2015 16:08:06 +0000 (18:08 +0200)]
Merge 3.4 (asyncio)

9 years agoIssue #25114, asyncio: add ssl_object extra info to SSL transports
Victor Stinner [Mon, 21 Sep 2015 16:06:17 +0000 (18:06 +0200)]
Issue #25114, asyncio: add ssl_object extra info to SSL transports

This info is required on Python 3.5 and newer to get specific information on
the SSL object, like getting the binary peer certificate (instead of getting
it as text).

9 years agoMerge 3.5 (test_eintr, FreeBSD)
Victor Stinner [Mon, 21 Sep 2015 12:05:18 +0000 (14:05 +0200)]
Merge 3.5 (test_eintr, FreeBSD)

9 years agoIssue #25122: test_eintr: the FreeBSD fix will be released in FreeBSD 10.3
Victor Stinner [Mon, 21 Sep 2015 12:05:02 +0000 (14:05 +0200)]
Issue #25122: test_eintr: the FreeBSD fix will be released in FreeBSD 10.3

9 years agoMerge 3.5 (test_socket, issue #25138)
Victor Stinner [Mon, 21 Sep 2015 07:06:53 +0000 (09:06 +0200)]
Merge 3.5 (test_socket, issue #25138)

9 years agoMerge 3.4 (test_socket, issue #25138)
Victor Stinner [Mon, 21 Sep 2015 07:04:17 +0000 (09:04 +0200)]
Merge 3.4 (test_socket, issue #25138)

9 years agoIssue #25138: test_socket.test_idna() uses support.transient_internet() instead
Victor Stinner [Mon, 21 Sep 2015 07:04:01 +0000 (09:04 +0200)]
Issue #25138: test_socket.test_idna() uses support.transient_internet() instead
of catching socket.EAI_NODATA error which doesn't exist on FreeBSD.

9 years agoMerge with 3.5
Terry Jan Reedy [Mon, 21 Sep 2015 05:44:33 +0000 (01:44 -0400)]
Merge with 3.5

9 years agoMerge with 3.4
Terry Jan Reedy [Mon, 21 Sep 2015 05:44:20 +0000 (01:44 -0400)]
Merge with 3.4

9 years agoIssue #24861: Add docstring to idlelib.__init__ with 'private' warning.
Terry Jan Reedy [Mon, 21 Sep 2015 05:44:06 +0000 (01:44 -0400)]
Issue #24861: Add docstring to idlelib.__init__ with 'private' warning.

9 years agoMove items from NEWS to idlelib/NEWS.txt. Standardize headers spacing: 2 lines
Terry Jan Reedy [Mon, 21 Sep 2015 05:11:26 +0000 (01:11 -0400)]
Move items from NEWS to idlelib/NEWS.txt.  Standardize headers spacing: 2 lines
above "What's New and 0 lines above "Release date".  Remove most old headers
for non-final releases (they currently do not get carried forward.

9 years agoMove items from NEWS to idlelib/NEWS.txt. Standardize headers spacing: 2 lines
Terry Jan Reedy [Mon, 21 Sep 2015 05:10:21 +0000 (01:10 -0400)]
Move items from NEWS to idlelib/NEWS.txt.  Standardize headers spacing: 2 lines
above "What's New and 0 lines above "Release date".  Remove most old headers
for non-final releases (they currently do not get carried forward.

9 years agoMove items from NEWS to idlelib/NEWS.txt. Standardize headers spacing: 2 lines
Terry Jan Reedy [Mon, 21 Sep 2015 05:07:59 +0000 (01:07 -0400)]
Move items from NEWS to idlelib/NEWS.txt.  Standardize headers spacing: 2 lines
above "What's New and 0 lines above "Release date".  Remove most old headers
for non-final releases (they currently do not get carried forward.

9 years agoIssue #23484: Document differences between synchronization primitives of
Berker Peksag [Mon, 21 Sep 2015 03:52:11 +0000 (06:52 +0300)]
Issue #23484: Document differences between synchronization primitives of
threading and multiprocessing modules.

In multiprocessing, the name of the first parameter of the acquire methods is
"block", but "blocking" in threading.

This commit also improves documentation of Lock and RLock.

Patch by Davin Potts.

9 years agoIssue #23484: Document differences between synchronization primitives of
Berker Peksag [Mon, 21 Sep 2015 03:51:45 +0000 (06:51 +0300)]
Issue #23484: Document differences between synchronization primitives of
threading and multiprocessing modules.

In multiprocessing, the name of the first parameter of the acquire methods is
"block", but "blocking" in threading.

This commit also improves documentation of Lock and RLock.

Patch by Davin Potts.

9 years agoIssue #23484: Document differences between synchronization primitives of
Berker Peksag [Mon, 21 Sep 2015 03:50:55 +0000 (06:50 +0300)]
Issue #23484: Document differences between synchronization primitives of
threading and multiprocessing modules.

In multiprocessing, the name of the first parameter of the acquire methods is
"block", but "blocking" in threading.

This commit also improves documentation of Lock and RLock.

Patch by Davin Potts.

9 years agoAdd NEWS items for Idle to 3.6.0a1 section.
Terry Jan Reedy [Mon, 21 Sep 2015 03:32:08 +0000 (23:32 -0400)]
Add NEWS items for Idle to 3.6.0a1 section.

9 years agoMerge with 3.5
Terry Jan Reedy [Mon, 21 Sep 2015 03:24:01 +0000 (23:24 -0400)]
Merge with 3.5

9 years agoAdd NEWS items for Idle.
Terry Jan Reedy [Mon, 21 Sep 2015 03:23:44 +0000 (23:23 -0400)]
Add NEWS items for Idle.

9 years agoAdd NEWS items for Idle.
Terry Jan Reedy [Mon, 21 Sep 2015 03:21:22 +0000 (23:21 -0400)]
Add NEWS items for Idle.

9 years agoIssue #25169: os.getppid() is available on Windows since Python 3.2.
Berker Peksag [Mon, 21 Sep 2015 03:13:36 +0000 (06:13 +0300)]
Issue #25169: os.getppid() is available on Windows since Python 3.2.

Patch by Bar Harel.

9 years agoIssue #25169: os.getppid() is available on Windows since Python 3.2.
Berker Peksag [Mon, 21 Sep 2015 03:13:14 +0000 (06:13 +0300)]
Issue #25169: os.getppid() is available on Windows since Python 3.2.

Patch by Bar Harel.

9 years agoIssue #25169: os.getppid() is available on Windows since Python 3.2.
Berker Peksag [Mon, 21 Sep 2015 03:12:50 +0000 (06:12 +0300)]
Issue #25169: os.getppid() is available on Windows since Python 3.2.

Patch by Bar Harel.

9 years agoMerge with 3.5
Terry Jan Reedy [Mon, 21 Sep 2015 03:05:52 +0000 (23:05 -0400)]
Merge with 3.5

9 years agoMerge with 3.4
Terry Jan Reedy [Mon, 21 Sep 2015 03:05:41 +0000 (23:05 -0400)]
Merge with 3.4

9 years agoIssue #16893: finish deprecation.
Terry Jan Reedy [Mon, 21 Sep 2015 03:05:25 +0000 (23:05 -0400)]
Issue #16893: finish deprecation.

9 years agoMerge with 3.5
Terry Jan Reedy [Mon, 21 Sep 2015 02:56:03 +0000 (22:56 -0400)]
Merge with 3.5

9 years agoMerge with 3.4
Terry Jan Reedy [Mon, 21 Sep 2015 02:55:51 +0000 (22:55 -0400)]
Merge with 3.4

9 years agoIssue #25199: Idle: add synchronization comments for future maintainers.
Terry Jan Reedy [Mon, 21 Sep 2015 02:55:39 +0000 (22:55 -0400)]
Issue #25199: Idle: add synchronization comments for future maintainers.

9 years agoMerge with 3.5
Terry Jan Reedy [Mon, 21 Sep 2015 00:03:37 +0000 (20:03 -0400)]
Merge with 3.5

9 years agoMerge with 3.4
Terry Jan Reedy [Mon, 21 Sep 2015 00:03:22 +0000 (20:03 -0400)]
Merge with 3.4

9 years agoIssue #16893: whitespace in idle.html.
Terry Jan Reedy [Mon, 21 Sep 2015 00:03:01 +0000 (20:03 -0400)]
Issue #16893: whitespace in idle.html.

9 years agoMerge with 3.5
Terry Jan Reedy [Sun, 20 Sep 2015 23:57:58 +0000 (19:57 -0400)]
Merge with 3.5

9 years agoMerge with 3.4
Terry Jan Reedy [Sun, 20 Sep 2015 23:57:37 +0000 (19:57 -0400)]
Merge with 3.4

9 years agoIssue #16893: Replace help.txt with idle.html for Idle doc display.
Terry Jan Reedy [Sun, 20 Sep 2015 23:57:13 +0000 (19:57 -0400)]
Issue #16893: Replace help.txt with idle.html for Idle doc display.
The new idlelib/idle.html is copied from Doc/build/html/idle.html.
It looks better than help.txt and will better document Idle as released.
The tkinter html viewer that works for this file was written by Rose Roseman.
The new code is in idlelib/help.py, a new file for help menu classes.
The now unused EditorWindow.HelpDialog class and helt.txt file are deprecated.

9 years agoIssue 25180: Fix Tools/parser/unparse.py for f-strings. Patch by Martin Panter.
Eric V. Smith [Sun, 20 Sep 2015 19:09:15 +0000 (15:09 -0400)]
Issue 25180: Fix Tools/parser/unparse.py for f-strings. Patch by Martin Panter.

9 years agomerge 3.5 (#25145)
Benjamin Peterson [Sun, 20 Sep 2015 18:18:58 +0000 (23:18 +0500)]
merge 3.5 (#25145)

9 years agomerge 3.4 (#25145)
Benjamin Peterson [Sun, 20 Sep 2015 18:18:51 +0000 (23:18 +0500)]
merge 3.4 (#25145)

9 years agoremove reference to PyGoogle (#25145)
Benjamin Peterson [Sun, 20 Sep 2015 18:17:41 +0000 (23:17 +0500)]
remove reference to PyGoogle (#25145)

Patch by Bar Harel.

9 years agouse a more modern UA (#25145)
Benjamin Peterson [Sun, 20 Sep 2015 18:16:45 +0000 (23:16 +0500)]
use a more modern UA (#25145)

9 years agoMerge with 3.5
Terry Jan Reedy [Sun, 20 Sep 2015 06:34:51 +0000 (02:34 -0400)]
Merge with 3.5

9 years agoMerge with 3.4
Terry Jan Reedy [Sun, 20 Sep 2015 06:34:20 +0000 (02:34 -0400)]
Merge with 3.4

9 years agoIssue #24199: Add stacklevel to deprecation warning call.
Terry Jan Reedy [Sun, 20 Sep 2015 06:34:03 +0000 (02:34 -0400)]
Issue #24199: Add stacklevel to deprecation warning call.

9 years agoIssue #25176: Merge cgi.parse_qsl link from 3.5
Martin Panter [Sun, 20 Sep 2015 01:11:50 +0000 (01:11 +0000)]
Issue #25176: Merge cgi.parse_qsl link from 3.5

9 years agoIssue #25176: Merge cgi.parse_qsl link from 3.4 into 3.5
Martin Panter [Sun, 20 Sep 2015 01:07:41 +0000 (01:07 +0000)]
Issue #25176: Merge cgi.parse_qsl link from 3.4 into 3.5

9 years agoIssue #25176: Correct link for cgi.parse_qsl; patch from Ville Skyttä
Martin Panter [Sun, 20 Sep 2015 00:28:50 +0000 (00:28 +0000)]
Issue #25176: Correct link for cgi.parse_qsl; patch from Ville Skyttä

9 years agoTemporary hack for issue #25180: exclude test_fstring.py from the unparse round-tripp...
Eric V. Smith [Sat, 19 Sep 2015 19:49:57 +0000 (15:49 -0400)]
Temporary hack for issue #25180: exclude test_fstring.py from the unparse round-tripping, while I figure out how to properly fix it.

9 years agoIssue #24965: Implement PEP 498 "Literal String Interpolation". Documentation is...
Eric V. Smith [Sat, 19 Sep 2015 18:51:32 +0000 (14:51 -0400)]
Issue #24965: Implement PEP 498 "Literal String Interpolation". Documentation is still needed, I'll open an issue for that.

9 years agoAdd a fast path (no iterator creation) for a common case for repeating deques of...
Raymond Hettinger [Sat, 19 Sep 2015 16:05:42 +0000 (09:05 -0700)]
Add a fast path (no iterator creation) for a common case for repeating deques of size 1

9 years agoMerge 3.5
Victor Stinner [Sat, 19 Sep 2015 11:39:16 +0000 (13:39 +0200)]
Merge 3.5

9 years agoIssue #24999: In longobject.c, use two shifts instead of ">> 2*PyLong_SHIFT" to
Victor Stinner [Sat, 19 Sep 2015 11:39:03 +0000 (13:39 +0200)]
Issue #24999: In longobject.c, use two shifts instead of ">> 2*PyLong_SHIFT" to
avoid undefined behaviour when LONG_MAX type is smaller than 60 bits.

This change should fix a warning with the ICC compiler.

9 years agoIssue #25101: Try to create a file to test write access in test_zipfile.
Serhiy Storchaka [Sat, 19 Sep 2015 08:00:11 +0000 (11:00 +0300)]
Issue #25101: Try to create a file to test write access in test_zipfile.

9 years agoIssue #25101: Try to create a file to test write access in test_zipfile.
Serhiy Storchaka [Sat, 19 Sep 2015 07:59:48 +0000 (10:59 +0300)]
Issue #25101: Try to create a file to test write access in test_zipfile.

9 years agoIssue #25101: Try to create a file to test write access in test_zipfile.
Serhiy Storchaka [Sat, 19 Sep 2015 07:55:20 +0000 (10:55 +0300)]
Issue #25101: Try to create a file to test write access in test_zipfile.

9 years agoHoist constant expression out of an inner loop
Raymond Hettinger [Sat, 19 Sep 2015 06:21:33 +0000 (00:21 -0600)]
Hoist constant expression out of an inner loop

9 years agoMerge for issue #25133
Brett Cannon [Fri, 18 Sep 2015 22:21:22 +0000 (15:21 -0700)]
Merge for issue #25133

9 years agoMake it clearer that the constants in the selectors docs are module-level
Brett Cannon [Fri, 18 Sep 2015 22:21:02 +0000 (15:21 -0700)]
Make it clearer that the constants in the selectors docs are module-level

9 years agoMerge for issue #24915
Brett Cannon [Fri, 18 Sep 2015 22:17:37 +0000 (15:17 -0700)]
Merge for issue #24915

9 years agoIssue #24915: Add Clang support to PGO builds and use the test suite
Brett Cannon [Fri, 18 Sep 2015 22:13:44 +0000 (15:13 -0700)]
Issue #24915: Add Clang support to PGO builds and use the test suite
for profile data.

Thanks to Alecsandru Patrascu of Intel for the initial patch.

9 years agoMerge 3.5 (test_email)
Victor Stinner [Fri, 18 Sep 2015 14:33:04 +0000 (16:33 +0200)]
Merge 3.5 (test_email)

9 years agoMerge 3.4 (test_email)
Victor Stinner [Fri, 18 Sep 2015 14:32:51 +0000 (16:32 +0200)]
Merge 3.4 (test_email)

9 years agoIssue #24836: Skip FormatDateTests of test_email.test_utils on Mac OS X Snow
Victor Stinner [Fri, 18 Sep 2015 14:32:23 +0000 (16:32 +0200)]
Issue #24836: Skip FormatDateTests of test_email.test_utils on Mac OS X Snow
Leopard because this OS uses out of date (pre 2011k) timezone files.

9 years agoIssue #25003: Skip test_os.URandomFDTests on Solaris 11.3 and newer
Victor Stinner [Fri, 18 Sep 2015 14:24:31 +0000 (16:24 +0200)]
Issue #25003: Skip test_os.URandomFDTests on Solaris 11.3 and newer

When os.urandom() is implemented with the getrandom() function, it doesn't use
a file descriptor.

9 years agoIssue #25003: On Solaris 11.3 or newer, os.urandom() now uses the getrandom()
Victor Stinner [Fri, 18 Sep 2015 13:38:37 +0000 (15:38 +0200)]
Issue #25003: On Solaris 11.3 or newer, os.urandom() now uses the getrandom()
function instead of the getentropy() function. The getentropy() function is
blocking to generate very good quality entropy, os.urandom() doesn't need such
high-quality entropy.

9 years agoMerge 3.5
Victor Stinner [Fri, 18 Sep 2015 13:08:14 +0000 (15:08 +0200)]
Merge 3.5

9 years agoIssue #25150: Hide the private _Py_atomic_xxx symbols from the public
Victor Stinner [Fri, 18 Sep 2015 13:06:34 +0000 (15:06 +0200)]
Issue #25150: Hide the private _Py_atomic_xxx symbols from the public
Python.h header to fix a compilation error with OpenMP. PyThreadState_GET()
becomes an alias to PyThreadState_Get() to avoid ABI incompatibilies.

It is important that the _PyThreadState_Current variable is always accessed
with the same implementation of pyatomic.h. Use the PyThreadState_Get()
function so extension modules will all reuse the same implementation.

9 years agoNull merge 3.5: datetime was already fixed, but with a very different implementation
Victor Stinner [Fri, 18 Sep 2015 12:58:09 +0000 (14:58 +0200)]
Null merge 3.5: datetime was already fixed, but with a very different implementation

9 years agoOops, fix test_microsecond_rounding()
Victor Stinner [Fri, 18 Sep 2015 12:52:15 +0000 (14:52 +0200)]
Oops, fix test_microsecond_rounding()

Test self.theclass, not datetime. Regression introduced by manual tests.

9 years agoMerge 3.4 (datetime rounding)
Victor Stinner [Fri, 18 Sep 2015 12:50:18 +0000 (14:50 +0200)]
Merge 3.4 (datetime rounding)

9 years agoIssue #23517: Fix rounding in fromtimestamp() and utcfromtimestamp() methods
Victor Stinner [Fri, 18 Sep 2015 12:42:05 +0000 (14:42 +0200)]
Issue #23517: Fix rounding in fromtimestamp() and utcfromtimestamp() methods
of datetime.datetime: microseconds are now rounded to nearest with ties going
to nearest even integer (ROUND_HALF_EVEN), instead of being rounding towards
zero (ROUND_DOWN). It's important that these methods use the same rounding
mode than datetime.timedelta to keep the property:

   (datetime(1970,1,1) + timedelta(seconds=t)) == datetime.utcfromtimestamp(t)

It also the rounding mode used by round(float) for example.

Add more unit tests on the rounding mode in test_datetime.

9 years agoMerge 3.5 (pytime)
Victor Stinner [Fri, 18 Sep 2015 12:21:55 +0000 (14:21 +0200)]
Merge 3.5 (pytime)

9 years agoIssue #25155: Fix _PyTime_Divide() rounding
Victor Stinner [Fri, 18 Sep 2015 12:21:14 +0000 (14:21 +0200)]
Issue #25155: Fix _PyTime_Divide() rounding

_PyTime_Divide() rounding was wrong: copy code from Python default which has
now much better unit tests.

9 years agoMerge 3.5 (NEWS)
Victor Stinner [Fri, 18 Sep 2015 11:59:30 +0000 (13:59 +0200)]
Merge 3.5 (NEWS)

9 years agoIssue #25155: document the bugfix in Misc/NEWS
Victor Stinner [Fri, 18 Sep 2015 11:59:09 +0000 (13:59 +0200)]
Issue #25155: document the bugfix in Misc/NEWS

Oops, I forgot to document my change.

9 years agoMerge 3.5 (pytime, odict)
Victor Stinner [Fri, 18 Sep 2015 11:55:15 +0000 (13:55 +0200)]
Merge 3.5 (pytime, odict)

9 years agoodictobject.c: fix compiler warning
Victor Stinner [Fri, 18 Sep 2015 11:44:11 +0000 (13:44 +0200)]
odictobject.c: fix compiler warning

PyObject_Length() returns a P_ssize_t, not an int. Use a Py_ssize_t to avoid
overflow.

9 years agoIssue #25155: Add _PyTime_AsTimevalTime_t() function
Victor Stinner [Fri, 18 Sep 2015 11:36:17 +0000 (13:36 +0200)]
Issue #25155: Add _PyTime_AsTimevalTime_t() function

On Windows, the tv_sec field of the timeval structure has the type C long,
whereas it has the type C time_t on all other platforms. A C long has a size of
32 bits (signed inter, 1 bit for the sign, 31 bits for the value) which is not
enough to store an Epoch timestamp after the year 2038.

Add the _PyTime_AsTimevalTime_t() function written for datetime.datetime.now():
convert a _PyTime_t timestamp to a (secs, us) tuple where secs type is time_t.
It allows to support dates after the year 2038 on Windows.

Enhance also _PyTime_AsTimeval_impl() to detect overflow on the number of
seconds when rounding the number of microseconds.

9 years agoIssue #25155: Add _PyTime_AsTimevalTime_t() function
Victor Stinner [Fri, 18 Sep 2015 11:23:02 +0000 (13:23 +0200)]
Issue #25155: Add _PyTime_AsTimevalTime_t() function

On Windows, the tv_sec field of the timeval structure has the type C long,
whereas it has the type C time_t on all other platforms. A C long has a size of
32 bits (signed inter, 1 bit for the sign, 31 bits for the value) which is not
enough to store an Epoch timestamp after the year 2038.

Add the _PyTime_AsTimevalTime_t() function written for datetime.datetime.now():
convert a _PyTime_t timestamp to a (secs, us) tuple where secs type is time_t.
It allows to support dates after the year 2038 on Windows.

Enhance also _PyTime_AsTimeval_impl() to detect overflow on the number of
seconds when rounding the number of microseconds.

9 years agoNull merge 3.5
Victor Stinner [Fri, 18 Sep 2015 09:30:42 +0000 (11:30 +0200)]
Null merge 3.5

9 years agoIssue #25122: sync test_eintr with Python 3.6
Victor Stinner [Fri, 18 Sep 2015 09:29:16 +0000 (11:29 +0200)]
Issue #25122: sync test_eintr with Python 3.6

* test_eintr: support verbose mode, don't redirect eintr_tester output into
  a pipe
* eintr_tester: replace os.fork() with subprocess to have a cleaner child
  process (ex: don't inherit setitimer())
* eintr_tester: kill the process if the unit test fails
* test_open/test_os_open(): write support.PIPE_MAX_SIZE bytes instead of
  support.PIPE_MAX_SIZE*3 bytes

9 years agoIssue #25122: Fix test_eintr.test_open() on FreeBSD
Victor Stinner [Fri, 18 Sep 2015 09:23:42 +0000 (11:23 +0200)]
Issue #25122: Fix test_eintr.test_open() on FreeBSD

Skip test_open() and test_os_open(): both tests uses a FIFO and signals, but
there is a bug in the FreeBSD kernel which blocks the test. Skip the tests
until the bug is fixed in FreeBSD kernel.

Remove also debug traces from test_eintr:

* stop using faulthandler to have a timeout
* remove print()

Write also open and close on two lines in test_open() and test_os_open()
tests. If these tests block again, we can know if the test is stuck at open or
close.

test_eintr: don't always run the test in debug mode.

9 years agoMerge 3.5 (imp/_imp)
Victor Stinner [Fri, 18 Sep 2015 07:12:08 +0000 (09:12 +0200)]
Merge 3.5 (imp/_imp)

9 years agoIssue #25160: Fix import_init() comments and messages
Victor Stinner [Fri, 18 Sep 2015 07:11:57 +0000 (09:11 +0200)]
Issue #25160: Fix import_init() comments and messages

import_init() imports the "_imp" module, not the "imp" module.

9 years agoNull merge
Serhiy Storchaka [Fri, 18 Sep 2015 07:09:18 +0000 (10:09 +0300)]
Null merge

9 years agoNull merge
Serhiy Storchaka [Fri, 18 Sep 2015 07:09:06 +0000 (10:09 +0300)]
Null merge