Commit graph

93427 commits

Author SHA1 Message Date
Victor Stinner
0069aef51a Fix test_spwd on OpenIndiana
Issue #18787: restore "bin" name in test_spwd but catch KeyError.
2016-03-23 21:15:55 +01:00
Victor Stinner
c53195bbf0 Try to fix test_gdb on s390x SLES 3.x
Ignore empty lines in stderr.
2016-03-23 21:08:25 +01:00
Stefan Krah
63fd8b0c92 Null merge. 2016-03-23 20:53:47 +01:00
Stefan Krah
1129084ebd Issue #26621: Remove unnecessary test. 2016-03-23 20:53:22 +01:00
Stefan Krah
66e9d03bf4 Issue #26621: Update libmpdec version and remove unnecessary test case. 2016-03-23 20:50:10 +01:00
Victor Stinner
4a1c7d2c36 Try to fix test_spwd on OpenIndiana
Issue #18787: try to get the "root" entry which should exist on all UNIX
instead of "bin" which doesn't exist on OpenIndiana.
2016-03-23 18:45:55 +01:00
Terry Jan Reedy
d0217ab660 Merge heads 2016-03-23 13:40:14 -04:00
Terry Jan Reedy
9d9fc4101e Merge heads 2016-03-23 13:39:18 -04:00
Victor Stinner
82d44f0598 Issue #23848: Fix usage of _Py_DumpDecimal() 2016-03-23 18:37:54 +01:00
Terry Jan Reedy
4c181cf448 Merge with 3.5 2016-03-23 13:37:15 -04:00
Victor Stinner
f963c13597 longobject.c: fix compilation warning on Windows 64-bit
We know that Py_SIZE(b) is -1 or 1 an so fits into the sdigit type.
2016-03-23 18:36:54 +01:00
Terry Jan Reedy
01a9a958b6 Issue #26525: Change chr example to match change in ord example. 2016-03-23 13:36:52 -04:00
Victor Stinner
904f5def5c Try to fix test_gdb on s390x buildbots 2016-03-23 18:32:54 +01:00
Victor Stinner
023654fa68 get_warnings_attr(): Fix coverity warning
Don't check if the dict key exists before getting the key. Instead get the key
and handle error.
2016-03-23 17:48:22 +01:00
Victor Stinner
d1700a9360 Fix typo in doc: avoid the french "& cie" :-) 2016-03-23 16:57:51 +01:00
Victor Stinner
1c3069aed6 Rework _Py_DumpASCII() to make Coverity happy 2016-03-23 16:10:07 +01:00
Victor Stinner
928ad285b5 Issue #23848: Try to fix test_faulthandler on ARM
Restore the previous code for stack_overflow().
2016-03-23 15:19:12 +01:00
Victor Stinner
412a5e7e23 faulthandler: only log fatal exceptions
Issue #23848, #26622:

* faulthandler now only logs fatal Windows exceptions.
* write error code as decimal, not as hexadecimal
* replace "Windows exception" with "Windows fatal exception"
2016-03-23 14:44:14 +01:00
doko@ubuntu.com
b9e0834f46 Merge 3.5 2016-03-23 12:58:00 +01:00
doko@ubuntu.com
3a56b775da Makefile.pre.in (profile-opt): Fix bashism. 2016-03-23 12:57:29 +01:00
Victor Stinner
96f6e7a1ed Buildbots: change also Windows timeout from 1 hour to 15 min 2016-03-23 12:38:01 +01:00
Victor Stinner
69649f21f0 regrtest: display test duration in sequential mode
Only display duration if a test takes more than 30 seconds.
2016-03-23 12:14:10 +01:00
Victor Stinner
e985726553 _msi.c: try to fix compiler warnings 2016-03-23 11:37:41 +01:00
Victor Stinner
976bb4099c compiler.c: fix compiler warnings on Windows 2016-03-23 11:36:19 +01:00
Victor Stinner
ccb1f8cb1a getpathp.c: fix compiler warning
wcsnlen_s() result type is size_t.
2016-03-23 11:31:58 +01:00
Victor Stinner
0aed3a4ebc _PyMem_DebugFree(): fix compiler warning on Windows
Don't return a void value.
2016-03-23 11:30:43 +01:00
Victor Stinner
404cdc5a92 faulthandler: add Windows exception handler
Issue #23848: On Windows, faulthandler.enable() now also installs an exception
handler to dump the traceback of all Python threads on any Windows exception,
not only on UNIX signals (SIGSEGV, SIGFPE, SIGABRT).
2016-03-23 10:39:17 +01:00
Victor Stinner
bd31b7c483 Issue #23848: Expose _Py_DumpHexadecimal()
This function will be reused by faulthandler.
2016-03-23 10:32:26 +01:00
Victor Stinner
5dacbd4c42 Cleanup hashtable.h
Issue #26588:

* Pass the hash table rather than the key size to hash and compare functions
* _Py_HASHTABLE_READ_KEY() and _Py_HASHTABLE_ENTRY_READ_KEY() macros now expect
  the hash table as the first parameter, rather than the key size
* tracemalloc_get_traces_fill(): use _Py_HASHTABLE_ENTRY_READ_DATA() rather
  than pointer dereference
* Remove the _Py_HASHTABLE_ENTRY_WRITE_PKEY() macro
* Move "PKEY" and "PDATA" macros inside hashtable.c
2016-03-23 09:52:13 +01:00
Victor Stinner
ca79ccd9e6 Issue #26588:
* Optimize tracemalloc_add_trace(): modify hashtable entry data (trace) if the
  memory block is already tracked, rather than trying to remove the old trace
  and then add a new trace.
* Add _Py_HASHTABLE_ENTRY_WRITE_DATA() macro
2016-03-23 09:38:54 +01:00
Victor Stinner
e8c6b2fd1b Issue #26588:
* _Py_HASHTABLE_ENTRY_DATA: change type from "char *" to "const void *"
* Add _Py_HASHTABLE_ENTRY_WRITE_PKEY() macro
* Rename _Py_HASHTABLE_ENTRY_WRITE_DATA() macro to
  _Py_HASHTABLE_ENTRY_WRITE_PDATA()
* Add _Py_HASHTABLE_ENTRY_WRITE_DATA() macro
2016-03-23 09:25:01 +01:00
Victor Stinner
42bcf37fcf Issue #26588: Optimize tracemalloc_realloc()
No need to remove the old trace if the memory block didn't move.
2016-03-23 09:08:08 +01:00
Victor Stinner
d65e0c7560 Makefile: change default value of TESTTIMEOUT from 1 hour to 15 min
The whole test suite takes 6 minutes on my laptop. It takes less than 30
minutes on most buildbots. The TESTTIMEOUT is the timeout for a single test
file.
2016-03-23 02:05:39 +01:00
Victor Stinner
6d7f4f6675 regrtest: add timeout to main process when using -jN
libregrtest: add a watchdog to run_tests_multiprocess() using
faulthandler.dump_traceback_later().
2016-03-23 02:04:32 +01:00
Victor Stinner
e98445a4de _warnings.warn_explicit(): try to import warnings
Issue #26592: _warnings.warn_explicit() now tries to import the warnings module
(Python implementation) if the source parameter is set to be able to log the
traceback where the source was allocated.
2016-03-23 00:54:48 +01:00
Victor Stinner
7bfa409ff8 Implement finalizer for os.scandir() iterator
Issue #26603:

* Implement finalizer for os.scandir() iterator
* Set the source parameter when emitting the ResourceWarning warning
* Close the iterator before emitting the warning
2016-03-23 00:43:54 +01:00
Victor Stinner
e19558af1b Add a source parameter to warnings.warn()
Issue #26604:

* Add a new optional source parameter to _warnings.warn() and warnings.warn()
* Modify asyncore, asyncio and _pyio modules to set the source parameter when
  logging a ResourceWarning warning
2016-03-23 00:28:08 +01:00
Victor Stinner
060f9bb602 Fix macros in hashtable.h
Add parenthesis.
2016-03-23 00:18:36 +01:00
Victor Stinner
35b0fd74dd Merge 3.5 2016-03-23 00:17:54 +01:00
Victor Stinner
d5871e62dd Enhance _tracemalloc debug mode
Issue #26588: Enhance assertion in set_reentrant()
2016-03-23 00:17:04 +01:00
Victor Stinner
2f49e09110 Fix _tracemalloc start/stop
Issue #26588: Fix _tracemalloc start/stop: don't play with the reentrant flag.

set_reentrant(1) fails with an assertion error if tracemalloc_init() is called
first in a thread A and tracemalloc_start() is called second in a thread B. The
tracemalloc is imported in a thread A. Importing the module calls
tracemalloc_init(). tracemalloc.start() is called in a thread B.
2016-03-23 00:10:24 +01:00
Victor Stinner
f9a71153e9 Issue #26588: remove debug traces from _tracemalloc. 2016-03-22 23:54:42 +01:00
Victor Stinner
92c21d7a7c Issue #26588: skip test_warnings.test_tracemalloc() 2016-03-22 21:26:31 +01:00
Victor Stinner
eddb074c53 Issue #26588: more debug traces 2016-03-22 21:06:07 +01:00
Victor Stinner
b8d927266d Issue #26588: Don't call tracemalloc_init() at module initilization
So it's possible to get debug messages in test_tracemalloc.
2016-03-22 20:56:49 +01:00
Victor Stinner
e31e35d34e Issue #26588: one more assertion 2016-03-22 18:48:50 +01:00
Victor Stinner
4a06647534 Add assertions on tracemalloc_reentrant_key
Issue #26588.
2016-03-22 17:45:09 +01:00
Victor Stinner
0cfc058d61 Issue #26588: more assertions 2016-03-22 17:40:07 +01:00
Victor Stinner
ff9c5346ea Issue #26588: fix compilation on Windows 2016-03-22 16:29:02 +01:00
Victor Stinner
84aab09421 Issue #26588: add debug traces
Try to debug random failure on buildbots.
2016-03-22 16:13:31 +01:00