- 16 Dec, 2017 8 commits
-
-
Andrew Svetlov authored
-
Andrew Svetlov authored
-
Serhiy Storchaka authored
Based on tests from #4878
-
Nick Coghlan authored
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)
-
Benjamin Peterson authored
As a result of 92a3c6f4, 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.
-
Victor Stinner authored
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.
-
Yury Selivanov authored
-
Brett Cannon authored
-
- 15 Dec, 2017 15 commits
-
-
Victor Stinner authored
Don't define decode_locale() nor encode_locale() on macOS or Android.
-
Raymond Hettinger authored
-
Mariatta authored
Link to the Format Specification Mini Language section from f-strings' documentation.
-
Victor Stinner authored
Run the child process with -E option to ignore the PYTHONWARNINGS environment variable.
-
Victor Stinner authored
-
Serhiy Storchaka authored
Add types.ClassMethodDescriptorType for unbound class methods.
-
Serhiy Storchaka authored
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.
-
Serhiy Storchaka authored
-
Serhiy Storchaka authored
This fixes also bpo-22091.
-
Ville Skyttä authored
-
Benjamin Peterson authored
-
Andrew Svetlov authored
* Implement functionality * Add documentation
-
Yury Selivanov authored
-
Victor Stinner authored
* Add new fields to _PyMainInterpreterConfig: * executable * prefix * base_prefix * exec_prefix * base_exec_prefix * _PySys_EndInit() now sets sys attributes from _PyMainInterpreterConfig
-
Victor Stinner authored
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()
-
- 14 Dec, 2017 14 commits
-
-
Victor Stinner authored
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.
-
Giuseppe Scrivano authored
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
-
Ivan Levkivskyi authored
This part of the PEP implementation adds support for __mro_entries__ and __class_getitem__ by updating __build_class__ and PyObject_GetItem.
-
Serhiy Storchaka authored
-
Anthony Sottile authored
-
Yury Selivanov authored
-
INADA Naoki authored
Conversions like `not a is b -> a is not b` are implemented in AST optimizer in previous commit (7ea143ae). So this commit removes them from peephole optimizer.
-
Victor Stinner authored
Add warnoptions and xoptions fields to _PyMainInterpreterConfig.
-
Mike authored
* 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
-
Ivan Levkivskyi authored
Implement PEP 562: module __getattr__ and __dir__. The implementation simply updates module_getattro and module_dir.
-
Victor Stinner authored
CRT v142 is binary compatible with CRT v140.
-
INADA Naoki authored
-
Victor Stinner authored
_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
-
Jelle Zijlstra authored
-
- 13 Dec, 2017 3 commits
-
-
Yury Selivanov authored
-
Victor Stinner authored
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.
-
Yury Selivanov authored
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.
-