summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* bpo-32379: Faster MRO computation for single inheritance (#4932)Antoine Pitrou2017-12-203-4/+43
| | | | * bpo-32379: Faster MRO computation for single inheritance
* bpo-31901: atexit callbacks should be run at subinterpreter shutdown (#4611)Marcel Plch2017-12-2010-46/+91
| | | | Change atexit behavior and PEP-489 multiphase init support.
* bpo-32030: Cleanup pymain_main() (#4935)Victor Stinner2017-12-202-73/+95
| | | | | | | * Reorganize pymain_main() to make the code more flat * Clear configurations before pymain_update_sys_path() * Mark Py_FatalError() and _Py_FatalInitError() with _Py_NO_RETURN * Replace _PyMain.run_code variable with a new RUN_CODE() macro * Move _PyMain.cf into a local variable in pymain_run_python()
* bpo-32030: Add _PyCoreConfig.argv (#4934)Victor Stinner2017-12-193-151/+233
| | | | | | | * Add argc and argv to _PyCoreConfig * _PyMainInterpreterConfig_Read() now builds its argv from _PyCoreConfig.arg * Move _PyMain.env_warning_options into _Py_CommandLineDetails * Reorder pymain_free()
* Improve the F-strings and format specifier documentation (GH-4931)KatherineMichel2017-12-191-4/+5
| | | | Mention that the format-specifier mini language in f-strings is the same one used by str.format.
* bpo-29970: Add timeout for SSL handshake in asyncioNeil Aspinall2017-12-1912-85/+209
| | | | 10 seconds by default.
* bpo-32377: improve __del__ docs and fix mention about resurrection (#4927)Antoine Pitrou2017-12-192-40/+49
| | | | | | * Fix #32377: improve __del__ docs and fix mention about resurrection * Mention that CPython only calls __del__ once.
* Fix GCC warning in _asynciomodule.c (#4928)Zackery Spytz2017-12-191-1/+1
|
* bpo-26439 Fix ctypes.util.find_library failure on AIX (#4507)Michael Felt2017-12-199-2/+402
| | | | | Implement find_library() support in ctypes/util for AIX. Add some AIX specific tests.
* bpo-29711: Fix stop_serving in proactor loop kill all listening servers (#431)Julien Duponchelle2017-12-193-5/+19
|
* bpo-32355: Optimize asyncio.gather() (#4913)Yury Selivanov2017-12-193-47/+68
|
* bpo-32357: Optimize asyncio.iscoroutine() for non-native coroutines (#4915)Yury Selivanov2017-12-194-33/+149
|
* bpo-27456: Simplify sock type checks (#4922)Yury Selivanov2017-12-193-29/+9
| | | | Recent sock.type fix (see bug 32331) makes sock.type checks simpler in asyncio.
* bpo-32030: Fix compiler warnings (#4921)Victor Stinner2017-12-194-40/+17
| | | | | | | | | | | Fix compiler warnings in Py_FinalizeEx(): only define variables if they are needed, add #ifdef. Other cleanup changes: * _PyWarnings_InitWithConfig() is no more needed: call _PyWarnings_Init() instead. * Inline pymain_init_main_interpreter() in its caller. This subfunction is no more justifed.
* Improve test coverage (#4924)Andrew Svetlov2017-12-191-0/+1
|
* bpo-32331: Fix socket.type when SOCK_NONBLOCK is available (#4877)Yury Selivanov2017-12-197-24/+87
|
* bpo-32030: Fix compilation on FreeBSD, #include <fenv.h> (#4919)Victor Stinner2017-12-182-18/+14
| | | | | * main.c: add missing #include <fenv.h> on FreeBSD * indent also other #ifdef in main.c * cleanup Programs/python.c
* bpo-32356: idempotent pause_/resume_reading; new is_reading method. (#4914)Yury Selivanov2017-12-189-24/+87
|
* bpo-32369: test_subprocess: Fix pass_fds check in test_close_fds() (#4920)izbyshev2017-12-181-2/+2
| | | | | | | | | | The last part of test_close_fds() doesn't match its own comment. The following assertion always holds because fds_to_keep and open_fds are disjoint by construction. self.assertFalse(remaining_fds & fds_to_keep & open_fds, "Some fds not in pass_fds were left open") Fix the code to match the message in the assertion.
* Add @asvetlov to asyncio codeowners (#4917)Andrew Svetlov2017-12-181-1/+1
|
* bpo-32365: Fix a reference leak when compile __debug__. (#4916)Serhiy Storchaka2017-12-181-4/+4
| | | It was introduced in bpo-27169.
* bpo-19764: Implemented support for subprocess.Popen(close_fds=True) on ↵Segev Finer2017-12-188-54/+425
| | | | | | | | | | | | | | | | | Windows (#1218) Even though Python marks any handles it opens as non-inheritable there is still a race when using `subprocess.Popen` since creating a process with redirected stdio requires temporarily creating inheritable handles. By implementing support for `subprocess.Popen(close_fds=True)` we fix this race. In order to implement this we use PROC_THREAD_ATTRIBUTE_HANDLE_LIST which is available since Windows Vista. Which allows to pass an explicit list of handles to inherit when creating a process. This commit also adds `STARTUPINFO.lpAttributeList["handle_list"]` which can be used to control PROC_THREAD_ATTRIBUTE_HANDLE_LIST directly.
* bpo-29469: peephole: Remove const_stack (GH-4879)INADA Naoki2017-12-181-81/+21
| | | | | | | | | | Constant folding was moved to AST optimizer. But compiler may emit LOAD_CONSTs + BUILD_TUPLE. For example, default arguments can be constant tuple if all arguments are constant. This commit makes peephole's tuple folding simple. It doesn't support nested tuples because nested tuples are folded by AST optimizer already.
* bpo-30050: Allow disabling full buffer warnings in signal.set_wakeup_fd (#4792)Nathaniel J. Smith2017-12-184-57/+170
|
* bpo-32348: Optimize asyncio.Future schedule/add/remove callback. (#4907)Yury Selivanov2017-12-184-102/+499
|
* add 'extern' to pygetopt.h symbols, so then don't end up in comdat (#4909)Benjamin Peterson2017-12-171-6/+6
| | | bpo-32264
* bpo-32351: Use fastpath in asyncio.sleep if delay<0 (#4908)Andrew Svetlov2017-12-172-1/+2
| | | | | | * Use fastpath in asyncio.sleep if delay<0 * Add NEWS entry
* bpo-32250: Implement asyncio.current_task() and asyncio.all_tasks() (#4799)Andrew Svetlov2017-12-166-148/+696
|
* Fix PyObject_Hash signature in comment (#4905)Andrew Svetlov2017-12-161-1/+1
|
* Add tests for using PEP560 with classes implemented in C. (#4883)Serhiy Storchaka2017-12-162-0/+103
| | | Based on tests from #4878
* bpo-32002: Refactor C locale coercion tests (GH-4369)Nick Coghlan2017-12-162-54/+84
| | | | | | | | | | Exactly which locale requests will end up giving you the "C" locale is actually platform dependent. A blank locale and "POSIX" will translate to "C" on most Linux distros, but may not do so on other platforms, so this adjusts the way the tests are structured to better account for that. This is an initial step towards fixing the current test failure on Cygwin (hence the issue reference)
* fix up signedness in PyImport_ExtendInittab (#4831)Benjamin Peterson2017-12-161-5/+3
| | | | | | | | | | As a result of 92a3c6f493ad411e4cf0acdf305ef4876aa90669, the compiler complains: Python/import.c:2311:21: warning: comparison of integers of different signs: 'long' and 'unsigned long' [-Wsign-compare] if ((i + n + 1) <= PY_SSIZE_T_MAX / sizeof(struct _inittab)) { ~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This overflow is extremely unlikely to happen, but let's avoid undefined behavior anyway.
* bpo-29240, bpo-32030: Py_Main() re-reads config if encoding changes (#4899)Victor Stinner2017-12-1612-214/+324
| | | | | | | | | | | | | | | | | | bpo-29240, bpo-32030: If the encoding change (C locale coerced or UTF-8 Mode changed), Py_Main() now reads again the configuration with the new encoding. Changes: * Add _Py_UnixMain() called by main(). * Rename pymain_free_pymain() to pymain_clear_pymain(), it can now be called multipled times. * Rename pymain_parse_cmdline_envvars() to pymain_read_conf(). * Py_Main() now clears orig_argc and orig_argv at exit. * Remove argv_copy2, Py_Main() doesn't modify argv anymore. There is no need anymore to get two copies of the wchar_t** argv. * _PyCoreConfig: add coerce_c_locale and coerce_c_locale_warn. * Py_UTF8Mode is now initialized to -1. * Locale coercion (PEP 538) now respects -I and -E options.
* bpo-27456: Ensure TCP_NODELAY is set on linux (#4231)Yury Selivanov2017-12-166-31/+53
|
* bpo-32248: Implement importlib.abc.ResourceReader (GH-4892)Brett Cannon2017-12-164-0/+145
|
* bpo-29240: Don't define decode_locale() on macOS (#4895)Victor Stinner2017-12-151-0/+4
| | | Don't define decode_locale() nor encode_locale() on macOS or Android.
* Minor wording tweak for itertools documentation (#4893)Raymond Hettinger2017-12-151-2/+2
|
* F-strings docs: link to Format Specifiers (GH-4888)Mariatta2017-12-151-1/+2
| | | Link to the Format Specification Mini Language section from f-strings' documentation.
* bpo-32294: Fix multiprocessing test_semaphore_tracker() (#4885)Victor Stinner2017-12-151-1/+1
| | | | Run the child process with -E option to ignore the PYTHONWARNINGS environment variable.
* bpo-32329: Add versionchanged to -R option doc (#4884)Victor Stinner2017-12-151-0/+3
|
* bpo-32265: Classify class and static methods of builtin types. (#4776)Serhiy Storchaka2017-12-156-3/+32
| | | | Add types.ClassMethodDescriptorType for unbound class methods.
* bpo-30416: Protect the optimizer during constant folding. (#4860)Serhiy Storchaka2017-12-154-27/+144
| | | | | | | | It no longer spends much time doing complex calculations and no longer consumes much memory for creating large constants that will be dropped later. This fixes also bpo-21074.
* bpo-32240: Add the const qualifier to declarations of PyObject* array ↵Serhiy Storchaka2017-12-1588-662/+669
| | | | arguments. (#4746)
* bpo-27169: The __debug__ constant is now optimized out at compile time. (#4880)Serhiy Storchaka2017-12-154-38/+26
| | | This fixes also bpo-22091.
* bpo-28393: Update encoding lookup docs wrt bpo-27938 (#4871)Ville Skyttä2017-12-151-4/+8
|
* move pygetopt.h to internal (closes bpo-32264) (#4830)Benjamin Peterson2017-12-158-34/+25
|
* bpo-32311: Implement asyncio.create_task() shortcut (#4848)Andrew Svetlov2017-12-1512-95/+201
| | | | | * Implement functionality * Add documentation
* bpo-32327: Convert asyncio functions documented as coroutines to coroutines. ↵Yury Selivanov2017-12-1511-195/+170
| | | | (#4872)
* bpo-32030: Add _PyMainInterpreterConfig.executable (#4876)Victor Stinner2017-12-155-69/+92
| | | | | | | | | | | | * Add new fields to _PyMainInterpreterConfig: * executable * prefix * base_prefix * exec_prefix * base_exec_prefix * _PySys_EndInit() now sets sys attributes from _PyMainInterpreterConfig
* bpo-32030: Add _PyCoreConfig_Copy() (#4874)Victor Stinner2017-12-154-84/+197
| | | | | | | | | | Each interpreter now has its core_config and main_config copy: * Add _PyCoreConfig_Copy() and _PyMainInterpreterConfig_Copy() * Move _PyCoreConfig_Read(), _PyCoreConfig_Clear() and _PyMainInterpreterConfig_Clear() from Python/pylifecycle.c to Modules/main.c * Fix _Py_InitializeEx_Private(): call _PyCoreConfig_ReadEnv() before _Py_InitializeCore()