summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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()
* bpo-32329: Fix -R option for hash randomization (#4873)Victor Stinner2017-12-146-39/+63
| | | | | | | | | | | | bpo-32329, bpo-32030: * The -R option now turns on hash randomization when the PYTHONHASHSEED environment variable is set to 0 Previously, the option was ignored. * sys.flags.hash_randomization is now properly set to 0 when hash randomization is turned off by PYTHONHASHSEED=0. * _PyCoreConfig_ReadEnv() now reads the PYTHONHASHSEED environment variable. _Py_HashRandomization_Init() now only apply the configuration, it doesn't read PYTHONHASHSEED anymore.
* bpo-32143: add f_fsid to os.statvfs() (#4571)Giuseppe Scrivano2017-12-144-1/+12
| | | Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* bpo-32226: Implementation of PEP 560 (core components) (#4732)Ivan Levkivskyi2017-12-147-5/+492
| | | | | This part of the PEP implementation adds support for __mro_entries__ and __class_getitem__ by updating __build_class__ and PyObject_GetItem.
* bpo-29469: Optimize literal lists and sets iterating on the AST level. (#4866)Serhiy Storchaka2017-12-144-3775/+3761
|
* bpo-32277: Fix exception raised from chmod(..., follow_symlinks=False) (#4797)Anthony Sottile2017-12-142-0/+4
|
* bpo-32314: Implement asyncio.run() (#4852)Yury Selivanov2017-12-145-9/+173
|
* bpo-29469: Remove unnecessary peephole optimizer (GH-4863)INADA Naoki2017-12-141-15/+0
| | | | | Conversions like `not a is b -> a is not b` are implemented in AST optimizer in previous commit (7ea143a). So this commit removes them from peephole optimizer.
* bpo-32030: Add _PyMainInterpreterConfig.warnoptions (#4855)Victor Stinner2017-12-143-47/+104
| | | Add warnoptions and xoptions fields to _PyMainInterpreterConfig.
* bpo-32297: Few misspellings found in Python source code comments. (#4803)Mike2017-12-1439-71/+71
| | | | | | | | * Fix multiple typos in code comments * Add spacing in comments (test_logging.py, test_math.py) * Fix spaces at the beginning of comments in test_logging.py
* bpo-32225: Implementation of PEP 562 (#4731)Ivan Levkivskyi2017-12-149-4/+161
| | | | | Implement PEP 562: module __getattr__ and __dir__. The implementation simply updates module_getattro and module_dir.
* bpo-32302: Fix distutils bdist_wininst for CRT v142 (#4851)Victor Stinner2017-12-142-2/+4
| | | CRT v142 is binary compatible with CRT v140.
* bpo-29469: Move constant folding to AST optimizer (GH-2858)INADA Naoki2017-12-1411-3966/+4431
|
* bpo-32030: Rewrite _PyMainInterpreterConfig (#4854)Victor Stinner2017-12-148-193/+281
| | | | | | | | | | | | | | | | | | | | _PyMainInterpreterConfig now contains Python objects, whereas _PyCoreConfig contains wchar_t* strings. Core config: * Rename _PyMainInterpreterConfig_ReadEnv() to _PyCoreConfig_ReadEnv() * Move 3 strings from _PyMainInterpreterConfig to _PyCoreConfig: module_search_path_env, home, program_name. * Add _PyCoreConfig_Clear() * _PyPathConfig_Calculate() now takes core config rather than main config * _PyMainInterpreterConfig_Read() now requires also a core config Main config: * Add _PyMainInterpreterConfig.module_search_path: sys.path list * Add _PyMainInterpreterConfig.argv: sys.argv list * _PyMainInterpreterConfig_Read() now computes module_search_path
* bpo-30241: implement contextlib.AbstractAsyncContextManager (#1412)Jelle Zijlstra2017-12-145-5/+88
|
* bpo-32296: Unbreak tests on Windows (#4850)Yury Selivanov2017-12-131-4/+7
|
* bpo-32030: Add _PyPathConfig_ComputeArgv0() (#4845)Victor Stinner2017-12-135-141/+207
| | | | | | | | | | | | | | | | Changes: * Split _PySys_SetArgvWithError() into subfunctions for Py_Main(): * Create the Python list object * Set sys.argv to the list * Compute argv0 * Prepend argv0 to sys.path * Add _PyPathConfig_ComputeArgv0() * Remove _PySys_SetArgvWithError() * Py_Main() now splits the code to compute sys.argv/path0 and the code to update the sys module: add pymain_compute_argv() subfunction.
* bpo-32296: Implement asyncio.get_event_loop and _get_running_loop in C. (#4827)Yury Selivanov2017-12-135-28/+465
| | | | | | | | asyncio.get_event_loop(), and, subsequently asyncio._get_running_loop() are one of the most frequently executed functions in asyncio. They also can't be sped up by third-party event loops like uvloop. When implemented in C they become 4x faster.
* pymain_set_sys_argv() now copies argv (#4838)Victor Stinner2017-12-133-35/+88
| | | | | | | | | | bpo-29240, bpo-32030: * Rename pymain_set_argv() to pymain_set_sys_argv() * pymain_set_sys_argv() now creates of copy of argv and modify the copy, rather than modifying pymain->argv * Call pymain_set_sys_argv() earlier: before pymain_run_python(), but after pymain_get_importer(). * Add _PySys_SetArgvWithError() to handle errors
* pythoninfo: Add builtins, test.support, ... (#4840)Victor Stinner2017-12-131-1/+50
| | | | | | Collect more info from builtins, resource, test.test_socket and test.support modules. Co-Authored-By: Christian Heimes <christian@python.org>
* Fix couple typos (#4839)Andrew Svetlov2017-12-132-2/+2
|
* trivial: link updates in documentation (#2765)jimmy2017-12-134-5/+5
|
* bpo-29240: PEP 540: Add a new UTF-8 Mode (#855)Victor Stinner2017-12-1327-178/+593
| | | | | | | | | | | | | | | | | | | | | | * Add -X utf8 command line option, PYTHONUTF8 environment variable and a new sys.flags.utf8_mode flag. * If the LC_CTYPE locale is "C" at startup: enable automatically the UTF-8 mode. * Add _winapi.GetACP(). encodings._alias_mbcs() now calls _winapi.GetACP() to get the ANSI code page * locale.getpreferredencoding() now returns 'UTF-8' in the UTF-8 mode. As a side effect, open() now uses the UTF-8 encoding by default in this mode. * Py_DecodeLocale() and Py_EncodeLocale() now use the UTF-8 encoding in the UTF-8 Mode. * Update subprocess._args_from_interpreter_flags() to handle -X utf8 * Skip some tests relying on the current locale if the UTF-8 mode is enabled. * Add test_utf8mode.py. * _Py_DecodeUTF8_surrogateescape() gets a new optional parameter to return also the length (number of wide characters). * pymain_get_global_config() and pymain_set_global_config() now always copy flag values, rather than only copying if the new value is greater than the old value.
* bpo-32284: Fix documentation of BinaryIO and TextIO (#4832)Sebastian Rittau2017-12-131-3/+3
|
* Test atexit shutdown mechanism in a subprocess (#4828)Antoine Pitrou2017-12-132-0/+18
| | | | * Test atexit shutdown mechanism in a subprocess
* bpo-17852: Revert incorrect fix based on misunderstanding of _Py_PyAtExit() ↵Antoine Pitrou2017-12-135-78/+2
| | | | semantics (#4826)
* import.c: Fix a GCC warning (#4822)Victor Stinner2017-12-121-1/+1
| | | | | | Fix the warning: Python/import.c: warning: comparison between signed and unsigned integer expressions if ((i + n + 1) <= PY_SSIZE_T_MAX / sizeof(struct _inittab)) {
* bpo-32101: Fix tests for PYTHONDEVMODE=1 (#4821)Victor Stinner2017-12-123-17/+16
| | | | test_asycio: remove also aio_path which was used when asyncio was developed outside the stdlib.
* bpo-32230: Set sys.warnoptions with -X dev (#4820)Victor Stinner2017-12-1212-124/+224
| | | | | | | | | | | | | | Rather than supporting dev mode directly in the warnings module, this instead adjusts the initialisation code to add an extra 'default' entry to sys.warnoptions when dev mode is enabled. This ensures that dev mode behaves *exactly* as if `-Wdefault` had been passed on the command line, including in the way it interacts with `sys.warnoptions`, and with other command line flags like `-bb`. Fix also bpo-20361: have -b & -bb options take precedence over any other warnings options. Patch written by Nick Coghlan, with minor modifications of Victor Stinner.
* Fix improper use of re.escape() in tests. (#4814)Serhiy Storchaka2017-12-121-1/+1
|
* Fix implementation dependent assertion in test_plistlib. (#4813)Serhiy Storchaka2017-12-121-1/+2
| | | It is failed with an advanced optimizer.
* bpo-32241: Add the const qualifire to declarations of umodifiable strings. ↵Serhiy Storchaka2017-12-1215-56/+59
| | | | (#4748)
* bpo-31942: Document optional support of start and stop attributes in ↵Nitish Chandra2017-12-122-3/+6
| | | | Sequence.index method (#4277)
* bpo-32255: Always quote a single empty field when write into a CSV file. (#4769)Licht Takeuchi2017-12-124-2/+25
| | | This allows to distinguish an empty row from a row consisting of a single empty field.
* Fix small typo in tupleobject.h (#4801)Chris2017-12-121-1/+1
|
* Fix idlelib comment typos reported by Mike on pull request 4803. (#4807)Terry Jan Reedy2017-12-123-3/+3
|
* bpo-32227: functools.singledispatch supports registering via type ↵Łukasz Langa2017-12-114-8/+108
| | | | annotations (#4733)
* bpo-32258: Replace 'yield from' to 'await' in asyncio docs (#4779)Andrew Svetlov2017-12-119-82/+79
| | | | | | * Replace 'yield from' to 'await' in asyncio docs * Fix docstrings
* Add asyncio.get_running_loop() function. (#4782)Yury Selivanov2017-12-114-1/+27
|
* bpo-32273: Move asyncio.test_utils to test.test_asyncio (#4785)Yury Selivanov2017-12-1117-61/+29
|
* bpo-32272: Remove asyncio.async() function. (#4784)Yury Selivanov2017-12-114-30/+2
|
* bpo-22671: Clarify and test default read method implementations (#4568)Sanyam Khurana2017-12-112-7/+59
| | | Original patch written by Martin Panter, enhanced by Sanyam Khurana.
* bpo-32252: Fix faulthandler_suppress_crash_report() (#4794)Victor Stinner2017-12-112-1/+3
| | | | Fix faulthandler_suppress_crash_report() used to prevent core dump files when testing crashes. getrlimit() returns zero on success.
* bpo-32262: Fix f-string (#4787)Yury Selivanov2017-12-111-1/+1
|
* bpo-32262: Fix codestyle; use f-strings formatting where necessary. (#4775)Yury Selivanov2017-12-1024-348/+332
|