summaryrefslogtreecommitdiffstats
path: root/Objects
Commit message (Collapse)AuthorAgeFilesLines
* [3.6] bpo-30730: Prevent environment variables injection in subprocess on ↵Serhiy Storchaka2017-07-071-2/+2
| | | | | | | | Windows. (GH-2325) (#2360) Prevent passing other invalid environment variables and command arguments.. (cherry picked from commit d174d24a5d37d1516b885dc7c82f71ecd5930700) (cherry picked from commit e7135751b8e48af80665e40ac8fa6d0073e5affe)
* bpo-30704, bpo-30604: Fix memleak in code_dealloc() (#2455) (#2456)Victor Stinner2017-07-071-1/+2
| | | | | | Free also co_extra->ce_extras, not only co_extra. (cherry picked from commit 23e7944eba1968bb8432fdc4cc96d4fdd2c1a230) (cherry picked from commit 26daad4ee14693381d84a5235709d22aed1c22ed)
* [3.6] bpo-30604: Move co_extra_freefuncs to interpreter state to avoid ↵Dino Viehland2017-06-131-11/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | crashes in threads (#2015) * Move co_extra_freefuncs to interpreter state to avoid crashes in multi-threaded scenarios involving deletion of code objects * Don't require that extra be zero initialized * Build test list instead of defining empty test class * Ensure extra is always assigned on success * Keep the old fields in the thread state object, just don't use them Add new linked list of code extra objects on a per-interpreter basis so that interpreter state size isn't changed * Rename __PyCodeExtraState_Get and add comment about it going away in 3.7 Fix sort order of import's in test_code.py * Remove an extraneous space * Remove docstrings for comments * Touch up formatting * Fix casing of coextra local * Fix casing of another variable * Prefix PyCodeExtraState with __ to match C API for getting it * Update NEWS file for bpo-30604
* bpo-30524: Fix _PyStack_UnpackDict() (#1886)Victor Stinner2017-06-092-11/+11
| | | | | | * bpo-29259: Remove unused func parameter of _PyStack_UnpackDict() * bpo-29286: Change _PyStack_UnpackDict() prototype to be able to notify of failure when args is NULL. _PyStack_UnpackDict() now returns -1 on error.
* [3.6] bpo-27945: Fixed various segfaults with dict. (GH-1657) (#1677)Serhiy Storchaka2017-05-201-25/+44
| | | | Based on patches by Duane Griffin and Tim Mitchell. (cherry picked from commit 753bca3934a7618a4fa96e107ad1c5c18633a683)
* [3.6] bpo-25794: Fix `type.__setattr__()` for non-interned attribute names. ↵Serhiy Storchaka2017-05-201-5/+34
| | | | | | | (GH-1652) (#1673) Based on patch by Eryk Sun. (cherry picked from commit d896985bb2de49046f9b6879e906d1e4db255e23)
* bpo-30281: Fix the default value for stop in PySlice_Unpack() (#1480) (#1529)Xiang Zhang2017-05-101-3/+5
|
* bpo-29802: Fix the cleaning up issue in PyUnicode_FSDecoder(). (#1217)Serhiy Storchaka2017-04-201-0/+1
|
* [3.6] bpo-12414: Update code_sizeof() to take in account co_extra memory. ↵Dong-hee Na2017-04-201-3/+7
| | | | (#1168) (#1198)
* bpo-30061: Check if PyObject_Size()/PySequence_Size()/PyMapping_Size() ↵Serhiy Storchaka2017-04-191-3/+9
| | | | | | | (#1096) (#1180) raised an error. (cherry picked from commit bf623ae8843dc30b28c574bec8d29fc14be59d86)
* [3.6] bpo-29549: Fixes docstring for str.index (GH-256) (GH-1028)Mariatta2017-04-092-5/+20
| | | (cherry picked from commit 43ba8861e0ad044efafa46a7cc04e12ac5df640e)
* bpo-29998: Pickling and copying ImportError now preserves name and path ↵Serhiy Storchaka2017-04-081-0/+48
| | | | | | (#1010) (#1042) attributes. (cherry picked from commit b785396ab451b0c9d6ae9ee5a9e56c810209a6cb)
* Expand the PySlice_GetIndicesEx macro. (#1023) (#1044)Serhiy Storchaka2017-04-086-20/+23
| | | (cherry picked from commit b879fe82e7e5c3f7673c9a7fa4aad42bd05445d8)
* bpo-29941: Assert fixes (#886) (#955)T. Wouters2017-04-022-2/+2
| | | | | | | | | | Make a non-Py_DEBUG, asserts-enabled build of CPython possible. This means making sure helper functions are defined when NDEBUG is not defined, not just when Py_DEBUG is defined. Also fix a division-by-zero in obmalloc.c that went unnoticed because in Py_DEBUG mode, elsize is never zero. (cherry picked from commit a00c3fd12d421e41b769debd7df717d17b0deed5 and 06bb4873d6a9ac303701d08a851d6cd9a51e02a3)
* bpo-29949: Fix set memory usage regression (GH-945)INADA Naoki2017-04-011-6/+5
| | | | | | Revert "Minor factoring: move redundant resize scaling logic into the resize function." This reverts commit 4897300276d870f99459c82b937f0ac22450f0b6. (cherry picked from commit e82cf8675bacd7a03de508ed11865fc2701dcef5)
* bpo-28810: Update lnotab_notes.txt (GH-665) (GH-919)Mariatta2017-03-311-22/+28
| | | (cherry picked from commit 9135275cba680902e6caf29461f0423dc570190d)
* bpo-29935: Fixed error messages in the index() method of tuple, list and ↵Serhiy Storchaka2017-03-302-4/+4
| | | | | | deque (#887) (#907) when pass indices of wrong type. (cherry picked from commit d4edfc9abffca965e76ebc5957a92031a4d6c4d4)
* bpo-29864: Don't use Py_SIZE for dict object. (#747) (#750)Serhiy Storchaka2017-03-221-1/+1
|
* bpo-28876: bool of large range raises OverflowError (#699) (#734)Serhiy Storchaka2017-03-201-1/+11
| | | (cherry picked from commit e46fb8611867fa3b407a813f53137929b7cb4a10)
* bpo-29116: Fix error messages for concatenating bytes and bytearray with ↵Serhiy Storchaka2017-03-192-2/+2
| | | | | unsupported type. (#709) (#723) (cherry picked from commit 6b5a9ec4788770c652bac3bf5d5a0a3b710b82ae)
* bpo-28856: Let %b format for bytes support objects that follow the buffer ↵Xiang Zhang2017-03-141-1/+14
| | | | protocol (GH-664)
* Fix wrapping into StopIteration of return values in generators and ↵Yury Selivanov2017-03-121-2/+1
| | | | coroutines (#644) (#647)
* [3.6] bpo-29714: Fix a regression that bytes format may fail when containing ↵Xiang Zhang2017-03-061-2/+2
| | | | | | zero bytes inside. (GH-504)
* bpo-29683 - Fixes to _PyCode_SetExtra when co_extra->ce->extras is (#402)Brian Coleman2017-03-021-10/+14
| | | | | | | | allocated. On PyMem_Realloc failure, _PyCode_SetExtra should free co_extra if co_extra->ce_extras could not be allocated. On PyMem_Realloc success, _PyCode_SetExtra should set all unused slots in co_extra->ce_extras to NULL.
* bpo-29602: fix signed zero handling in complex constructor. (#203) (#206)Mark Dickinson2017-02-201-3/+3
| | | | | | | * Fix incorrect handling of signed zeros for complex-related classes. * Add Misc/NEWS entry. (cherry picked from commit 112ec38c15b388fe025ccb85369a584d218b1160)
* bpo-24274: fix erroneous comment in dictobject.c (GH-200)INADA Naoki2017-02-201-1/+2
| | | | lookdict_unicode() and lookdict_unicode_nodummy() may raise exception when key is not unicode.
* bpo-29347: Fix possibly dereferencing undefined pointers when creating ↵Xiang Zhang2017-02-201-0/+2
| | | | weakref objects (#128) (#186)
* bpo-29438: fixed use-after-free in key sharing dict (#39)INADA Naoki2017-02-131-3/+7
|
* Issue #27867: Function PySlice_GetIndicesEx() is replaced with a macro ifSerhiy Storchaka2017-01-251-24/+54
|\ | | | | | | | | Py_LIMITED_API is not set or set to the value between 0x03050400 and 0x03060000 (not including) or 0x03060100 or higher.
| * Issue #27867: Function PySlice_GetIndicesEx() is replaced with a macro ifSerhiy Storchaka2017-01-251-24/+54
| | | | | | | | | | Py_LIMITED_API is not set or set to the value between 0x03050400 and 0x03060000 (not including) or 0x03060100 or higher.
* | Issue #29337: Fixed possible BytesWarning when compare the code objects.Serhiy Storchaka2017-01-241-3/+3
|\ \ | |/ | | | | Warnings could be emitted at compile time.
| * Issue #29337: Fixed possible BytesWarning when compare the code objects.Serhiy Storchaka2017-01-241-3/+3
| | | | | | | | Warnings could be emitted at compile time.
* | Merge doc fixes from 3.5Martin Panter2017-01-141-1/+1
|\ \ | |/
| * Fix grammar, typos and markup in documentation and code commentsMartin Panter2017-01-141-1/+1
| | | | | | | | | | | | * Indent versionchanged at method level, not class level * Mark up ``--help`` to avoid generating an en dash * Use forward slash in Unix command line with a dollar sign ($) prompt
* | Issue #28969: Fixed race condition in C implementation of functools.lru_cache.Serhiy Storchaka2017-01-121-8/+23
|\ \ | |/ | | | | | | KeyError could be raised when cached function with full cache was simultaneously called from differen threads with the same uncached arguments.
| * Issue #28969: Fixed race condition in C implementation of functools.lru_cache.Serhiy Storchaka2017-01-121-8/+23
| | | | | | | | | | KeyError could be raised when cached function with full cache was simultaneously called from differen threads with the same uncached arguments.
* | Issue #29145: Merge 3.5.Xiang Zhang2017-01-101-6/+8
|\ \ | |/
| * Issue #29145: Fix overflow checks in str.replace() and str.join().Xiang Zhang2017-01-101-6/+8
| | | | | | | | Based on patch by Martin Panter.
* | Issue #29159: Fix regression in bytes(x) when x.__index__() raises Exception.INADA Naoki2017-01-062-17/+25
| |
* | Merge 3.5.Stefan Krah2016-12-301-1/+1
|\ \ | |/
| * Issue #29111: Fix memoryview signature.Stefan Krah2016-12-301-1/+1
| |
| * Issue #29073: bytearray formatting no longer truncates on first null byte.Serhiy Storchaka2016-12-281-1/+3
| |
* | Issue #28427: old keys should not remove new values fromAntoine Pitrou2016-12-271-17/+74
|\ \ | |/ | | | | WeakValueDictionary when collecting from another thread.
| * Issue #28427: old keys should not remove new values fromAntoine Pitrou2016-12-271-25/+56
| | | | | | | | WeakValueDictionary when collecting from another thread.
* | Issue #29044: Merge 3.5.Xiang Zhang2016-12-221-3/+4
|\ \ | |/
| * Issue #29044: Fix a use-after-free in string '%c' formatter.Xiang Zhang2016-12-221-3/+4
| |
| * Issue #28147: Fix a memory leak in split-table dictionariesINADA Naoki2016-12-201-6/+15
| | | | | | | | setattr() must not convert combined table into split table.
* | Issue #29000: Fixed bytes formatting of octals with zero padding in alternateSerhiy Storchaka2016-12-171-3/+2
|\ \ | |/ | | | | form.
| * Issue #29000: Fixed bytes formatting of octals with zero padding in alternateSerhiy Storchaka2016-12-171-3/+2
| | | | | | | | form.
* | Issue #26919: On Android, operating system data is now always encoded/decodedXavier de Gaye2016-12-151-3/+3
| | | | | | | | | | to/from UTF-8, instead of the locale encoding to avoid inconsistencies with os.fsencode() and os.fsdecode() which are already using UTF-8.