summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* bpo-35233: Fix _PyMainInterpreterConfig_Copy() (GH-10519)Victor Stinner2018-11-136-67/+215
| | | | | | | | * Fix _PyMainInterpreterConfig_Copy(): copy 'install_signal_handlers' attribute * Add _PyMainInterpreterConfig_AsDict() * Add unit tests on the main interpreter configuration to test_embed.InitConfigTests * test.pythoninfo: log also main_config
* bpo-29564:_PyMem_DumpTraceback() suggests enabling tracemalloc (GH-10510)Victor Stinner2018-11-132-0/+10
| | | | | If tracemalloc is not tracing Python memory allocations, _PyMem_DumpTraceback() now suggests to enable tracemalloc to get the traceback where the memory block has been allocated.
* bpo-34784: Fix PyStructSequence_NewType with heap-allocated StructSequence ↵Eddie Elizondo2018-11-135-137/+239
| | | | (GH-9665)
* bpo-35081: Make some _PyGC macros internal (GH-10507)Victor Stinner2018-11-135-38/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | * Move "GC" macros together: * PyObject_IS_GC() * _Py_AS_GC() * _PyObject_GC_IS_TRACKED() * _PyObject_GC_MAY_BE_TRACKED() * Mark other GC macros as internal (#ifdef Py_BUILD_CORE): * _PyGCHead_NEXT(g), _PyGCHead_SET_NEXT(g, p) * _PyGCHead_PREV(g), _PyGCHead_SET_PREV(g, p) * _PyGCHead_FINALIZED(g), _PyGCHead_SET_FINALIZED(g) * _PyGC_FINALIZED(o), _PyGC_SET_FINALIZED(o) * _PyObject_GC_TRACK(o), _PyObject_GC_UNTRACK(o) * _PyGC_PREV_MASK_FINALIZED * _PyGC_PREV_MASK_COLLECTING * _PyGC_PREV_SHIFT * _PyGC_PREV_MASK * Replace _PyGC_generation0 with _PyRuntime.gc.generation0 * _queuemodule.c: replace _PyObject_GC_UNTRACK() with with PyObject_GC_UnTrack() * Document that _PyObject_GC_TRACK() _PyObject_GC_UNTRACK() macros have been removed from the public C API.
* bpo-35081: Remove Py_BUILD_CORE from datetime.h (GH-10416)Paul Ganssle2018-11-132-29/+28
| | | | | | | | | | | | | | Datetime macros like PyDate_Check() have two implementations, one using the C API capsule and one using direct access to the datetime type symbols defined in _datetimemodule.c. Since the direct access versions of the macros are only used in _datetimemodule.c, they have been moved out of "datetime.h" and into _datetimemodule.c. The _PY_DATETIME_IMPL macro is currently necessary in order to avoid both duplicate definitions of these macros in _datetimemodule.c and unnecessary declarations of C API capsule-related macros and varibles in datetime.h. Co-Authored-By: Victor Stinner <vstinner@redhat.com>
* bpo-35214: Add _Py_ prefix to MEMORY_SANITIZER def. (GH-10503)Gregory P. Smith2018-11-136-10/+10
| | | | Rename our new MEMORY_SANITIZER define to _Py_MEMORY_SANITIZER. Project based C Preprocessor namespacing at its finest. :P
* Fix a couple documentation typos. (GH-10498)Windson yang2018-11-132-2/+2
| | | | reproduciblity -> reproducibility PyPA are the group -> PyPA is the group
* Disable getc_unlocked() with MemorySanitizer. (GH-10499)Gregory P. Smith2018-11-131-1/+2
| | | | clang's MemorySanitizer understand getc() but does not understand getc_unlocked(). Workaround: Don't use it on msan builds.
* bpo-29564: warnings suggests to enable tracemalloc (GH-10486)Victor Stinner2018-11-133-11/+40
| | | | | The warnings module now suggests to enable tracemalloc if the source is specified, tracemalloc module is available, but tracemalloc is not tracing memory allocations.
* bpo-35214: Initial clang MemorySanitizer support (GH-10479)Gregory P. Smith2018-11-129-4/+115
| | | | | | | | | | Adds configure flags for msan and ubsan builds to make it easier to enable. These also encode the detail that address sanitizer and memory sanitizer should disable pymalloc. Define MEMORY_SANITIZER when appropriate at build time and adds workarounds to existing code to mark things as initialized where the sanitizer is otherwise unable to determine that. This lets our build succeed under the memory sanitizer. not all tests pass without sanitizer failures yet but we're in pretty good shape after this.
* Improve grammar in Glossary. (GH-10474)Windson yang2018-11-121-2/+2
| | | a asynchronous generator -> an asynchronous generator
* Correct grammar mistake in stdtypes.rst (GH-10481)Andrés Delfino2018-11-121-1/+1
|
* bpo-30064: Refactor sock_* asyncio API (#10419)Andrew Svetlov2018-11-125-446/+167
|
* Linkify PEP 8 in unix.rst (GH-10482)Andrés Delfino2018-11-121-1/+1
|
* bpo-35081: Rename internal headers (GH-10275)Victor Stinner2018-11-1265-95/+102
| | | | | | | | | | | | | | Rename Include/internal/ headers: * pycore_hash.h -> pycore_pyhash.h * pycore_lifecycle.h -> pycore_pylifecycle.h * pycore_mem.h -> pycore_pymem.h * pycore_state.h -> pycore_pystate.h Add missing headers to Makefile.pre.in and PCbuild: * pycore_condvar.h. * pycore_hamt.h * pycore_pyhash.h
* bpo-33695 shutil.copytree() + os.scandir() cache (#7874)Giampaolo Rodola2018-11-123-56/+96
|
* Minor grammar improvement to io documentation. (GH-10329)Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి)2018-11-121-1/+1
| | | Independently of -> Independent of
* Update subprocess.Popen documentation wrt universal_newlines arg (GH-10337)Jakub Stasiak2018-11-121-3/+8
| | | | | | | | * universal_newlines defaulting to False would suggest, that not specifying universal_newlines explicitly and setting text to True should cause an error, which is not the case. * The run function didn't have the universal_newlines parameter documented * The check_output function didn't have its text parameter documented
* bpo-33878: Doc: Fix missing case by simplifying. (GH-7762)Julien Palard2018-11-111-6/+3
| | | | | The documentation was not covering multiple targets enclosed by parenthesis nor multiple targets enclosed by brackets, adding them all would be heavy, an else cover them all and is lighter to read.
* bpo-35177: Add dependencies between header files (GH-10361)Victor Stinner2018-11-1113-26/+42
| | | | | | | | | | | | | | * ast.h now includes Python-ast.h and node.h * parsetok.h now includes node.h and grammar.h * symtable.h now includes Python-ast.h * Modify asdl_c.py to enhance Python-ast.h: * Add #ifndef/#define Py_PYTHON_AST_H to be able to include the header twice * Add "extern { ... }" for C++ * Undefine "Yield" macro conflicting with winbase.h * Remove "#undef Yield" from C files, it's now done in Python-ast.h * Remove now useless includes in C files
* closes bpo-35204: Disable thread and memory sanitizers for ↵Alexey Izbyshev2018-11-111-12/+31
| | | | | | | | | address_in_range(). (GH-10442) This function may access memory which is mapped but is considered free by libc allocator. It behaves so by design, therefore we need to suppress sanitizer reports. GCC doesn't support MSan, so disable only TSan for it.
* Neaten the code without any algorithmic change. (GH-10466)Raymond Hettinger2018-11-111-5/+2
| | | Remove unneeded assertion (we already know so is a PySetObject *).
* bpo-33699: Describe try's else clause with the rest of the try clause (GH-7252)Andrés Delfino2018-11-111-7/+5
| | | https://bugs.python.org/issue33699
* dict insertion order is guaranteed since 3.7 (GH-10431)Andrés Delfino2018-11-111-1/+1
|
* bpo-34864: Document two IDLE on MacOS issues. (GH-10456)Terry Jan Reedy2018-11-113-13/+37
| | | | | The System Preferences Dock "prefer tabs always" setting disables some IDLE features. Menus are a bit different than as described for Windows and Linux.
* bpo-35202: Remove unused imports in Lib directory. (GH-10446)Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి)2018-11-107-9/+0
|
* bpo-35202: Remove unused imports in idlelib (GH-10438)Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి)2018-11-107-6/+2
|
* bpo-35202: Remove unused imports in Lib directory. (GH-10445)Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి)2018-11-103-3/+0
|
* Doc: Simplify Copyright line in README (GH-10287)David Kleuker2018-11-101-6/+2
| | | | | | | This also makes it consistent with other places like: - https://docs.python.org/dev/copyright.html - https://www.python.org/ footer - https://github.com/python/cpython/blob/e42b705188271da108de42b55d9344642170aa2b/Python/getcopyright.c#L7
* Correct a typo in the Unittest documentation (GH-10397)Géry Ogam2018-11-091-1/+1
| | | | Co-Authored-By: maggyero <gery.ogam@gmail.com>
* bpo-35199: Add an internal _PyTuple_ITEMS() macro (GH-10434)Victor Stinner2018-11-099-23/+27
| | | | | | | * _PyTuple_ITEMS() gives access to the tuple->ob_item field and cast the first argument to PyTupleObject*. This internal macro is only usable if Py_BUILD_CORE is defined. * Replace &PyTuple_GET_ITEM(ob, 0) with _PyTuple_ITEMS(ob). * Replace PyTuple_GET_ITEM(op, 1) with &_PyTuple_ITEMS(ob)[1].
* bpo-35081: Internal headers require Py_BUILD_CORE (GH-10363)Victor Stinner2018-11-0916-13/+48
| | | | | | | | | * All internal header files now require Py_BUILD_CORE or Py_BUILD_CORE_BUILTIN to be defined. * _json.c is now compiled with Py_BUILD_CORE_BUILTIN to access pycore_accu.h header. * Add an example to Modules/Setup to show how to build _json as a built-in module; it requires non trivial compiler options.
* Hoist the float conversion out of the inner loop. (GH-10430)Raymond Hettinger2018-11-091-1/+2
| | | Currently, the *n* and *total* variables get converted to floats each time they are multiplied by random(). This minor tweak does the conversion just once and gets a small speedup (approx 3%).
* Optimize set.pop() to advance a pointer instead of indexing. (GH-10429)Raymond Hettinger2018-11-091-7/+8
| | | | | Gives approx 20% speed-up using clang depending on the number of elements in the set (the less dense the set, the more the speed-up). Uses the same entry++ logic used elsewhere in the setobject.c code.
* Cleanup and improve the regex tokenizer example. (GH-10426)Raymond Hettinger2018-11-091-36/+38
| | | | | | | | | | | 1) Convert weird field name "typ" to the more standard "type". 2) For the NUMBER type, convert the value to an int() or float(). 3) Simplify ``group(kind)`` to the shorter and faster ``group()`` call. 4) Simplify logic go a single if-elif chain to make this easier to extend. 5) Reorder the tests to match the order the tokens are specified. This isn't necessary for correctness but does make the example easier to follow. 6) Move the "column" calculation before the if-elif chain so that users have the option of using this value in error messages.
* Fixing wording in comment. (GH-10425)Raymond Hettinger2018-11-091-1/+1
| | | | Since the n==1 case just returns *max*, it cannot be larger than the magnitude of the vector entry.
* bpo-35194: Fix a wrong constant in cp932 codec (GH-10420)Alexey Izbyshev2018-11-091-1/+1
| | | | | | | | | | | This typo doesn't affect the result because wrong bits are discarded on implicit conversion to unsigned char, but it trips UBSan with -fsanitize=implicit-integer-truncation. https://bugs.python.org/issue35194
* bpo-24412: Adds cleanUps for setUpClass and setUpModule. (GH-9190)Lisa Roach2018-11-097-18/+783
|
* bpo-35193: Fix an off by one error in the RETURN_VALUE case. (GH-10418)Gregory P. Smith2018-11-093-10/+34
| | | | | | | | | | | | Fix an off by one error in the peephole optimizer when checking for unreachable code beyond a return. Do a bounds check within find_op so it can return before going past the end as a safety measure. https://github.com/python/cpython/commit/7db3c488335168993689ddae5914a28e16188447#diff-a33329ae6ae0bb295d742f0caf93c137 introduced this off by one error while fixing another one nearby. This bug was shipped in all Python 3.6 and 3.7 releases. The included unittest won't fail unless you do a clang msan build.
* bpo-35065: Remove `StreamReaderProtocol._untrack_reader` (#10212)Vincent Michel2018-11-084-11/+26
| | | | | The call to `_untrack_reader` is performed too soon, causing the protocol to forget about the reader before `connection_lost` can run and feed the EOF to the reader. See bpo-35065.
* Replace dead code with an assertion in winreg.c. (GH-10028)Zackery Spytz2018-11-081-2/+1
|
* bpo-34966: Improve support of method aliases in pydoc. (GH-9823)Serhiy Storchaka2018-11-083-4/+104
| | | | Pydoc now does not duplicate docstrings for aliases of inherited methods.
* Revert "bpo-32409: Fix regression in activate.bat on international Windows ↵Pablo Galindo2018-11-072-7/+6
| | | | | (GH-10295)" (GH-10403) This reverts commit c64583b6d3e8516a8cd2b5f84fc1e300bfac2206 due to multiple buildbot failures when building it.
* Doc: Make all versions sidebars the same for consistency. (GH-10288)Julien Palard2018-11-071-2/+3
|
* Fix the construction of subprocess.CalledProcessError in test_venv (GH-10400)Pablo Galindo2018-11-071-1/+1
| | | The constructor of subprocess.CalledProcessError in the check_output function had an extra None in it.
* bpo-35015: Doc: Fix internationalisation of the availability directive. ↵Julien Palard2018-11-071-3/+4
| | | | (GH-10360)
* bpo-34726: Fix handling of hash-based pycs in zipimport. (GH-10327)Elvis Pranskevichus2018-11-074-1049/+1147
| | | | | | | | Current support for hash-based bytecode files in `zipimport` is rather sparse, which leads to test failures when the test suite is ran with the ``SOURCE_DATE_EPOCH`` environment variable set. This teaches zipimport to handle hash-based pycs properly.
* Add link to PEP 525 in Expressions. (GH-10333)Andrés Delfino2018-11-071-1/+5
|
* glob uses fnmatch.filter instead of fnmatch since 2001. (GH-10102)Andrés Delfino2018-11-071-1/+1
|
* Add a reference to the name mangling description in the tutorial to the ↵Andrés Delfino2018-11-071-0/+3
| | | | index. (GH-10138)