summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* closes bpo-31650: PEP 552 (Deterministic pycs) implementation (#4575)Benjamin Peterson2017-12-0933-2503/+3362
| | | | | | | | | | | | | | | | | | | | | | | | | Python now supports checking bytecode cache up-to-dateness with a hash of the source contents rather than volatile source metadata. See the PEP for details. While a fairly straightforward idea, quite a lot of code had to be modified due to the pervasiveness of pyc implementation details in the codebase. Changes in this commit include: - The core changes to importlib to understand how to read, validate, and regenerate hash-based pycs. - Support for generating hash-based pycs in py_compile and compileall. - Modifications to our siphash implementation to support passing a custom key. We then expose it to importlib through _imp. - Updates to all places in the interpreter, standard library, and tests that manually generate or parse pyc files to grok the new format. - Support in the interpreter command line code for long options like --check-hash-based-pycs. - Tests and documentation for all of the above.
* bpo-32253: Deprecate with statement and bare await for asyncio locks (GH-4764)Andrew Svetlov2017-12-095-55/+108
| | | | | * Add test for 'with (yield from lock)' * Deprecate with statement for asyncio locks * Document the deprecation
* bpo-32212: Updated logging documentation to make parameter names more ↵Vinay Sajip2017-12-091-20/+21
| | | | consistent with source. (GH-4765)
* bpo-32193: Convert asyncio to async/await usage (#4753)Andrew Svetlov2017-12-0822-770/+646
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Convert asyncio/tasks.py to async/await * Convert asyncio/queues.py to async/await * Convert asyncio/test_utils.py to async/await * Convert asyncio/base_subprocess.py to async/await * Convert asyncio/subprocess.py to async/await * Convert asyncio/streams.py to async/await * Fix comments * Convert asyncio/locks.py to async/await * Convert asyncio.sleep to async def * Add a comment * Add missing news * Convert stubs from AbstrctEventLoop to async functions * Convert subprocess_shell/subprocess_exec * Convert connect_read_pipe/connect_write_pip to async/await syntax * Convert create_datagram_endpoint * Convert create_unix_server/create_unix_connection * Get rid of old style coroutines in unix_events.py * Convert selector_events.py to async/await * Convert wait_closed and create_connection * Drop redundant line * Convert base_events.py * Code cleanup * Drop redundant comments * Fix indentation * Add explicit tests for compatibility between old and new coroutines * Convert windows event loop to use async/await * Fix double awaiting of async function * Convert asyncio/locks.py * Improve docstring * Convert tests to async/await * Convert more tests * Convert more tests * Convert more tests * Convert tests * Improve test
* bpo-22589 Changed MIME type of .bmp to "image/bmp" (#4756)Nitish Chandra2017-12-082-1/+2
| | | Per rfc7903 this is the standard MIME type for this file format, and appears as such in the IANA MIME registry.
* Fix missing DECREF of mod. (#4749)Neil Schemenauer2017-12-081-0/+1
|
* PyLong_FromString(): fix Coverity CID 1424951 (#4738)Victor Stinner2017-12-071-3/+2
| | | | | | | | | | | Explicitly cast digits (Py_ssize_t) to double to fix the following false-alarm warning from Coverity: "fsize_z = digits * log_base_BASE[base] + 1;" CID 1424951: Incorrect expression (UNINTENDED_INTEGER_DIVISION) Dividing integer expressions "9223372036854775783UL" and "4UL", and then converting the integer quotient to type "double". Any remainder, or fractional part of the quotient, is ignored.
* bpo-32208: update threading.Semaphore docs and add unit test (#4709)Garrett Berg2017-12-072-15/+17
| | | | | | | | | | * fix issue32208: update threading.Semaphore docs and add unit test to validate correct behavior * add test for blocking * Update threading.rst * semaphore: remove documentation validation tests and move 'return value' test to BaseSemaphore
* bpo-32199: The getnode() ip getter now uses 'ip link' instead of 'ip link ↵xdegaye2017-12-072-1/+2
| | | | list' (GH-4696)
* Fix hardcoded value in test_os.py (#4744)Pablo Galindo2017-12-071-1/+1
|
* Allows non-critical upload steps to fail (#4742)Steve Dower2017-12-061-3/+3
|
* Use raw strings for regex to avoid invalid escape sequences. (GH-4741)Eric V. Smith2017-12-061-2/+2
|
* Modify configure to link with the compiler driver under HP-UX when not using ↵Rob Boehne2017-12-062-2/+4
| | | | gcc. (#2519)
* bpo-32233: Fix build with --with-system-libmpdec. (#4739)Stefan Krah2017-12-061-1/+2
|
* bpo-32030: Add _PyImport_Fini2() (#4737)Victor Stinner2017-12-063-35/+78
| | | | | | | | | | | | | | | | | | | | | PyImport_ExtendInittab() now uses PyMem_RawRealloc() rather than PyMem_Realloc(). PyImport_ExtendInittab() can be called before Py_Initialize() whereas only the PyMem_Raw allocator is supposed to be used before Py_Initialize(). Add _PyImport_Fini2() to release the memory allocated by PyImport_ExtendInittab() at exit. PyImport_ExtendInittab() now forces the usage of the default raw allocator, to be able to release memory in _PyImport_Fini2(). Don't export these functions anymore to be C API, only to Py_BUILD_CORE: * _PyExc_Fini() * _PyImport_Fini() * _PyGC_DumpShutdownStats() * _PyGC_Fini() * _PyType_Fini() * _Py_HashRandomization_Fini()
* bpo-25910: Fixes redirection from http to https (#4674)Sanyam Khurana2017-12-0624-39/+39
|
* bpo-32030: Add pymain_get_global_config() (#4735)Victor Stinner2017-12-067-77/+142
| | | | | | | | | | | | | * Py_Main() now starts by reading Py_xxx configuration variables to only work on its own private structure, and then later writes back the configuration into these variables. * Replace Py_GETENV() with pymain_get_env_var() which ignores empty variables. * Add _PyCoreConfig.dump_refs * Add _PyCoreConfig.malloc_stats * _PyObject_DebugMallocStats() is now responsible to check if debug hooks are installed. The function returns 1 if stats were written, or 0 if the hooks are disabled. Mark _PyMem_PymallocEnabled() as static.
* bpo-32030: pass interp to _PyImport_Init() (#4736)Victor Stinner2017-12-063-11/+3
| | | | | Remove also the initstr variable, unused since the commit e69f0df45b709c25ac80617c41bbae16f56870fb pushed in 2012: "bpo-13959: Re-implement imp.find_module() in Lib/imp.py"
* Bump to 3.7.0a3+Ned Deily2017-12-062-3/+3
|
* Merge tag 'v3.7.0a3'Ned Deily2017-12-06158-419/+1643
|\
| * Bump to 3.7.0a3v3.7.0a3Ned Deily2017-12-052-3/+3
| |
| * Update NEWS and pydoc topics.Ned Deily2017-12-05156-409/+1640
| |
| * Tidy NEWS entry.Ned Deily2017-12-051-7/+0
| |
* | Add Guido and Ivan as owners for typing.py (#4729)Guido van Rossum2017-12-051-0/+2
| |
* | Add dataclasses to CODEOWNERS. (GH-4730)Eric V. Smith2017-12-051-0/+2
| |
* | bpo-32030: Simplify _PyCoreConfig_INIT macro (#4728)Victor Stinner2017-12-054-51/+12
|/ | | | | | | * Simplify _PyCoreConfig_INIT, _PyMainInterpreterConfig_INIT, _PyPathConfig_INIT macros: no need to set fields to 0/NULL, it's redundant (the C language sets them to 0/NULL for us). * Fix typo: pymain_run_statup() => pymain_run_startup() * Remove a few XXX/TODO
* Add a missing space in tkinter documentation. (GH-4692)Julien Palard2017-12-051-1/+1
|
* bpo-31380: Skip test_httpservers test_undecodable_file on macOS. (#4720)Ned Deily2017-12-052-1/+3
| | | The undecodable file name cannot be created on macOS APFS file systems.
* Update macOS installer to XZ 5.2.3 (#4718)Ned Deily2017-12-051-3/+3
|
* bpo-31392: Update macOS installer to use OpenSSL 1.0.2m (#4715)Ned Deily2017-12-052-4/+4
|
* bpo-19610: Warn if distutils is provided something other than a list to some ↵Neil Schemenauer2017-12-055-47/+66
| | | | | | | | | | | | | | | fields (#4685) * Rather than raise TypeError, warn and call list() on the value. * Fix tests, revise NEWS and whatsnew text. * Revise documentation, a string is okay as well. * Ensure 'requires' and 'obsoletes' are real lists. * Test that requires and obsoletes are turned to lists.
* Enable SQLite JSON functions for macOS installer build (#4712)Ned Deily2017-12-051-0/+1
|
* [bpo-28556] Minor fixes for typing module (#4710)Ivan Levkivskyi2017-12-053-10/+55
|
* bpo-28791: Update macOS installer to use SQLite 3.21.0. (#4245)Mariatta2017-12-052-3/+4
|
* bpo-30928: update idlelib/NEWS.txt. (#4706)Terry Jan Reedy2017-12-041-0/+7
|
* bpo-32214: Implement PEP 557: Data Classes (#4704)Eric V. Smith2017-12-043-0/+2854
|
* bpo-32207: Improve tk event exception tracebacks in IDLE. (#4703)Terry Jan Reedy2017-12-042-5/+15
| | | | | | | | When tk event handling is driven by IDLE's run loop, a confusing and distracting queue.EMPTY traceback context is no longer added to tk event exception tracebacks. The traceback is now the same as when event handling is driven by user code. Patch based on a suggestion by Serhiy Storchaka.
* bpo-30928: Update idlelib/NEWS.txt to 2017 Dec 3. (#4701)Terry Jan Reedy2017-12-041-0/+16
| | | Patches are in 3.7.0a3 even if this update is not.
* Revert "bpo-32197: Try to fix a compiler error on OS X introduced in ↵Victor Stinner2017-12-0412-424/+455
| | | | | | | | | | | | | | | | | | | | | | | bpo-32030. (#4681)" (#4694) * Revert "bpo-32197: Try to fix a compiler error on OS X introduced in bpo-32030. (#4681)" This reverts commit 13badcbc60cdbfae1dba1683fd2fae9d70717143. Re-apply commits: * "bpo-32030: _PyPathConfig_Init() sets home and program_name (#4673)" commit af5a895073c24637c094772b27526b94a12ec897. * "bpo-32030: Fix config_get_program_name() on macOS (#4669)" commit e23c06e2b03452c9aaf0dae52296c85e572f9bcd. * "bpo-32030: Add Python/pathconfig.c (#4668)" commit 0ea395ae964c9cd0f499e2ef0d0030c971201220. * "bpo-32030: Don't call _PyPathConfig_Fini() in Py_FinalizeEx() (#4667)" commit ebac19dad6263141d5db0a2c923efe049dba99d2. * "bpo-32030: Fix Py_GetPath(): init program_name (#4665)" commit 9ac3d8882712c9675c3d2f9f84af6b5729575cde. * Fix compilation error on macOS
* bpo-25054, bpo-1647489: Added support of splitting on zerowidth patterns. ↵Serhiy Storchaka2017-12-049-117/+128
| | | | | | (#4471) Also fixed searching patterns that could match an empty string.
* Fix a regression in uuid added in bpo-32107. (#4677)Serhiy Storchaka2017-12-042-2/+5
| | | | | uuid.get_node() always must return a stable result. Also added a test for non-reproducibility of _random_getnode(). Original patch by Xavier de Gaye.
* bpo-27240 Rewrite the email header folding algorithm. (#3488)R. David Murray2017-12-036-563/+511
| | | | | | | | | | | | | | | | | | | | | The original algorithm tried to delegate the folding to the tokens so that those tokens whose folding rules differed could specify the differences. However, this resulted in a lot of duplicated code because most of the rules were the same. The new algorithm moves all folding logic into a set of functions external to the token classes, but puts the information about which tokens can be folded in which ways on the tokens...with the exception of mime-parameters, which are a special case (which was not even implemented in the old folder). This algorithm can still probably be improved and hopefully simplified somewhat. Note that some of the test expectations are changed. I believe the changes are toward more desirable and consistent behavior: in general when (re) folding a line the canonical version of the tokens is generated, rather than preserving errors or extra whitespace.
* bpo-31619: Fixed integer overflow in converting huge strings to int. (#3884)Serhiy Storchaka2017-12-031-3/+11
|
* bpo-32137: The repr of deeply nested dict now raises a RecursionError (#4570)Serhiy Storchaka2017-12-037-9/+26
| | | | | instead of crashing due to a stack overflow. This perhaps will fix similar problems in other extension types.
* Refactor PyImport_ImportModuleLevelObject(). (#4680)Neil Schemenauer2017-12-031-50/+57
| | | | | | Add import_find_and_load() helper function. The addition of the importtime option has made PyImport_ImportModuleLevelObject() large and so using a helper seems worthwhile. It also makes it clearer that abs_name is the only argument needed by _find_and_load().
* bpo-32176: Set CO_NOFREE in the code object constructor (GH-4675)Nick Coghlan2017-12-034-6/+59
| | | | | | | | Previously, CO_NOFREE was set in the compiler, which meant it could end up being set incorrectly when code objects were created directly. Setting it in the constructor based on freevars and cellvars ensures it is always accurate, regardless of how the code object is defined.
* bpo-31589 : Build PDF using xelatex for better UTF8 support. (#3940)Julien Palard2017-12-021-3/+2
| | | Also addresses doc build failures documented in bpo-32200.
* Add a minimal unit test for Python/frozen.c. (#2995)Neil Schemenauer2017-12-021-0/+30
| | | | | | If the marshal or bytecode formats get changed, frozen.c needs to be updated as well. It can be easy to miss this step and not doing so can cause test_importlib to crash in mysterious ways. Add an explict unit test to make it easier to track down the problem.
* bpo-32197: Try to fix a compiler error on OS X introduced in bpo-32030. (#4681)Serhiy Storchaka2017-12-0212-455/+424
| | | | | | | | | | | | | | | | | | | | | | * Revert "bpo-32030: _PyPathConfig_Init() sets home and program_name (#4673)" This reverts commit af5a895073c24637c094772b27526b94a12ec897. * Revert "bpo-32030: Fix config_get_program_name() on macOS (#4669)" This reverts commit e23c06e2b03452c9aaf0dae52296c85e572f9bcd. * Revert "bpo-32030: Add Python/pathconfig.c (#4668)" This reverts commit 0ea395ae964c9cd0f499e2ef0d0030c971201220. * Revert "bpo-32030: Don't call _PyPathConfig_Fini() in Py_FinalizeEx() (#4667)" This reverts commit ebac19dad6263141d5db0a2c923efe049dba99d2. * Revert "bpo-32030: Fix Py_GetPath(): init program_name (#4665)" This reverts commit 9ac3d8882712c9675c3d2f9f84af6b5729575cde.
* bpo-32030: _PyPathConfig_Init() sets home and program_name (#4673)Victor Stinner2017-12-028-97/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | _PyPathConfig_Init() now also initialize home and program_name: * Rename existing _PyPathConfig_Init() to _PyPathConfig_Calculate(). Add a new _PyPathConfig_Init() function in pathconfig.c which handles the _Py_path_config variable and call _PyPathConfig_Calculate(). * Add home and program_name fields to _PyPathConfig.home * _PyPathConfig_Init() now initialize home and program_name from main_config * Py_SetProgramName(), Py_SetPythonHome() and Py_GetPythonHome() now calls Py_FatalError() on failure, instead of silently ignoring failures. * config_init_home() now gets directly _Py_path_config.home to only get the value set by Py_SetPythonHome(), or NULL if Py_SetPythonHome() was not called. * config_get_program_name() now gets directly _Py_path_config.program_name to only get the value set by Py_SetProgramName(), or NULL if Py_SetProgramName() was not called. * pymain_init_python() doesn't call Py_SetProgramName() anymore, _PyPathConfig_Init() now always sets the program name * Call _PyMainInterpreterConfig_Read() in pymain_parse_cmdline_envvars_impl() to control the memory allocator * C API documentation: it's no more safe to call Py_GetProgramName() before Py_Initialize().