- 19 Dec, 2017 12 commits
-
-
KatherineMichel authored
Mention that the format-specifier mini language in f-strings is the same one used by str.format.
-
Neil Aspinall authored
10 seconds by default.
-
Antoine Pitrou authored
* Fix #32377: improve __del__ docs and fix mention about resurrection * Mention that CPython only calls __del__ once.
-
Zackery Spytz authored
-
Michael Felt authored
Implement find_library() support in ctypes/util for AIX. Add some AIX specific tests.
-
Julien Duponchelle authored
-
Yury Selivanov authored
-
Yury Selivanov authored
-
Yury Selivanov authored
Recent sock.type fix (see bug 32331) makes sock.type checks simpler in asyncio.
-
Victor Stinner authored
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.
-
Andrew Svetlov authored
-
Yury Selivanov authored
-
- 18 Dec, 2017 9 commits
-
-
Victor Stinner authored
* main.c: add missing #include <fenv.h> on FreeBSD * indent also other #ifdef in main.c * cleanup Programs/python.c
-
Yury Selivanov authored
-
izbyshev authored
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.
-
Andrew Svetlov authored
-
Serhiy Storchaka authored
It was introduced in bpo-27169.
-
Segev Finer authored
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.
-
INADA Naoki authored
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.
-
Nathaniel J. Smith authored
-
Yury Selivanov authored
-
- 17 Dec, 2017 2 commits
-
-
Benjamin Peterson authored
bpo-32264
-
Andrew Svetlov authored
* Use fastpath in asyncio.sleep if delay<0 * Add NEWS entry
-
- 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 9 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.
-