summaryrefslogtreecommitdiffstats
path: root/Objects
Commit message (Collapse)AuthorAgeFilesLines
* Move exc state to generator. Fixes bpo-25612 (#1773)Mark Shannon2017-10-222-23/+36
| | | Move exception state information from frame objects to coroutine (generator/thread) object where it belongs.
* bpo-31825: Fixed OverflowError in the 'unicode-escape' codec (#4058)Serhiy Storchaka2017-10-202-2/+2
| | | | and in codecs.escape_decode() when decode an escaped non-ascii byte.
* bpo-28280: Make PyMapping_Keys(), PyMapping_Values() and PyMapping_Items() ↵Oren Milman2017-10-081-27/+49
| | | | always return a list (#3840)
* bpo-31655: Validate keyword names in SimpleNamespace constructor. (#3909)Serhiy Storchaka2017-10-071-1/+5
|
* bpo-31709: Drop support for asynchronous __aiter__. (#3903)Yury Selivanov2017-10-061-94/+0
|
* bpo-31619: Fixed a ValueError when convert a string with large number of ↵Serhiy Storchaka2017-10-031-4/+4
| | | | | underscores (#3827) to integer with binary base.
* bpo-31336: Speed up type creation. (#3279)scoder2017-10-011-52/+108
| | | | | Speed up class creation by 10-20% by reducing the overhead in the necessary special method lookups.
* bpo-31579: Fixed a possible leak in enumerate() with large indices. (#3753)Serhiy Storchaka2017-09-261-2/+6
|
* bpo-26491 Defer DECREFs until enumobject is in a consistent state (#3747)Raymond Hettinger2017-09-251-18/+30
|
* bpo-31410: Optimized calling wrapper and classmethod descriptors. (#3481)Serhiy Storchaka2017-09-211-29/+33
|
* bpo-27541: Reprs of subclasses of some classes now contain actual type name. ↵Serhiy Storchaka2017-09-211-6/+10
| | | | | (#3631) Affected classes are bytearray, array, deque, defaultdict, count and repeat.
* bpo-30486: Make cell_set_contents() symbol private (#3668)Victor Stinner2017-09-201-1/+1
| | | Don't export the cell_set_contents() symbol in the C API.
* bpo-31506: Improve the error message logic for object.__new__ and ↵Serhiy Storchaka2017-09-201-10/+21
| | | | object.__init__. (GH-3650)
* bpo-31492: Fix assertion failures in case of a module with a bad __name__ ↵Oren Milman2017-09-191-4/+1
| | | | attribute. (#3620)
* bpo-31497: Add private helper _PyType_Name(). (#3630)Serhiy Storchaka2017-09-173-25/+19
| | | | This function returns the last component of tp_name after a dot. Returns tp_name itself if it doesn't contain a dot.
* bpo-28411: Support other mappings in PyInterpreterState.modules. (#3593)Eric Snow2017-09-151-3/+1
| | | | | The concrete PyDict_* API is used to interact with PyInterpreterState.modules in a number of places. This isn't compatible with all dict subclasses, nor with other Mapping implementations. This patch switches the concrete API usage to the corresponding abstract API calls. We also add a PyImport_GetModule() function (and some other helpers) to reduce a bunch of code duplication.
* bpo-31338 (#3374)Barry Warsaw2017-09-156-70/+46
| | | | | | | * Add Py_UNREACHABLE() as an alias to abort(). * Use Py_UNREACHABLE() instead of assert(0) * Convert more unreachable code to use Py_UNREACHABLE() * Document Py_UNREACHABLE() and a few other macros.
* bpo-30860: Fix deadcode in obmalloc.c (#3499)Victor Stinner2017-09-141-2/+2
| | | | | | Fix Coverity CID 1417587: _PyMem_Initialize() contains code which is never executed. Replace the runtime check with a build assertion.
* bpo-28411: Isolate PyInterpreterState.modules (#3575)Eric Snow2017-09-142-5/+11
| | | | | A bunch of code currently uses PyInterpreterState.modules directly instead of PyImport_GetModuleDict(). This complicates efforts to make changes relative to sys.modules. This patch switches to using PyImport_GetModuleDict() uniformly. Also, a number of related uses of sys.modules are updated for uniformity for the same reason. Note that this code was already reviewed and merged as part of #1638. I reverted that and am now splitting it up into more focused parts.
* bpo-30860: Fix a refleak. (#3567)Eric Snow2017-09-141-12/+15
| | | | | Resolves bpo-31420. (This was accidentally reverted when in #3565.)
* bpo-31404: Revert "remove modules from Py_InterpreterState (#1638)" (#3565)Eric Snow2017-09-143-25/+17
| | | PR #1638, for bpo-28411, causes problems in some (very) edge cases. Until that gets sorted out, we're reverting the merge. PR #3506, a fix on top of #1638, is also getting reverted.
* bpo-31462: Remove trailing whitespaces. (#3564)Serhiy Storchaka2017-09-142-2/+2
|
* bpo-30860: Fix a refleak. (#3506)Eric Snow2017-09-121-12/+15
| | | | | | | | | | | | | | * Drop warnoptions from PyInterpreterState. * Drop xoptions from PyInterpreterState. * Don't set warnoptions and _xoptions again. * Decref after adding to sys.__dict__. * Drop an unused macro. * Check sys.xoptions *before* we delete it.
* bpo-31373: remove overly strict float range checks (#3486)Benjamin Peterson2017-09-111-2/+2
| | | | | This undoes a853a8ba7850381d49b284295dd6f0dc491dbe44 except for the pytime.c parts. We want to continue to allow IEEE 754 doubles larger than FLT_MAX to be rounded into finite floats. Tests were added to very this behavior.
* replace custom table with pyctype (#3456)Benjamin Peterson2017-09-081-12/+1
|
* bpo-31393: Fix the use of PyUnicode_READY(). (#3451)Serhiy Storchaka2017-09-083-6/+16
|
* update all_name_chars comment after 9020ac7cce97dddad51b285fffc31fe4ddf60898 ↵Benjamin Peterson2017-09-081-2/+1
| | | | (#3452)
* bpo-30860: Consolidate stateful runtime globals. (#3397)Eric Snow2017-09-0825-634/+206
| | | | | | | * group the (stateful) runtime globals into various topical structs * consolidate the topical structs under a single top-level _PyRuntimeState struct * add a check-c-globals.py script that helps identify runtime globals Other globals are excluded (see globals.txt and check-c-globals.py).
* optimize all_name_chars (#3442)Benjamin Peterson2017-09-081-14/+14
| | | Remove redundant PyUnicode_Check call. Use a static table for checking chars.
* bpo-31344: Per-frame control of trace events (GH-3417)Nick Coghlan2017-09-081-0/+4
| | | | | | | | | f_trace_lines: enable/disable line trace events f_trace_opcodes: enable/disable opcode trace events These are intended primarily for testing of the interpreter itself, as they make it much easier to emulate signals arriving at unfortunate times.
* bpo-31373: fix undefined floating-point demotions (#3396)Benjamin Peterson2017-09-071-4/+6
|
* bpo-31370: Remove support for threads-less builds (#3385)Antoine Pitrou2017-09-072-8/+0
| | | | | | * Remove Setup.config * Always define WITH_THREAD for compatibility.
* Revert "bpo-30860: Consolidate stateful runtime globals." (#3379)Eric Snow2017-09-064-171/+634
| | | Windows buildbots started failing due to include-related errors.
* bpo-30860: Consolidate stateful runtime globals. (#2594)Eric Snow2017-09-064-634/+171
| | | | | | | | | * group the (stateful) runtime globals into various topical structs * consolidate the topical structs under a single top-level _PyRuntimeState struct * add a check-c-globals.py script that helps identify runtime globals Other globals are excluded (see globals.txt and check-c-globals.py).
* bpo-30662: fixed OrderedDict.__init__ docstring re PEP 468 (#2179)Jonathan Eunice2017-09-051-2/+1
| | | | | | | | | | | | * fixed OrderedDict.__init__ docstring re PEP 468 * tightened comment and mirrored to C impl * added space after period per marco-buttu * preserved substituted for stable * drop references to Python 3.6 and PEP 468
* bpo-31347: _PyObject_FastCall_Prepend: do not call memcpy if args might not ↵Benjamin Peterson2017-09-051-3/+3
| | | | | be null (#3329) Passing NULL as the second argument to to memcpy is undefined behavior even if the size is 0.
* Fix terminology in comment and add more design rationale. (#3335)Raymond Hettinger2017-09-051-3/+10
| | | | | | * Fix terminology in comment and add more design rationale. * Fix extra space
* bpo-28411: Remove "modules" field from Py_InterpreterState. (#1638)Eric Snow2017-09-042-5/+10
| | | sys.modules is the one true source.
* bpo-31279: Silence -Wstringop-overflow warning. (#3207)Stefan Krah2017-08-251-1/+1
|
* bpo-31095: fix potential crash during GC (GH-2974)INADA Naoki2017-08-242-0/+9
|
* bpo-31161: only check for parens error for SyntaxError (#3082)Martijn Pieters2017-08-221-5/+10
| | | | Subclasses such as IndentError and TabError should not have this message applied.
* bpo-30923: Silence fall-through warnings included in -Wextra since gcc-7.0. ↵Stefan Krah2017-08-213-6/+7
| | | | (#3157)
* bpo-30721: Add missing '?' to new error message (GH-3131)Sanyam Khurana2017-08-181-1/+1
|
* bpo-30721: Show correct syntax hint in Py3 when using Py2 redirection syntax ↵Sanyam Khurana2017-08-181-0/+15
| | | | (#2345)
* bpo-29304: Simplify dict lookup functions (GH-2407)INADA Naoki2017-08-033-270/+132
| | | | * remove hashpos parameter from lookdict functions. * remove many duplicated code from lookdict functions.
* bpo-30978: str.format_map() now passes key lookup exceptions through. (#2790)Serhiy Storchaka2017-08-031-6/+10
| | | Previously any exception was replaced with a KeyError exception.
* bpo-30640: Fix undefined behavior in _PyFunction_FastCallDict() and ↵Zackery Spytz2017-07-311-1/+1
| | | | | PyEval_EvalCodeEx() (#2919) k + 1 was calculated with k = NULL.
* bpo-22207: Add checks for possible integer overflows in unicodeobject.c. (#2623)Serhiy Storchaka2017-07-111-6/+12
| | | Based on patch by Victor Stinner.
* bpo-30878: Fix error message when keyword arguments are passed (#2635)Sylvain2017-07-091-4/+4
| | | to staticmethod() and classmethod().
* bpo-30789: Use a single memory block for co_extra. (#2555)Serhiy Storchaka2017-07-041-39/+15
| | | | | | * bpo-30789: Use a single memory block for co_extra. * Address review comments.