summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* fixes bpo-31834: Use optimized code for BLAKE2 only with SSSE3+ (#4066)Michał Górny2017-10-242-2/+6
| | | | | | | | | | | | | | | | Rework the code choosing BLAKE2 code paths from using the optimized variant on all x86_64 machines to using it when SSSE3 or better supported instructions sets are available. Firstly, this solves the problem of using pure SSE2 code path on x86_64 machines. As reported in the bug, this code is slower than the reference code on all tested x86_64 machines. Furthermore, on Athlon64 that lacks SSSE3, it is even 2.5 times slower than the reference code! Checking for SSSE3 therefore ensures that the optimized implementation will only be used when it has a chance of performing better. Secondly, this makes it possible to use SSSE3+ optimizations on 32-bit x86 systems. This allows for even 2 times speed gain on modern 32-bit x86 systems (tested in a 32-bit chroot).
* bpo-31653: Remove deadcode in semlock_acquire() (#4091)Victor Stinner2017-10-231-4/+4
| | | | | | | | | | Fix the following Coverity warning: >>> CID 1420038: Control flow issues (DEADCODE) >>> Execution cannot reach this statement: "res = sem_trywait(self->han...". 321 res = sem_trywait(self->handle); The deadcode was introduced by the commit c872d39d324cd6f1a71b73e10406bbaed192d35f.
* bpo-31752: Fix possible crash in timedelta constructor called with custom ↵Serhiy Storchaka2017-10-231-2/+7
| | | | | integers. (#3947) Bad remainder in divmod() in intermediate calculations caused an assertion failure.
* bpo-31572: Get rid of using _PyObject_HasAttrId() in pickle. (#3729)Serhiy Storchaka2017-10-221-30/+33
|
* bpo-31653: Don't release the GIL if we can acquire a multiprocessing ↵Antoine Pitrou2017-10-221-10/+20
| | | | semaphore immediately (#4078)
* bpo-31781: Prevent crashes when calling methods of an uninitialized ↵Oren Milman2017-10-201-0/+18
| | | | zipimport.zipimporter object (GH-3986)
* bpo-31819: Add AbstractEventLoop.sock_recv_into() (#4051)Antoine Pitrou2017-10-191-58/+156
| | | | | | | | * bpo-31819: Add AbstractEventLoop.sock_recv_into() * Add NEWS * Add doc
* bpo-31806: Use _PyTime_ROUND_TIMEOUT for the timeout argument parsing in ↵Pablo Galindo2017-10-183-6/+6
| | | | | | | | | more functions (#4026) Fix timeout rounding in time.sleep(), threading.Lock.acquire() and socket.socket.settimeout() to round correctly negative timeouts between -1.0 and 0.0. The functions now block waiting for events as expected. Previously, the call was incorrectly non-blocking.
* time.clock() now emits a DeprecationWarning (GH-4020)Victor Stinner2017-10-171-0/+7
| | | | | | | | | | bpo-31803: time.clock() and time.get_clock_info('clock') now emit a DeprecationWarning warning. Replace time.clock() with time.perf_counter() in tests and demos. Remove also hasattr(time, 'monotonic') in test_time since time.monotonic() is now always available since Python 3.5.
* bpo-31334: Fix timeout in select.poll.poll() (GH-3277)Riccardo Coccioli2017-10-171-9/+16
| | | | | | Always pass -1, or INFTIM where defined, to the poll() system call when a negative timeout is passed to the poll.poll([timeout]) method in the select module. Various OSes throw an error with arbitrary negative values.
* bpo-31786: Make functions in the select module blocking when timeout is a ↵Pablo Galindo2017-10-172-9/+10
| | | | small negative value. (#4003)
* bpo-31558: Add gc.freeze() (#3705)brainfvck2017-10-162-2/+134
| | | | | Freeze all the objects tracked by gc - move them to a permanent generation and ignore all the future collections. This can be used before a POSIX fork() call to make the gc copy-on-write friendly or to speed up collection.
* bpo-31773: _PyTime_GetPerfCounter() uses _PyTime_t (GH-3983)Victor Stinner2017-10-161-3/+4
| | | | | | | | * Rewrite win_perf_counter() to only use integers internally. * Add _PyTime_MulDiv() which compute "ticks * mul / div" in two parts (int part and remaining) to prevent integer overflow. * Clock frequency is checked at initialization for integer overflow. * Enhance also pymonotonic() to reduce the precision loss on macOS (mach_absolute_time() clock).
* completly -> completely (#3999) (closes bpo-31788)Semen Zhydenko2017-10-151-1/+1
|
* bpo-30807: signal.setitimer() now uses _PyTime API (GH-3865)Victor Stinner2017-10-132-21/+31
| | | | | | The _PyTime API handles detects overflow and is well tested. Document that the signal will only be sent once if internal is equal to zero.
* os.startfile(): add a C comment on security (#3877)Victor Stinner2017-10-131-0/+4
| | | LoadLibrary("SHELL32") is not vulnerable to DLL hijacking.
* bpo-28647: Update -u documentation after bpo-30404 (GH-3961)Berker Peksag2017-10-131-3/+2
|
* bpo-30058: Fixed buffer overflow in select.kqueue.control(). (#1095)Serhiy Storchaka2017-10-121-16/+13
|
* bpo-31773: time.perf_counter() uses again double (GH-3964)Victor Stinner2017-10-121-17/+11
| | | | | | | | time.clock() and time.perf_counter() now use again C double internally. Remove also _PyTime_GetWinPerfCounterWithInfo(): use _PyTime_GetPerfCounterDoubleWithInfo() instead on Windows.
* bpo-28157: Improvements for the time module documentation (GH-928)Cheryl Sabella2017-10-111-22/+1
| | | | | * Separated functions and constants descriptions in sections. * Added a note about the limitations of timezone constants. * Removed redundant lists from the module docstring.
* bpo-31728: Prevent crashes in _elementtree due to unsafe cleanup of ↵Oren Milman2017-10-101-34/+28
| | | | Element.text and Element.tail (#3924)
* bpo-31740: Prevent refleaks when sqlite3.Connection.__init__() is called ↵Oren Milman2017-10-101-8/+8
| | | | more than once (GH-3944)
* bpo-31415: Add _PyTime_GetPerfCounter() and use it for -X importtime (#3936)Victor Stinner2017-10-101-48/+23
| | | | | * Add _PyTime_GetPerfCounter() * Use _PyTime_GetPerfCounter() for -X importtime
* bpo-31701: faulthandler: ignore MSC and COM Windows exception (#3929)Victor Stinner2017-10-091-3/+19
| | | | | | bpo-31701: On Windows, faulthandler.enable() now ignores MSC and COM exceptions.
* bpo-31723: Fix refleaks when zipimporter.__init__() is called more than once ↵Oren Milman2017-10-091-5/+6
| | | | (GH-3919)
* bpo-28280: Make PyMapping_Keys(), PyMapping_Values() and PyMapping_Items() ↵Oren Milman2017-10-081-0/+22
| | | | always return a list (#3840)
* bpo-25658: Implement PEP 539 for Thread Specific Storage (TSS) API (GH-1362)Masayuki Yamamoto2017-10-064-21/+65
| | | | | | | | | See PEP 539 for details. Highlights of changes: - Add Thread Specific Storage (TSS) API - Document the Thread Local Storage (TLS) API as deprecated - Update code that used TLS API to use TSS API
* closes bpo-31596: Add an interface for pthread_getcpuclockid(3) (#3756)pdox2017-10-051-0/+32
|
* Refactor multiplication and division of timedelta and float. (#3656)Serhiy Storchaka2017-10-041-41/+10
| | | Implementations of these operations are virtually identical.
* bpo-30397: Add re.Pattern and re.Match. (#1646)Serhiy Storchaka2017-10-042-19/+28
|
* bpo-31675: Fix memory leaks in Tkinter's methods splitlist() and split() (#3866)Serhiy Storchaka2017-10-031-2/+10
| | | | | when pass a string larger than 2 GiB. Decrease memory requirements for Tcl's bigmem tests.
* bpo-31673: Fixed typo in the name of Tkinter's method adderrorinfo(). (#3864)Serhiy Storchaka2017-10-032-13/+13
|
* bpo-11063: Fix _uuid module on macOS (#3855)Victor Stinner2017-10-021-1/+29
| | | | | On macOS, use uuid_generate_time() instead of uuid_generate_time_safe() of libuuid, since uuid_generate_time_safe() is not available.
* bpo-31602: Fix an assertion failure in zipimporter.get_source() in case of a ↵Oren Milman2017-09-291-0/+8
| | | | | | | bad zlib.decompress() (GH-3784) While a rare potential failure (it requires swapping out zlib.decompress() itself and forcing it to return a non-bytes object), this change prevents a potential C-level assertion failure and instead substitutes it with an exception. Thanks to Oren Milman for the patch.
* remove support for BSD/OS (closes bpo-31624) (#3812)Benjamin Peterson2017-09-291-1/+1
|
* bpo-11063, bpo-20519: avoid ctypes and improve import time for uuid (#3796)Antoine Pitrou2017-09-281-0/+35
| | | | bpo-11063, bpo-20519: avoid ctypes and improve import time for uuid.
* bpo-31478: Fix an assertion failure in random.seed() in case a seed has a ↵Oren Milman2017-09-281-2/+5
| | | | bad __abs__() method. (#3596)
* bpo-31586: Use _count_element fast path for real dicts.Oren Milman2017-09-271-1/+3
|
* bpo-30347: Stop crashes when concurrently iterate over itertools.groupby() ↵Serhiy Storchaka2017-09-261-36/+31
| | | | iterators. (#1557)
* bpo-27385: Clarify docstring for groupby() (#3738)Raymond Hettinger2017-09-251-2/+3
|
* bpo-31311: Fix a SystemError and a crash in ctypes._CData.__setstate__(), in ↵Oren Milman2017-09-251-0/+10
| | | | case of a bad __dict__. (#3254)
* remove configure check for memmove (#3716)Benjamin Peterson2017-09-241-0/+2
| | | Python requires C implementations provide memmove, so we shouldn't need to check for it. The only place using this configure check was expat, where we can simply always define HAVE_MEMMOVE.
* bpo-30346: An iterator produced by the itertools.groupby() iterator (#1569)Serhiy Storchaka2017-09-241-0/+8
| | | now becames exhausted after advancing the groupby iterator.
* bpo-31311: Impove error reporting in case the first argument to ↵Oren Milman2017-09-241-1/+4
| | | | PyCData_setstate() isn't a dictionary. (#3255)
* bpo-31505: Fix an assertion failure in json, in case _json.make_encoder() ↵Oren Milman2017-09-241-3/+13
| | | | received a bad encoder() argument. (#3643)
* bpo-25359: Add missed "goto error" after setting an exception. (#3712)Serhiy Storchaka2017-09-231-0/+1
|
* sqlite: delete some bsddb cargo-culted code to work around Python 2.3/2.4 bugsBenjamin Peterson2017-09-231-15/+0
|
* bpo-17852: Maintain a list of BufferedWriter objects. Flush them on exit. ↵Neil Schemenauer2017-09-223-1/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#3372) * Maintain a list of BufferedWriter objects. Flush them on exit. In Python 3, the buffer and the underlying file object are separate and so the order in which objects are finalized matters. This is unlike Python 2 where the file and buffer were a single object and finalization was done for both at the same time. In Python 3, if the file is finalized and closed before the buffer then the data in the buffer is lost. This change adds a doubly linked list of open file buffers. An atexit hook ensures they are flushed before proceeding with interpreter shutdown. This is addition does not remove the need to properly close files as there are other reasons why buffered data could get lost during finalization. Initial patch by Armin Rigo. * Use weakref.WeakSet instead of WeakKeyDictionary. * Simplify buffered double-linked list types. * In _flush_all_writers(), suppress errors from flush(). * Remove NEWS entry, use blurb. * Take more care when flushing file buffers from atexit. The previous implementation was not careful enough to avoid causing issues in multi-threaded cases. Check for buf->ok and buf->finalizing before actually doing the flush. Also, increase the refcnt to ensure the object does not disappear.
* bpo-31443: Formulate the type slot initialization rules in terms of C99. (#3688)Stefan Krah2017-09-221-5/+13
|
* bpo-27541: Reprs of subclasses of some classes now contain actual type name. ↵Serhiy Storchaka2017-09-213-12/+24
| | | | | (#3631) Affected classes are bytearray, array, deque, defaultdict, count and repeat.