summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* bpo-35719: Optimize multi-argument math functions. (GH-11527)Serhiy Storchaka2019-01-121-19/+18
| | | | | Use the fast call convention for math functions atan2(), copysign(), hypot() and remainder() and inline unpacking arguments. This sped up them by 1.3--2.5 times.
* bpo-35582: Inline arguments tuple unpacking in handwritten code. (GH-11524)Serhiy Storchaka2019-01-121-11/+10
| | | | | Inline PyArg_UnpackTuple() and _PyArg_UnpackStack() in performance sensitive code in the builtins and operator modules.
* bpo-34838: Use subclass_of for math.dist. (GH-9659)Ammar Askar2019-01-122-9/+12
| | | | | Argument clinic now generates fast inline code for positional parsing, so the manually implemented type check in math.dist can be removed.
* bpo-35423: Stop using the "pending calls" machinery for signals. (gh-10972)Eric Snow2019-01-111-0/+6
| | | | | This change separates the signal handling trigger in the eval loop from the "pending calls" machinery. There is no semantic change and the difference in performance is insignificant. The change makes both components less confusing. It also eliminates the risk of changes to the pending calls affecting signal handling. This is particularly relevant for some upcoming pending calls changes I have in the works.
* bpo-35582: Argument Clinic: Optimize the "all boring objects" case. (GH-11520)Serhiy Storchaka2019-01-1116-256/+355
| | | | | Use _PyArg_CheckPositional() and inlined code instead of PyArg_UnpackTuple() and _PyArg_UnpackStack() if all parameters are positional and use the "object" converter.
* bpo-35582: Argument Clinic: inline parsing code for positional parameters. ↵Serhiy Storchaka2019-01-1141-522/+4621
| | | | (GH-11313)
* bpo-32710: Fix _overlapped.Overlapped memory leaks (GH-11489)Victor Stinner2019-01-111-24/+54
| | | | | | | | | | | | Fix memory leaks in asyncio ProactorEventLoop on overlapped operation failures. Changes: * Implement the tp_traverse slot in the _overlapped.Overlapped type to help to break reference cycles and identify referrers in the garbage collector. * Always clear overlapped on failure: not only set type to TYPE_NOT_STARTED, but release also resources.
* bpo-35702: Add new identifier time.CLOCK_UPTIME_RAW for macOS 10.12 (GH-11503)Joannah Nanjekye2019-01-101-0/+3
|
* bpo-32710: Fix leak in Overlapped_WSASend() (GH-11469)Victor Stinner2019-01-081-0/+2
| | | | | Fix a memory leak in asyncio in the ProactorEventLoop when ReadFile() or WSASend() overlapped operation fail immediately: release the internal buffer.
* bpo-35568: add 'raise_signal' function (GH-11335)Vladimir Matveev2019-01-083-22/+60
| | | | | | As in title, expose C `raise` function as `raise_function` in `signal` module. Also drop existing `raise_signal` in `_testcapi` module and replace all usages with new function. https://bugs.python.org/issue35568
* bpo-35664: Optimize operator.itemgetter (GH-11435)Raymond Hettinger2019-01-071-5/+37
|
* closes bpo-35643: Fix a SyntaxWarning: invalid escape sequence in ↵Mickaël Schoentgen2019-01-021-1/+1
| | | | Modules/_sha3/cleanup.py (GH-11411)
* bpo-32492: Tweak _collections._tuplegetter. (GH-11367)Serhiy Storchaka2018-12-311-8/+8
| | | | | | * Replace the docstrings cache with sys.intern(). * Improve tests. * Unify names of tp_descr_get and tp_descr_set functions.
* bpo-35214: Annotate posix calls for clang MSan. (#11389)Gregory P. Smith2018-12-311-0/+16
| | | It doesn't know the details of a few less common libc functions.
* bpo-35550: Fix incorrect Solaris define guards (GH-11275)Jakub Kulík2018-12-314-5/+5
| | | | | | | Python source code uses on several places ifdef sun or defined(sun) without the underscores, which is not standard compliant and shouldn't be used. Defines should check for __sun instead. Reference: http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system#Solaris https://bugs.python.org/issue35550
* Dead code removal from _hashopenssl. (GH-11379)Gregory P. Smith2018-12-312-121/+19
| | | | HASH_OBJ_CONSTRUCTOR has always been defined as 0 since I created hashlib in Python 2.5. Delete all code associated with it.
* bpo-35214: MSan workarounds for socket, time, and test_faulthandler. (GH-11375)Gregory P. Smith2018-12-312-0/+27
| | | | | Add Clang Memory Sanitizer build instrumentation to work around false positives from the socket and time modules as well as skipping a couple test_faulthandler tests.
* bpo-28503: Use crypt_r() when available instead of crypt() (GH-11373)Gregory P. Smith2018-12-301-1/+9
| | | | | Use crypt_r() when available instead of crypt() in the crypt module. As a nice side effect: This also avoids a memory sanitizer flake as clang msan doesn't know about crypt's internal libc allocated buffer.
* bpo-32492: 1.6x speed up in namedtuple attribute access using C fast-path ↵Pablo Galindo2018-12-302-0/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#10495) * bpo-32492: 2.5x speed up in namedtuple attribute access using C fast path * Add News entry * fixup! bpo-32492: 2.5x speed up in namedtuple attribute access using C fast path * Check for tuple in the __get__ of the new descriptor and don't cache the descriptor itself * Don't inherit from property. Implement GC methods to handle __doc__ * Add a test for the docstring substitution in descriptors * Update NEWS entry to reflect time against 3.7 branch * Simplify implementation with argument clinic, better error messages, only __new__ * Use positional-only parameters for the __new__ * Use PyTuple_GET_SIZE and PyTuple_GET_ITEM to tighter the implementation of tuplegetterdescr_get * Implement __set__ to make tuplegetter a data descriptor * Use Py_INCREF now that we inline PyTuple_GetItem * Apply the valid_index() function, saving one test * Move Py_None test out of the critical path.
* bpo-34373: fix test_mktime and test_pthread_getcpuclickid tests on AIX (GH-8726)Michael Felt2018-12-281-12/+33
| | | | | | | | | * Fix test_mktime on AIX by adding code to get mktime to behave the same way as it does on other *nix systems * Fix test_pthread_getcpuclickid in AIX by adjusting the test case expectations when running on AIX in 32-bit mode Patch by Michael Felt.
* bpo-20182: AC convert remaining functions/methods in _hashopenssl.c (GH-9213)Tal Einat2018-12-272-100/+303
|
* bpo-27643 - skip test_ctypes test case with XLC compiler. (GH-5164)Michael Felt2018-12-261-4/+14
| | | | | | | | | This test case needs "signed short" bitfields, but the IBM XLC compiler (on AIX) does not support this. Skip the code and test when AIX and XLC are used. Use __xlc__ as identifier to detect the XLC compiler.
* bpo-23867: Argument Clinic: inline parsing code for a single positional ↵Serhiy Storchaka2018-12-2533-206/+1004
| | | | parameter. (GH-9689)
* bpo-35529: Fix a reference counting bug in PyCFuncPtr_FromDll(). (GH-11229)Zackery Spytz2018-12-201-5/+8
| | | | | "dll" would leak if an error occurred in _validate_paramflags() or GenericPyCData_new().
* bpo-35502: Fix reference leaks in ElementTree.TreeBuilder. (GH-11170)Serhiy Storchaka2018-12-181-0/+5
|
* bpo-35504: Fix segfaults and SystemErrors when deleting certain attrs. ↵Zackery Spytz2018-12-176-0/+32
| | | | (GH-11175)
* bpo-35490: Remove the DecodeFSDefault return converter in AC. (#11152)Serhiy Storchaka2018-12-172-14/+10
|
* bpo-35415: validate fileno argument to socket.socket (GH-10917)Dima Tisnek2018-12-171-20/+29
| | | https://bugs.python.org/issue35415
* bpo-35489: Use "const Py_UNICODE *" for the Py_UNICODE converter in AC. ↵Serhiy Storchaka2018-12-146-22/+26
| | | | (GH-11150)
* bpo-31446: Copy command line that should be passed to CreateProcessW(). ↵Vladimir Matveev2018-12-142-8/+26
| | | | (GH-11141)
* bpo-33106: change dbm key deletion error for readonly file from KeyError to ↵Xiang Zhang2018-12-122-5/+19
| | | | | | dbm.error (#6295)
* bpo-35454: Fix miscellaneous minor issues in error handling. (#11077)Serhiy Storchaka2018-12-113-8/+17
| | | | | | * bpo-35454: Fix miscellaneous minor issues in error handling. * Fix a null pointer dereference.
* bpo-35444: Unify and optimize the helper for getting a builtin object. ↵Serhiy Storchaka2018-12-113-8/+6
| | | | | | | | (GH-11047) This speeds up pickling of some iterators. This fixes also error handling in pickling methods when fail to look up builtin "getattr".
* bpo-31374: expat doesn't include <pyconfig.h> on Windows (GH-11079)Victor Stinner2018-12-101-1/+3
|
* bpo-32788: Better error handling in sqlite3. (GH-3723)Serhiy Storchaka2018-12-105-121/+128
| | | Propagate unexpected errors (like MemoryError and KeyboardInterrupt) to user.
* bpo-31374: Include pyconfig.h earlier in expat (GH-11064)Victor Stinner2018-12-101-0/+1
| | | | | | Include <pyconfig.h> ealier in Modules/expat/xmltok.c to define properly _POSIX_C_SOURCE. Python defines _POSIX_C_SOURCE as 200809L, whereas <features.h> (included indirectly by <string.h>) defines _POSIX_C_SOURCE as 199506L.
* bpo-35050: AF_ALG length check off-by-one error (GH-10058)Christian Heimes2018-12-101-3/+5
| | | | | | | | The length check for AF_ALG salg_name and salg_type had a off-by-one error. The code assumed that both values are not necessarily NULL terminated. However the Kernel code for alg_bind() ensures that the last byte of both strings are NULL terminated. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-35445: Do not ignore memory errors when create posix.environ. (GH-11049)Serhiy Storchaka2018-12-101-37/+27
|
* Remove a duplicate descriptor in gdbm. (GH-11053)Serhiy Storchaka2018-12-091-1/+0
|
* bpo-35441: Remove dead and buggy code related to PyList_SetItem(). (GH-11033)Zackery Spytz2018-12-084-24/+15
| | | | | | | | | | In _localemodule.c and selectmodule.c, remove dead code that would cause double decrefs if run. In addition, replace PyList_SetItem() with PyList_SET_ITEM() in cases where a new list is populated and there is no possibility of an error. In addition, check if the list changed size in the loop in array_array_fromlist().
* bpo-22005: Fix condition for unpickling a date object. (GH-11025)Serhiy Storchaka2018-12-071-1/+1
|
* bpo-22005: Fixed unpickling instances of datetime classes pickled by Python ↵Serhiy Storchaka2018-12-071-91/+174
| | | | | | 2. (GH-11017) encoding='latin1' should be used for successful decoding.
* bpo-35436: Add missing PyErr_NoMemory() calls and other minor bug fixes. ↵Zackery Spytz2018-12-078-15/+43
| | | | | | (GH-11015) Set MemoryError when appropriate, add missing failure checks, and fix some potential leaks.
* bpo-35384: The repr of ctypes.CArgObject no longer fails for non-ascii ↵Serhiy Storchaka2018-12-061-4/+22
| | | | character. (GH-10863)
* bpo-35310: Clear select() lists before returning upon EINTR (GH-10877)Oran Avraham2018-12-051-0/+4
| | | | | | select() calls are retried on EINTR (per PEP 475). However, if a timeout was provided and the deadline has passed after running the signal handlers, rlist, wlist and xlist should be cleared since select(2) left them unmodified.
* bpo-34604: Use %R because of invisible characters or trailing whitespaces. ↵William Grzybowski2018-12-052-2/+2
| | | | (GH-9165)
* bpo-34987: Fix a possible null pointer dereference in _pickle.c's ↵Zackery Spytz2018-12-051-1/+4
| | | | save_reduce(). (GH-9886)
* bpo-34052: Prevent SQLite functions from setting callbacks on exceptions. ↵Sergey Fedoseev2018-12-051-18/+13
| | | | (GH-8113)
* bpo-32787: Better error handling in ctypes. (#3727)Serhiy Storchaka2018-12-055-112/+247
| | | | | | | | | | | | * bpo-31572: Get rid of PyObject_HasAttrString() in ctypes. * Fix error handling for _pack_. * Don't silence errors when look up in a dict. * Use _PyObject_LookupAttrId(). * More changes.
* bpo-35373: Fix PyInit_time() error handling (GH-10865)Victor Stinner2018-12-031-4/+7
| | | | | | | * PyInit_time() now returns NULL if an exception is raised. * Rename PyInit_timezone() to init_timezone(). "PyInit_" prefix is a special prefix for function initializing a module. init_timezone() doesn't initialize a module and the function is not exported.