summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* Issue #26492: Exhausted iterator of array.array now conforms with the behaviorSerhiy Storchaka2016-03-301-4/+18
| | | | | of iterators of other mutable sequences: it lefts exhausted even if iterated array is extended.
* Issue #26494: Fixed crash on iterating exhausting iterators.Serhiy Storchaka2016-03-301-6/+10
|\ | | | | | | | | | | Affected classes are generic sequence iterators, iterators of str, bytes, bytearray, list, tuple, set, frozenset, dict, OrderedDict, corresponding views and os.scandir() iterator.
| * Issue #26494: Fixed crash on iterating exhausting iterators.Serhiy Storchaka2016-03-301-6/+10
| | | | | | | | | | | | Affected classes are generic sequence iterators, iterators of str, bytes, bytearray, list, tuple, set, frozenset, dict, OrderedDict, corresponding views and os.scandir() iterator.
* | Issue #26644: Merge SSL negative read fix from 3.5Martin Panter2016-03-271-0/+5
|\ \ | |/
| * Issue #26644: Raise ValueError for negative SSLSocket.recv() and read()Martin Panter2016-03-271-0/+5
| |
| * _pickle: Fix load_counted_tuple(), use Py_ssize_t for sizeVictor Stinner2016-03-141-1/+1
| | | | | | | | Fix a warning on Windows 64-bit.
* | mergeAlexander Belopolsky2016-03-251-1/+6
|\ \ | |/
| * Issue#26616:Fixed a bug in datetime.astimezone() method.Alexander Belopolsky2016-03-251-1/+6
| |
* | _tracemalloc: use compact key for tracesVictor Stinner2016-03-231-1/+61
| | | | | | | | | | | | Issue #26588: Optimize memory footprint of _tracemalloc before non-zero domain is used. Start with compact key (Py_uintptr_t) and also switch to pointer_t key when the first memory block with a non-zero domain is tracked.
* | socketmodule.c: error if option larger than INT_MAXVictor Stinner2016-03-231-3/+16
| | | | | | | | | | On Windows, socket.setsockopt() raises an OverflowError if the socket option is larger than INT_MAX bytes.
* | Issue #26621: Update libmpdec version and remove unnecessary test case.Stefan Krah2016-03-231-2/+2
| |
* | Issue #23848: Fix usage of _Py_DumpDecimal()Victor Stinner2016-03-231-1/+1
| |
* | Issue #23848: Try to fix test_faulthandler on ARMVictor Stinner2016-03-231-32/+16
| | | | | | | | Restore the previous code for stack_overflow().
* | faulthandler: only log fatal exceptionsVictor Stinner2016-03-231-3/+10
| | | | | | | | | | | | | | | | 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"
* | faulthandler: add Windows exception handlerVictor Stinner2016-03-231-64/+189
| | | | | | | | | | | | 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).
* | Cleanup hashtable.hVictor Stinner2016-03-233-80/+81
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Issue #26588:Victor Stinner2016-03-232-11/+30
| | | | | | | | | | | | | | * 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
* | Issue #26588:Victor Stinner2016-03-233-11/+28
| | | | | | | | | | | | | | | | * _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
* | Issue #26588: Optimize tracemalloc_realloc()Victor Stinner2016-03-231-1/+6
| | | | | | | | No need to remove the old trace if the memory block didn't move.
* | Implement finalizer for os.scandir() iteratorVictor Stinner2016-03-221-17/+47
| | | | | | | | | | | | | | | | Issue #26603: * Implement finalizer for os.scandir() iterator * Set the source parameter when emitting the ResourceWarning warning * Close the iterator before emitting the warning
* | Fix macros in hashtable.hVictor Stinner2016-03-221-2/+2
| | | | | | | | Add parenthesis.
* | Merge 3.5Victor Stinner2016-03-221-15/+1
|\ \ | |/
| * Enhance _tracemalloc debug modeVictor Stinner2016-03-221-1/+1
| | | | | | | | Issue #26588: Enhance assertion in set_reentrant()
| * Fix _tracemalloc start/stopVictor Stinner2016-03-221-14/+0
| | | | | | | | | | | | | | | | | | 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.
* | Issue #26588: remove debug traces from _tracemalloc.Victor Stinner2016-03-222-78/+5
| |
* | Issue #26588: more debug tracesVictor Stinner2016-03-221-1/+6
| |
* | Issue #26588: Don't call tracemalloc_init() at module initilizationVictor Stinner2016-03-221-0/+2
| | | | | | | | So it's possible to get debug messages in test_tracemalloc.
* | Issue #26588: one more assertionVictor Stinner2016-03-221-0/+1
| |
* | Add assertions on tracemalloc_reentrant_keyVictor Stinner2016-03-221-2/+8
| | | | | | | | Issue #26588.
* | Issue #26588: more assertionsVictor Stinner2016-03-221-2/+23
| |
* | Issue #26588: add debug tracesVictor Stinner2016-03-222-5/+49
| | | | | | | | Try to debug random failure on buildbots.
* | Add C functions _PyTraceMalloc_Track()Victor Stinner2016-03-222-11/+146
| | | | | | | | | | | | | | | | Issue #26530: * Add C functions _PyTraceMalloc_Track() and _PyTraceMalloc_Untrack() to track memory blocks using the tracemalloc module. * Add _PyTraceMalloc_GetTraceback() to get the traceback of an object.
* | tracemalloc now supports domainsVictor Stinner2016-03-221-53/+214
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue #26588: * The _tracemalloc now supports tracing memory allocations of multiple address spaces (domains). * Add domain parameter to tracemalloc_add_trace() and tracemalloc_remove_trace(). * tracemalloc_add_trace() now starts by removing the previous trace, if any. * _tracemalloc._get_traces() now returns a list of (domain, size, traceback_frames): the domain is new. * Add tracemalloc.DomainFilter * tracemalloc.Filter: add an optional domain parameter to the constructor and a domain attribute * Sublte change: use Py_uintptr_t rather than void* in the traces key. * Add tracemalloc_config.use_domain, currently hardcoded to 1
* | Remove _Py_hashtable_delete()Victor Stinner2016-03-222-8/+3
| | | | | | | | | | | | Issue #26588: Remove _Py_hashtable_delete() from hashtable.h since the function is not used. Keep the C code in hashtable.c as commented code if someone needs it later.
* | Simplify implementation of hashtable.cVictor Stinner2016-03-223-66/+17
| | | | | | | | | | | | | | | | | | | | | | Issue #26588: Remove copy_data, free_data and get_data_size callbacks from hashtable.h. These callbacks are not used in Python and makes the code more complex. Remove also the _Py_HASHTABLE_ENTRY_DATA_AS_VOID_P() macro which uses an unsafe pointer dereference (can cause memory alignment issue). Replace the macro usage with _Py_HASHTABLE_ENTRY_READ_DATA() which is implemented with the safe memcpy() function.
* | Issue #24266: Merge readline Ctrl+C handling from 3.5Martin Panter2016-03-221-0/+3
|\ \ | |/
| * Issue #24266: Cancel history search mode with Ctrl+C in Readline 7Martin Panter2016-03-221-0/+3
| |
* | Issue #15699: Merge readline fixup from 3.5Martin Panter2016-03-221-16/+3
|\ \ | |/
| * Issue #15699: Reunite comment with variableMartin Panter2016-03-221-16/+3
| |
| * Fix usage of PyMem_Malloc() in overlapped.cVictor Stinner2016-03-161-3/+6
| | | | | | | | | | | | Issue #26563: Replace PyMem_Malloc() with PyMem_RawFree() since PostToQueueCallback() calls PyMem_RawFree() (previously PyMem_Free()) in a new C thread which doesn't hold the GIL.
* | Issue #26588: Fix compilation warning on WindowsVictor Stinner2016-03-211-1/+1
| |
* | hashtable.h now supports keys of any sizeVictor Stinner2016-03-213-133/+284
| | | | | | | | | | | | Issue #26588: hashtable.h now supports keys of any size, not only sizeof(void*). It allows to support key larger than sizeof(void*), but also to use less memory for key smaller than sizeof(void*).
* | cleanup iobase.cVictor Stinner2016-03-191-1/+1
| | | | | | | | casting iobase_finalize to destructor is not needed
* | Add socket finalizerVictor Stinner2016-03-211-18/+53
| | | | | | | | | | | | | | Issue #26590: Implement a safe finalizer for the _socket.socket type. It now releases the GIL to close the socket. Use PyErr_ResourceWarning() to raise the ResourceWarning to pass the socket object to the warning logger, to get the traceback where the socket was created (allocated).
* | Ooops, revert changeset ea9efa06c137Victor Stinner2016-03-213-263/+117
| | | | | | | | | | | | | | | | | | | | | | Change pushed by mistake, the patch is still under review :-/ """ _tracemalloc: add domain to trace keys * hashtable.h: key has now a variable size * _tracemalloc uses (pointer: void*, domain: unsigned int) as key for traces """
* | _tracemalloc: add domain to trace keysVictor Stinner2016-03-183-117/+263
| | | | | | | | | | * hashtable.h: key has now a variable size * _tracemalloc uses (pointer: void*, domain: unsigned int) as key for traces
* | Issue #18787: spwd.getspnam() now raises a PermissionError if the userBerker Peksag2016-03-191-1/+4
| | | | | | | | doesn't have privileges.
* | ResourceWarning: Revert change on socket and scandirVictor Stinner2016-03-192-3/+4
| | | | | | | | io.FileIO has a safe implementation of destructor, but not socket nor scandir.
* | On ResourceWarning, log traceback where the object was allocatedVictor Stinner2016-03-193-6/+4
| | | | | | | | | | | | | | | | | | | | Issue #26567: * Add a new function PyErr_ResourceWarning() function to pass the destroyed object * Add a source attribute to warnings.WarningMessage * Add warnings._showwarnmsg() which uses tracemalloc to get the traceback where source object was allocated.
* | Fix usage of PyMem_Malloc() in overlapped.cVictor Stinner2016-03-161-3/+6
| | | | | | | | | | | | Issue #26563: Replace PyMem_Malloc() with PyMem_RawFree() since PostToQueueCallback() calls PyMem_RawFree() (previously PyMem_Free()) in a new C thread which doesn't hold the GIL.